BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EventCnv Class Reference

Concrete converter for the Event header stored in the TDS /Event Based on the EventCnv of GLAST. More...

#include <EventCnv.h>

Inheritance diagram for EventCnv:

Public Member Functions

virtual ~EventCnv ()
 EventCnv (ISvcLocator *svc)
StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 do the concrete transformation from TDS to ROOT
StatusCode createRep (DataObject *obj, RootAddress *addr)
 transform from TDS to ROOT
StatusCode createObj (IOpaqueAddress *addr, DataObject *&refpObject)
 transform from ROOT to TDS
virtual StatusCode TObjectToDataObject (DataObject *&dat)
 do the concrete transformation from ROOT to TDS
virtual ~EventCnv ()
 EventCnv (ISvcLocator *svc)
StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 do the concrete transformation from TDS to ROOT
StatusCode createRep (DataObject *obj, RootAddress *addr)
 transform from TDS to ROOT
StatusCode createObj (IOpaqueAddress *addr, DataObject *&refpObject)
 transform from ROOT to TDS
virtual StatusCode TObjectToDataObject (DataObject *&dat)
 do the concrete transformation from ROOT to TDS
virtual ~EventCnv ()
 EventCnv (ISvcLocator *svc)
StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 do the concrete transformation from TDS to ROOT
StatusCode createRep (DataObject *obj, RootAddress *addr)
 transform from TDS to ROOT
StatusCode createObj (IOpaqueAddress *addr, DataObject *&refpObject)
 transform from ROOT to TDS
virtual StatusCode TObjectToDataObject (DataObject *&dat)
 do the concrete transformation from ROOT to TDS
Public Member Functions inherited from RootEventBaseCnv
 RootEventBaseCnv (const CLID &clid, ISvcLocator *svc)
virtual ~RootEventBaseCnv ()
virtual long repSvcType () const
virtual StatusCode initialize ()
virtual StatusCode finalize ()
void declareObject (const std::string &fullPath, const CLID &clid, const std::string &treename, const std::string &branchname)
 Store TDS path to link a particular converter to an object on the TDS.
virtual StatusCode createRep (DataObject *pObject, IOpaqueAddress *&refpAddress)
 Convert the transient object to the requested representation.
virtual StatusCode fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Resolve the references of the converted object.
virtual StatusCode fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Resolve the references of the converted object.
TObject * getReadObject () const
 get the object to be read
 RootEventBaseCnv (const CLID &clid, ISvcLocator *svc)
virtual ~RootEventBaseCnv ()
virtual long repSvcType () const
virtual StatusCode initialize ()
virtual StatusCode finalize ()
void declareObject (const std::string &fullPath, const CLID &clid, const std::string &treename, const std::string &branchname)
 Store TDS path to link a particular converter to an object on the TDS.
virtual StatusCode createRep (DataObject *pObject, IOpaqueAddress *&refpAddress)
 Convert the transient object to the requested representation.
virtual StatusCode fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Resolve the references of the converted object.
virtual StatusCode fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Resolve the references of the converted object.
TObject * getReadObject () const
 get the object to be read
 RootEventBaseCnv (const CLID &clid, ISvcLocator *svc)
virtual ~RootEventBaseCnv ()
virtual long repSvcType () const
virtual StatusCode initialize ()
virtual StatusCode finalize ()
void declareObject (const std::string &fullPath, const CLID &clid, const std::string &treename, const std::string &branchname)
 Store TDS path to link a particular converter to an object on the TDS.
virtual StatusCode createRep (DataObject *pObject, IOpaqueAddress *&refpAddress)
 Convert the transient object to the requested representation.
virtual StatusCode fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Resolve the references of the converted object.
virtual StatusCode fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Resolve the references of the converted object.
TObject * getReadObject () const
 get the object to be read
Public Member Functions inherited from Converter< Ty1, Ty2 >
destinationoperator (const source &) const
destinationoperator (const source &) const
destinationoperator (const source &) const

Static Public Member Functions

static const CLID & classID ()
static const CLID & classID ()
static const CLID & classID ()
Static Public Member Functions inherited from RootEventBaseCnv
static const unsigned char storageType ()
 Storage type and class ID.
static const unsigned char storageType ()
 Storage type and class ID.
static const unsigned char storageType ()
 Storage type and class ID.

Public Attributes

