BOSS 6.6.4.p03
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 ()
 
- 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 createObj (IOpaqueAddress *addr, DataObject *&dat)
 Convert the persistent object to transient.
 
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.
 
virtual StatusCode DataObjectToTObject (DataObject *dat, RootAddress *addr)=0
 Do the concrete conversion from TDS to ROOT.
 
virtual StatusCode TObjectToDataObject (DataObject *&dat)=0
 Do the concrete conversion from ROOT to TDS.
 
TObject * getReadObject () const
 get the object to be read
 
- Public Member Functions inherited from Converter< Ty1, Ty2 >
destinationoperator (const source &) const
 

Static Public Member Functions

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

Protected Member Functions

 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
 
- Protected Member Functions inherited from Converter< Ty1, Ty2 >
virtual destinationconvert (const source &) const =0
 

Protected Attributes

commonData m_common
 
- Protected Attributes inherited from RootEventBaseCnv
RootCnvSvcm_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
 

Friends

class CnvFactory< EventCnv >
 

Additional Inherited Members

- Public Types inherited from Converter< Ty1, Ty2 >
typedef Ty1 source
 
typedef Ty2 destination
 

Detailed Description

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

Definition at line 21 of file EventCnv.h.

Constructor & Destructor Documentation

◆ ~EventCnv()

virtual EventCnv::~EventCnv ( )
inlinevirtual

Definition at line 31 of file EventCnv.h.

31{ };

◆ EventCnv()

EventCnv::EventCnv ( ISvcLocator *  svc)
protected

Definition at line 24 of file EventCnv.cxx.

26{
27// Here we associate this converter with the /Event path on the TDS.
28 //declareObject("/Event", objType(), "","");
29
30
31 MsgStream log(msgSvc(), "EventCnv");
32 log << MSG::DEBUG << "EventCnv::EventCnv()" << endreq;
33}
IMessageSvc * msgSvc()
static const CLID & classID()
Definition: EventCnv.h:26
Base class for all Root Converters.

Member Function Documentation

◆ classID()

static const CLID & EventCnv::classID ( )
inlinestatic

Definition at line 26 of file EventCnv.h.

27 {
28 return CLID_Event;
29 }
const CLID & CLID_Event
Definition: EventModel.cxx:189

◆ createObj()

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

transform from ROOT to TDS

Reimplemented from RootEventBaseCnv.

Definition at line 35 of file EventCnv.cxx.

35 {
36 // Purpose and Method: This converter creates an Event on
37 // the TDS. Registering was already done in GlastEventSelector
38 // Information is dummy as long as no real datafile has been read
40 MsgStream log(msgSvc(), "EventCnv");
41 log << MSG::DEBUG << "createObj" << endreq;
42 Event::EventH * evh = new Event::EventH();
43 refpObject=evh;
44 return StatusCode::SUCCESS;
45}
commonData m_common
Definition: EventCnv.h:49
void clear()
Definition: commonData.cxx:147

◆ createRep()

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

transform from TDS to ROOT

Definition at line 49 of file EventCnv.cxx.

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

◆ DataObjectToTObject()

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

do the concrete transformation from TDS to ROOT

Implements RootEventBaseCnv.

Definition at line 39 of file EventCnv.h.

39{return StatusCode::SUCCESS;}

◆ TObjectToDataObject()

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

do the concrete transformation from ROOT to TDS

Implements RootEventBaseCnv.

Definition at line 47 of file EventCnv.h.

47{return StatusCode::SUCCESS;}

Friends And Related Function Documentation

◆ CnvFactory< EventCnv >

friend class CnvFactory< EventCnv >
friend

Definition at line 10 of file EventCnv.h.

Member Data Documentation

◆ m_common

commonData EventCnv::m_common
protected

Definition at line 49 of file EventCnv.h.

Referenced by createObj().


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