BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataBaseCnv Class Reference

#include <RawDataBaseCnv.h>

+ Inheritance diagram for RawDataBaseCnv:

Public Member Functions

 RawDataBaseCnv (ISvcLocator *svc)
 
 RawDataBaseCnv (unsigned char storageType, const CLID &clid, ISvcLocator *svc)
 
virtual ~RawDataBaseCnv ()
 
virtual long repSvcType () const
 
StatusCode initialize ()
 
virtual StatusCode finalize ()
 
void declareObject (const std::string &fullPath, const CLID &clid, const std::string &bank, long par=0)
 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 updateRep (IOpaqueAddress *pAddress, DataObject *pObject)
 Update the converted representation of a transient object.
 
virtual StatusCode updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Update the references of an already converted object.
 
- Public Member Functions inherited from Converter< Ty1, Ty2 >
destinationoperator (const source &) const
 

Static Public Member Functions

static const long storageType ()
 
static const CLID & classID ()
 

Protected Attributes

IRawDataCnvSvcm_CnvSvc
 Pointer to event conversion service interface.
 
std::vector< IRawDataCnvSvc::Leafm_leaves
 Leaf objects giving the locations of the objects in the data store.
 

Additional Inherited Members

- Public Types inherited from Converter< Ty1, Ty2 >
typedef Ty1 source
 
typedef Ty2 destination
 
- Protected Member Functions inherited from Converter< Ty1, Ty2 >
virtual destinationconvert (const source &) const =0
 

Detailed Description

class RawDataBaseCnv brief Base class for all GLAST EBF Converters.

Based on GLAST's EbfBaseCnv

Definition at line 25 of file RawDataBaseCnv.h.

Constructor & Destructor Documentation

◆ RawDataBaseCnv() [1/2]

RawDataBaseCnv::RawDataBaseCnv ( ISvcLocator *  svc)

Definition at line 15 of file RawDataBaseCnv.cxx.

16: Converter(Test_StorageType, classID(), svc)
17 , m_CnvSvc(0)
18{}
static const CLID & classID()
IRawDataCnvSvc * m_CnvSvc
Pointer to event conversion service interface.

◆ RawDataBaseCnv() [2/2]

RawDataBaseCnv::RawDataBaseCnv ( unsigned char  storageType,
const CLID &  clid,
ISvcLocator *  svc 
)

Definition at line 10 of file RawDataBaseCnv.cxx.

11 : Converter((long)storageType, clid, svc), m_CnvSvc(0)
12{}
static const long storageType()

◆ ~RawDataBaseCnv()

virtual RawDataBaseCnv::~RawDataBaseCnv ( )
inlinevirtual

Definition at line 37 of file RawDataBaseCnv.h.

37{ };

Member Function Documentation

◆ classID()

static const CLID & RawDataBaseCnv::classID ( )
inlinestatic

Definition at line 43 of file RawDataBaseCnv.h.

43{return CLID_EmcDigiCol;};
const CLID & CLID_EmcDigiCol
Definition: EventModel.cxx:238

◆ createRep()

StatusCode RawDataBaseCnv::createRep ( DataObject *  pObject,
IOpaqueAddress *&  refpAddress 
)
virtual

Convert the transient object to the requested representation.

Reimplemented in RawDataCnv, RawDataDigiCnv, RawDataEmcDigiCnv, RawDataEmcMcHitCnv, RawDataHltCnv, RawDataHltRawCnv, RawDataLumiDigiCnv, RawDataMcCnv, RawDataMcParticleCnv, RawDataMdcDigiCnv, RawDataMdcMcHitCnv, RawDataMucDigiCnv, RawDataMucMcHitCnv, RawDataTofDigiCnv, RawDataTofMcHitCnv, RawDataTrigCnv, RawDataTrigGTDCnv, and RawDataZddEventCnv.

Definition at line 21 of file RawDataBaseCnv.cxx.

22 {
23 // Purpose and Method: Convert the transient object to the requested
24 // representation. It is expected that derived classes will override
25 // this method.
26 return StatusCode::SUCCESS;
27}

◆ declareObject()

void RawDataBaseCnv::declareObject ( const std::string &  fullPath,
const CLID &  clid,
const std::string &  bank,
long  par = 0 
)

Store TDS path to link a particular converter to an object on the TDS.

Definition at line 81 of file RawDataBaseCnv.cxx.

