CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
LumiDigiCnv Class Reference

#include <LumiDigiCnv.h>

+ Inheritance diagram for LumiDigiCnv:

Public Member Functions

virtual ~LumiDigiCnv ()
 
virtual ~LumiDigiCnv ()
 
virtual ~LumiDigiCnv ()
 
- 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
 
 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
 
 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
 
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.
 

Protected Member Functions

 LumiDigiCnv (ISvcLocator *svc)
 
virtual StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 transformation to root
 
virtual StatusCode TObjectToDataObject (DataObject *&obj)
 transformation from root
 
 LumiDigiCnv (ISvcLocator *svc)
 
virtual StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 transformation to root
 
virtual StatusCode TObjectToDataObject (DataObject *&obj)
 transformation from root
 
 LumiDigiCnv (ISvcLocator *svc)
 
virtual StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 transformation to root
 
virtual StatusCode TObjectToDataObject (DataObject *&obj)
 transformation from root
 
- Protected Member Functions inherited from Converter< Ty1, Ty2 >
virtual destinationconvert (const source &) const =0
 
virtual destinationconvert (const source &) const =0
 

Friends

class CnvFactory< LumiDigiCnv >
 

Additional Inherited Members

- Public Types inherited from Converter< Ty1, Ty2 >
typedef Ty1 source
 
typedef Ty2 destination
 
typedef Ty1 source
 
typedef Ty2 destination
 
- 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
 

Detailed Description

Constructor & Destructor Documentation

◆ ~LumiDigiCnv() [1/3]

virtual LumiDigiCnv::~LumiDigiCnv ( )
inlinevirtual

◆ LumiDigiCnv() [1/3]

LumiDigiCnv::LumiDigiCnv ( ISvcLocator *  svc)
protected

Definition at line 14 of file bak_RootCnvSvc-04-01-14/src/Digi/LumiDigiCnv.cxx.

16{
17 m_rootBranchname = "m_lumiDigiCol";
18
19 m_adresses.push_back(&m_lumiDigiCol);
20 m_lumiDigiCol = 0;
21}
std::vector< void * > m_adresses
each converter knows the corresponding adresses
std::string m_rootBranchname
root branchname (may be concatenated of severals)

◆ ~LumiDigiCnv() [2/3]

virtual LumiDigiCnv::~LumiDigiCnv ( )
inlinevirtual

◆ LumiDigiCnv() [2/3]

LumiDigiCnv::LumiDigiCnv ( ISvcLocator *  svc)
protected

◆ ~LumiDigiCnv() [3/3]

virtual LumiDigiCnv::~LumiDigiCnv ( )
inlinevirtual

◆ LumiDigiCnv() [3/3]

LumiDigiCnv::LumiDigiCnv ( ISvcLocator *  svc)
protected

Member Function Documentation

◆ classID() [1/3]

static const CLID & LumiDigiCnv::classID ( )
inlinestatic

Definition at line 20 of file Event/RootCnvSvc/bak_RootCnvSvc-04-01-14/RootCnvSvc/Digi/LumiDigiCnv.h.

21 {
22 return CLID_LumiDigiCol;
23 }
const CLID & CLID_LumiDigiCol
Definition: EventModel.cxx:274

◆ classID() [2/3]

static const CLID & LumiDigiCnv::classID ( )
inlinestatic

◆ classID() [3/3]

static const CLID & LumiDigiCnv::classID ( )
inlinestatic

Definition at line 20 of file InstallArea/include/RootCnvSvc/RootCnvSvc/Digi/LumiDigiCnv.h.

21 {
22 return CLID_LumiDigiCol;
23 }

◆ DataObjectToTObject() [1/3]

StatusCode LumiDigiCnv::DataObjectToTObject ( DataObject *  obj,
RootAddress addr 
)
protectedvirtual

transformation to root

Implements RootEventBaseCnv.

Definition at line 52 of file bak_RootCnvSvc-04-01-14/src/Digi/LumiDigiCnv.cxx.