commonData m_common

Friends

class CnvFactory< EventCnv >

Additional Inherited Members

Public Types inherited from Converter< Ty1, Ty2 >
typedef Ty1 source
typedef Ty2 destination
typedef Ty1 source
typedef Ty2 destination
typedef Ty1 source
typedef Ty2 destination
Protected Member Functions inherited from Converter< Ty1, Ty2 >
virtual destinationconvert (const source &) const =0
virtual destinationconvert (const source &) const =0
virtual destinationconvert (const source &) const =0
Protected Attributes inherited from RootEventBaseCnv
IRootCnvSvcm_cnvSvc
std::vector< RootCnvSvc::Leafm_leaves
RootInterfacem_rootInterface
 pointer to the RootInterface
IDataProviderSvc * m_eds
 pointer to eventdataservice
int m_branchNr
 the branchNr of this converter for writing
int m_branchNrDst
int m_branchNrMc
int m_branchNrRecon
int m_branchNrEvtRec
int m_branchNrEvtHeader
int m_branchNrEvtNavigator
TObject * m_objRead
 the object that was read
CLID CLID_top
 the CLID of the upper converter if any
TArrayS * m_branchNumbers
 array with number of branches for reading
std::string m_rootBranchname
 root branchname (may be concatenated of severals)
std::string m_rootTreename
 each converter knows it's treename
std::string m_currentFileName
std::vector< void * > m_adresses
 each converter knows the corresponding adresses
RootEvtSelectorm_evtsel

Detailed Description

Concrete converter for the Event header stored in the TDS /Event Based on the EventCnv of GLAST.

Definition at line 22 of file Event/RootCnvSvc/include/RootCnvSvc/EventCnv.h.

Constructor & Destructor Documentation

◆ ~EventCnv() [1/3]

virtual EventCnv::~EventCnv ( )
inlinevirtual

Definition at line 29 of file Event/RootCnvSvc/include/RootCnvSvc/EventCnv.h.

29{};

◆ EventCnv() [1/3]

EventCnv::EventCnv ( ISvcLocator * svc)

Definition at line 23 of file EventCnv.cxx.

23 : RootEventBaseCnv( classID(), svc ) {
24 // Here we associate this converter with the /Event path on the TDS.
25 // declareObject("/Event", objType(), "","");
26
27 MsgStream log( msgSvc(), "EventCnv" );
28 log << MSG::DEBUG << "EventCnv::EventCnv()" << endmsg;
29}
IMessageSvc * msgSvc()
RootEventBaseCnv(const CLID &clid, ISvcLocator *svc)

◆ ~EventCnv() [2/3]

virtual EventCnv::~EventCnv ( )
inlinevirtual

◆ EventCnv() [2/3]

EventCnv::EventCnv ( ISvcLocator * svc)

◆ ~EventCnv() [3/3]

virtual EventCnv::~EventCnv ( )
inlinevirtual

◆ EventCnv() [3/3]

EventCnv::EventCnv ( ISvcLocator * svc)

Member Function Documentation

◆ classID() [1/3]

const CLID & EventCnv::classID ( )
inlinestatic

Definition at line 27 of file Event/RootCnvSvc/include/RootCnvSvc/EventCnv.h.

27{ return CLID_Event; }
const CLID & CLID_Event

Referenced by RootCnvSvc::createConverter(), and EventCnv().

◆ classID() [2/3]

const CLID & EventCnv::classID ( )
inlinestatic

◆ classID() [3/3]

const CLID & EventCnv::classID ( )
inlinestatic

◆ createObj() [1/3]

StatusCode EventCnv::createObj ( IOpaqueAddress * addr,
DataObject *& refpObject )
virtual

transform from ROOT to TDS

Reimplemented from RootEventBaseCnv.

Definition at line 31 of file EventCnv.cxx.

31 {
32 // Purpose and Method: This converter creates an Event on
33 // the TDS. Registering was already done in GlastEventSelector
34 // Information is dummy as long as no real datafile has been read
35 m_common.clear();
36 MsgStream log( msgSvc(), "EventCnv" );
37 log << MSG::DEBUG << "createObj" << endmsg;
38 Event::EventH* evh = new Event::EventH();
39 refpObject = evh;
40 return StatusCode::SUCCESS;
41}

◆ createObj() [2/3]