82 {
83 // Purpose and Method: Save the path on the TDS, in the m_leaves vector,
84 // corresponding to the DataObject that the converter handles.
85 // m_leaves.push_back(IRawDataCnvSvc::Leaf(path, cl, bank, par));
86}

◆ fillRepRefs()

StatusCode RawDataBaseCnv::fillRepRefs ( IOpaqueAddress *  pAddress,
DataObject *  pObject 
)
virtual

Resolve the references of the converted object.

Definition at line 29 of file RawDataBaseCnv.cxx.

30 {
31 // Purpose and Method: Resolve the references of the converted object.
32 // It is expected that derived classes will override this method.
33 return StatusCode::SUCCESS;
34}

◆ finalize()

StatusCode RawDataBaseCnv::finalize ( )
virtual

Definition at line 73 of file RawDataBaseCnv.cxx.

73 {
74 if ( m_CnvSvc ) {
75 m_CnvSvc->release();
76 m_CnvSvc = 0;
77 }
78 return Converter::finalize();
79}

◆ initialize()

StatusCode RawDataBaseCnv::initialize ( )

Definition at line 50 of file RawDataBaseCnv.cxx.

50 {
51 // Purpose and Method: Perform standard converter initialization.
52 // Access the EventCnvSvc to create an association between converters
53 // and paths within the TDS, using the vector of leaves and the
54 // declareObject methods available in each specific converter.
55 StatusCode status = Converter::initialize();
56 /*
57 if ( status.isSuccess() ) {
58 IService* isvc = 0;
59 status = serviceLocator()->service(cnvSvcName, isvc, true);
60 if ( status.isSuccess() ) {
61 status = isvc->queryInterface(IID_IRawDataBaseCnv, (void**)&m_CnvSvc);
62 if ( status.isSuccess() ) {
63 for ( std::vector<IRawDataCnvSvc::Leaf>::iterator i = m_leaves.begin(); i != m_leaves.end(); i++ ) {
64 m_CnvSvc->declareObject(*i);
65 }
66 }
67 }
68 }
69 */
70 return status;
71}

Referenced by RawDataTrigCnv::init(), RawDataTrigGTDCnv::init(), RawDataCnv::initialize(), RawDataDigiCnv::initialize(), RawDataEmcDigiCnv::initialize(), RawDataEmcMcHitCnv::initialize(), RawDataEvtHeaderCnv::initialize(), RawDataHltCnv::initialize(), RawDataHltRawCnv::initialize(), RawDataLumiDigiCnv::initialize(), RawDataMcCnv::initialize(), RawDataMcParticleCnv::initialize(), RawDataMdcDigiCnv::initialize(), RawDataMdcMcHitCnv::initialize(), RawDataMucDigiCnv::initialize(), RawDataMucMcHitCnv::initialize(), RawDataTofDigiCnv::initialize(), RawDataTofMcHitCnv::initialize(), and RawDataZddEventCnv::initialize().

◆ repSvcType()

◆ storageType()

static const long RawDataBaseCnv::storageType ( )
inlinestatic

Definition at line 41 of file RawDataBaseCnv.h.

41{ return Test_StorageType; }

◆ updateRep()

StatusCode RawDataBaseCnv::updateRep ( IOpaqueAddress *  pAddress,
DataObject *  pObject 
)
virtual

Update the converted representation of a transient object.

Definition at line 36 of file RawDataBaseCnv.cxx.

37 {
38 // Purpose and Method: Update the converted representation of a transient
39 // object. It is expected that derived classes will override this.
40 return StatusCode::SUCCESS;
41}

◆ updateRepRefs()

StatusCode RawDataBaseCnv::updateRepRefs ( IOpaqueAddress *  pAddress,
DataObject *  pObject 
)
virtual

Update the references of an already converted object.

Definition at line 43 of file RawDataBaseCnv.cxx.

44 {
45 // Purpose and Method: Update the references of an already converted object.
46 // It is expected that derived classes will override this method.
47 return StatusCode::SUCCESS;
48}

Member Data Documentation

◆ m_CnvSvc

IRawDataCnvSvc* RawDataBaseCnv::m_CnvSvc
protected

Pointer to event conversion service interface.

Definition at line 28 of file RawDataBaseCnv.h.

Referenced by finalize().

◆ m_leaves

std::vector<IRawDataCnvSvc::Leaf> RawDataBaseCnv::m_leaves
protected

Leaf objects giving the locations of the objects in the data store.

Definition at line 30 of file RawDataBaseCnv.h.


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