52 {
53
54 MsgStream log(msgSvc(), "LumiDigiCnv");
55 log << MSG::DEBUG << "LumiDigiCnv::DataObjectToTObject" << endreq;
56 StatusCode sc = StatusCode::SUCCESS;
57
58 LumiDigiCol* lumiDigiColTds = dynamic_cast<LumiDigiCol*>(obj);
59 if ( !lumiDigiColTds ) {
60 log << MSG::ERROR << "Could not downcast to LumiDigiCol" << endreq;
61 return StatusCode::FAILURE;
62 }
63
64 DataObject* evt;
65 m_eds->findObject(EventModel::Digi::Event, evt);
66 if ( evt == NULL ) {
67 log << MSG::ERROR << "Could not get DigiEvent in TDS" << endreq;
68 return StatusCode::FAILURE;
69 }
70 DigiEvent* devtTds = dynamic_cast<DigiEvent*>(evt);
71 if ( !devtTds ) {
72 log << MSG::ERROR << "LumiDigiCnv: Could not downcast to TDS DigiEvent" << endreq;
73 }
74 IOpaqueAddress* addr;
75
76 m_cnvSvc->getDigiCnv()->createRep(evt, addr);
77
79
80 const TObjArray* m_lumiDigiCol = recEvt->getLumiDigiCol();
81 if ( !m_lumiDigiCol ) return sc;
82 recEvt->clearLumiDigiCol();
83 LumiDigiCol::const_iterator lumiDigiTds;
84
85 for (lumiDigiTds = lumiDigiColTds->begin(); lumiDigiTds != lumiDigiColTds->end(); ++lumiDigiTds) {
86 TLumiDigi* lumiDigiRoot = new TLumiDigi();
87
88 lumiDigiRoot->initialize((*lumiDigiTds)->getIntId(),
89 (*lumiDigiTds)->getTimeChannel(), (*lumiDigiTds)->getChargeChannel());
90 lumiDigiRoot->setOverflow( (*lumiDigiTds)->getOverflow() );
91
92 recEvt->addLumiDigi(lumiDigiRoot);
93 }
94
95 return sc;
96}
ObjectVector< LumiDigi > LumiDigiCol
static TDigiEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void addLumiDigi(TLumiDigi *digi)
Add a LumiDigi into the MUC Data collection.
const TObjArray * getLumiDigiCol() const
retrieve the whole TObjArray of LumiDigi Data
void setOverflow(const UInt_t overflow)
void initialize(UInt_t id, UInt_t time=0, UInt_t charge=0)

◆ DataObjectToTObject() [2/3]

virtual StatusCode LumiDigiCnv::DataObjectToTObject ( DataObject *  obj,
RootAddress addr 
)
protectedvirtual

transformation to root

Implements RootEventBaseCnv.

◆ DataObjectToTObject() [3/3]

virtual StatusCode LumiDigiCnv::DataObjectToTObject ( DataObject *  obj,
RootAddress addr 
)
protectedvirtual

transformation to root

Implements RootEventBaseCnv.

◆ TObjectToDataObject() [1/3]

StatusCode LumiDigiCnv::TObjectToDataObject ( DataObject *&  obj)
protectedvirtual

transformation from root

Implements RootEventBaseCnv.

Definition at line 23 of file bak_RootCnvSvc-04-01-14/src/Digi/LumiDigiCnv.cxx.

23 {
24 // creation of TDS object from root object
25
26 MsgStream log(msgSvc(), "LumiDigiCnv");
27 log << MSG::DEBUG << "LumiDigiCnv::TObjectToDataObject" << endreq;
28 StatusCode sc = StatusCode::SUCCESS;
29
30 LumiDigiCol* lumiDigiTdsCol = new LumiDigiCol;
31 refpObject = lumiDigiTdsCol;
32
33 if ( !m_lumiDigiCol ) return sc;
34 TIter lumiDigiIter(m_lumiDigiCol);
35 TLumiDigi* lumiDigiRoot = 0;
36 while ((lumiDigiRoot = (TLumiDigi*)lumiDigiIter.Next())) {
37 LumiDigi* lumiDigiTds = new LumiDigi( lumiDigiRoot->getIntId() );
38 m_common.m_rootLumiDigiMap[lumiDigiRoot] = lumiDigiTds;
39
40 lumiDigiTds->setTimeChannel( lumiDigiRoot->getTimeChannel() );
41 lumiDigiTds->setChargeChannel( lumiDigiRoot->getChargeChannel() );
42 lumiDigiTds->setOverflow( lumiDigiRoot->getOverflow() );
43
44 lumiDigiTdsCol->push_back(lumiDigiTds);
45 }
46
47 delete m_lumiDigiCol;
48 m_lumiDigiCol = 0;
49 return sc;
50}
void setOverflow(const unsigned int overflow)
void setChargeChannel(const unsigned int chargeChannel)
Definition: RawData.cxx:30
void setTimeChannel(const unsigned int timeChannel)
Definition: RawData.cxx:25
static std::map< const TObject *, const LumiDigi * > m_rootLumiDigiMap

◆ TObjectToDataObject() [2/3]

virtual StatusCode LumiDigiCnv::TObjectToDataObject ( DataObject *&  obj)
protectedvirtual

transformation from root

Implements RootEventBaseCnv.

◆ TObjectToDataObject() [3/3]

virtual StatusCode LumiDigiCnv::TObjectToDataObject ( DataObject *&  obj)
protectedvirtual

transformation from root

Implements RootEventBaseCnv.

Friends And Related Function Documentation

◆ CnvFactory< LumiDigiCnv >


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