BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
RecZddChannelCnv Class Reference

#include <RecZddChannelCnv.h>

+ Inheritance diagram for RecZddChannelCnv:

Public Member Functions

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

Protected Member Functions

 RecZddChannelCnv (ISvcLocator *svc)
 
virtual StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 transformation to root
 
virtual StatusCode TObjectToDataObject (DataObject *&obj)
 transformation from root
 
 RecZddChannelCnv (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< RecZddChannelCnv >
 

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

◆ ~RecZddChannelCnv() [1/2]

virtual RecZddChannelCnv::~RecZddChannelCnv ( )
inlinevirtual

◆ RecZddChannelCnv() [1/2]

RecZddChannelCnv::RecZddChannelCnv ( ISvcLocator *  svc)
protected

Definition at line 8 of file RecZddChannelCnv.cxx.

10{
11 m_rootBranchname = "m_recZddChannelCol";
12 m_adresses.push_back(&m_recZddChannelCol);
13 m_recZddChannelCol = 0;
14}
std::vector< void * > m_adresses
each converter knows the corresponding adresses
std::string m_rootBranchname
root branchname (may be concatenated of severals)

◆ ~RecZddChannelCnv() [2/2]

virtual RecZddChannelCnv::~RecZddChannelCnv ( )
inlinevirtual

◆ RecZddChannelCnv() [2/2]

RecZddChannelCnv::RecZddChannelCnv ( ISvcLocator *  svc)
protected

Member Function Documentation

◆ classID() [1/2]

static const CLID & RecZddChannelCnv::classID ( )
inlinestatic

Definition at line 20 of file Event/RootCnvSvc/RootCnvSvc-03-00-06/RootCnvSvc/Rec/RecZddChannelCnv.h.

20{ return CLID_RecZddChannelCol; }
const CLID & CLID_RecZddChannelCol
Definition: EventModel.cxx:367

◆ classID() [2/2]

static const CLID & RecZddChannelCnv::classID ( )
inlinestatic

◆ DataObjectToTObject() [1/2]

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

transformation to root

Implements RootEventBaseCnv.

Definition at line 49 of file RecZddChannelCnv.cxx.

50{
51 MsgStream log(msgSvc(), "RecZddChannelCnv");
52 log << MSG::DEBUG << "RecZddChannelCnv::DataObjectToTObject" << endreq;
53
54 RecZddChannelCol* zddCol = dynamic_cast<RecZddChannelCol*>(obj);
55 if ( ! zddCol ) {
56 log << MSG::ERROR << "Could not downcast to RecZddChannelCol" << endreq;
57 return StatusCode::FAILURE;
58 }
59
60 DataObject* evt;
61 m_eds->findObject(EventModel::Recon::Event, evt);
62 if ( evt == NULL ) {
63 log << MSG::ERROR << "Could not get ReconEvent in TDS" << endreq;
64 return StatusCode::FAILURE;
65 }
66 IOpaqueAddress *addr;
67 m_cnvSvc->getRecTrackCnv()->createRep(evt, addr);
69
70 const TObjArray* m_recZddChannelCol = recEvt->getRecZddChannelCol();
71 if ( ! m_recZddChannelCol ) return StatusCode::SUCCESS;
72
73 //convert
74 recEvt->clearRecZddChannelCol();
75 RecZddChannelCol::const_iterator zdd = zddCol->begin();
76
77 for ( ; zdd != zddCol->end(); ++zdd ) {
78 RecZddChannel* pzdd = *zdd;
79 TRecZddChannel* zddRoot = new TRecZddChannel();
80
81 zddRoot->setChannelId(pzdd->channelId());
82 zddRoot->setBaseLine(pzdd->baseLine());
83 zddRoot->setPhase(pzdd->phase());
84 zddRoot->setFragments(pzdd->fragments());
85
86 recEvt->addRecZddChannel(zddRoot);
87 }
88
89 return StatusCode::SUCCESS;
90}
ObjectVector< RecZddChannel > RecZddChannelCol
static TRecTrackEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
const std::vector< FragType > & fragments() const
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void addRecZddChannel(TRecZddChannel *dtag)

◆ DataObjectToTObject() [2/2]

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

transformation to root

Implements RootEventBaseCnv.

◆ TObjectToDataObject() [1/2]

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

transformation from root

Implements RootEventBaseCnv.

Definition at line 16 of file RecZddChannelCnv.cxx.

17{
18 MsgStream log(msgSvc(), "RecZddChannelCnv");
19 log << MSG::DEBUG << "RecZddChannelCnv::TObjectToDataObject" << endreq;
20
22 refpObject = zddCol;
23
24 if ( ! m_recZddChannelCol ) return StatusCode::SUCCESS;
25
26 // convert
27 TIter zddIter(m_recZddChannelCol);
28 TRecZddChannel* zddRoot = 0;
29 while ( (zddRoot = (TRecZddChannel*)zddIter.Next()) ) {
30 RecZddChannel* zddTDS = new RecZddChannel;
31 m_common.m_rootRecZddChannelMap[zddRoot] = zddTDS;
32
33 // settings
34 zddTDS->setChannelId(zddRoot->channelId());
35 zddTDS->setScanCode(zddRoot->scanCode());
36 zddTDS->setBaseLine(zddRoot->baseLine());
37 zddTDS->setPhase(zddRoot->phase());
38 zddTDS->setFragments(zddRoot->fragments());
39
40 zddCol->push_back(zddTDS);
41 }
42
43 delete m_recZddChannelCol;
44 m_recZddChannelCol = 0;
45
46 return StatusCode::SUCCESS;
47}
void setFragments(const std::vector< FragType > &frags)
static std::map< const TObject *, const RecZddChannel * > m_rootRecZddChannelMap

◆ TObjectToDataObject() [2/2]

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

transformation from root

Implements RootEventBaseCnv.

Friends And Related Function Documentation

◆ CnvFactory< RecZddChannelCnv >


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