StatusCode EventCnv::createObj ( IOpaqueAddress * addr,
DataObject *& refpObject )
virtual

transform from ROOT to TDS

Reimplemented from RootEventBaseCnv.

◆ createObj() [3/3]

StatusCode EventCnv::createObj ( IOpaqueAddress * addr,
DataObject *& refpObject )
virtual

transform from ROOT to TDS

Reimplemented from RootEventBaseCnv.

◆ createRep() [1/3]

StatusCode EventCnv::createRep ( DataObject * obj,
RootAddress * addr )

transform from TDS to ROOT

Definition at line 44 of file EventCnv.cxx.

44 {
45
46 MsgStream log( msgSvc(), "EventCnv" );
47 log << MSG::DEBUG << "EventCnv::DataObjectToObject" << endmsg;
48
49 Event::EventH* evh = dynamic_cast<Event::EventH*>( obj );
50 if ( !evh )
51 {
52 log << MSG::ERROR << "Could not downcast Event" << endmsg;
53 return StatusCode::FAILURE;
54 }
55 // nothing to do, will be done in lower converters
56 return StatusCode::SUCCESS;
57}

◆ createRep() [2/3]

StatusCode EventCnv::createRep ( DataObject * obj,
RootAddress * addr )

transform from TDS to ROOT

◆ createRep() [3/3]

StatusCode EventCnv::createRep ( DataObject * obj,
RootAddress * addr )

transform from TDS to ROOT

◆ DataObjectToTObject() [1/3]

StatusCode EventCnv::DataObjectToTObject ( DataObject * obj,
RootAddress * addr )
inlinevirtual

do the concrete transformation from TDS to ROOT

Implements RootEventBaseCnv.

Definition at line 34 of file Event/RootCnvSvc/include/RootCnvSvc/EventCnv.h.

34 {
35 return StatusCode::SUCCESS;
36 }

◆ DataObjectToTObject() [2/3]

StatusCode EventCnv::DataObjectToTObject ( DataObject * obj,
RootAddress * addr )
inlinevirtual

do the concrete transformation from TDS to ROOT

Implements RootEventBaseCnv.

Definition at line 34 of file InstallArea/x86_64-el9-gcc13-dbg/include/RootCnvSvc/EventCnv.h.

34 {
35 return StatusCode::SUCCESS;
36 }

◆ DataObjectToTObject() [3/3]

StatusCode EventCnv::DataObjectToTObject ( DataObject * obj,
RootAddress * addr )
inlinevirtual

do the concrete transformation from TDS to ROOT

Implements RootEventBaseCnv.

Definition at line 34 of file InstallArea/x86_64-el9-gcc13-opt/include/RootCnvSvc/EventCnv.h.

34 {
35 return StatusCode::SUCCESS;
36 }

◆ TObjectToDataObject() [1/3]

virtual StatusCode EventCnv::TObjectToDataObject ( DataObject *& dat)
inlinevirtual

do the concrete transformation from ROOT to TDS

Implements RootEventBaseCnv.

Definition at line 44 of file Event/RootCnvSvc/include/RootCnvSvc/EventCnv.h.

44{ return StatusCode::SUCCESS; }

◆ TObjectToDataObject() [2/3]

virtual StatusCode EventCnv::TObjectToDataObject ( DataObject *& dat)
inlinevirtual

do the concrete transformation from ROOT to TDS

Implements RootEventBaseCnv.

Definition at line 44 of file InstallArea/x86_64-el9-gcc13-dbg/include/RootCnvSvc/EventCnv.h.

44{ return StatusCode::SUCCESS; }

◆ TObjectToDataObject() [3/3]

virtual StatusCode EventCnv::TObjectToDataObject ( DataObject *& dat)
inlinevirtual

do the concrete transformation from ROOT to TDS

Implements RootEventBaseCnv.

Definition at line 44 of file InstallArea/x86_64-el9-gcc13-opt/include/RootCnvSvc/EventCnv.h.

44{ return StatusCode::SUCCESS; }

◆ CnvFactory< EventCnv >

friend class CnvFactory< EventCnv >
friend

Member Data Documentation

◆ m_common

commonData EventCnv::m_common

Definition at line 46 of file Event/RootCnvSvc/include/RootCnvSvc/EventCnv.h.

Referenced by createObj().


The documentation for this class was generated from the following files: