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

#include <RawDataMcCnv.h>

+ Inheritance diagram for RawDataMcCnv:

Public Member Functions

StatusCode initialize ()
 
virtual long repSvcType () const
 
StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj)
 
virtual StatusCode updateObj (IOpaqueAddress *, DataObject *)
 override the RawDataBaseCnv version
 
virtual StatusCode createRep (DataObject *pObj, IOpaqueAddress *&pAddr)
 Convert the transient object to the requested representation.
 
StatusCode initialize ()
 
virtual long repSvcType () const
 
StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj)
 
virtual StatusCode updateObj (IOpaqueAddress *, DataObject *)
 override the RawDataBaseCnv version
 
virtual StatusCode createRep (DataObject *pObj, IOpaqueAddress *&pAddr)
 Convert the transient object to the requested representation.
 
- Public Member Functions inherited from RawDataBaseCnv
 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.
 
 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
 
destinationoperator (const source &) const
 

Static Public Member Functions

static const CLID & classID ()
 
static const unsigned char storageType ()
 
static const CLID & classID ()
 
static const unsigned char storageType ()
 
- Static Public Member Functions inherited from RawDataBaseCnv
static const long storageType ()
 
static const CLID & classID ()
 
static const long storageType ()
 
static const CLID & classID ()
 

Protected Member Functions

 RawDataMcCnv (ISvcLocator *svc)
 
 RawDataMcCnv (ISvcLocator *svc)
 
- Protected Member Functions inherited from Converter< Ty1, Ty2 >
virtual destinationconvert (const source &) const =0
 
virtual destinationconvert (const source &) const =0
 

Friends

class CnvFactory< RawDataMcCnv >
 

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 RawDataBaseCnv
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.
 

Detailed Description

Constructor & Destructor Documentation

◆ RawDataMcCnv() [1/2]

RawDataMcCnv::RawDataMcCnv ( ISvcLocator *  svc)
protected

◆ RawDataMcCnv() [2/2]

RawDataMcCnv::RawDataMcCnv ( ISvcLocator *  svc)
protected

Member Function Documentation

◆ classID() [1/2]

const CLID & RawDataMcCnv::classID ( )
static

Definition at line 35 of file RawDataMcCnv.cxx.

36{
37 return CLID_McEvent;
38}
const CLID & CLID_McEvent
Definition: EventModel.cxx:224

Referenced by PackedRawDataCnvSvc::addConverters(), and createRep().

◆ classID() [2/2]

static const CLID & RawDataMcCnv::classID ( )
static

◆ createObj() [1/2]

StatusCode RawDataMcCnv::createObj ( IOpaqueAddress *  pAddr,
DataObject *&  pObj 
)

Definition at line 105 of file RawDataMcCnv.cxx.

106{
107 //MsgStream log(msgSvc(), "RawDataMcCnv");
108
109 McEvent *mcEvent = new McEvent;
110 pObj = mcEvent;
111
112 return StatusCode::SUCCESS;
113
114}

◆ createObj() [2/2]

StatusCode RawDataMcCnv::createObj ( IOpaqueAddress *  pAddr,
DataObject *&  pObj 
)

◆ createRep() [1/2]

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

Definition at line 116 of file RawDataMcCnv.cxx.

117{
118 // convert PixelRaw in the container into ByteStream
119 //MsgStream log(messageService(), "RawDataMcCnv");
120
121 std::string nm = pObj->registry()->name();
122
123 RawDataAddress* addr = new RawDataAddress(classID(), nm, "");
124
125 pAddr = addr;
126
127 return StatusCode::SUCCESS;
128}

◆ createRep() [2/2]

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

◆ initialize() [1/2]

StatusCode RawDataMcCnv::initialize ( )

Definition at line 40 of file RawDataMcCnv.cxx.

41{
42 std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc");
43 std::string RawDataInputSvc_Name("RawDataInputSvc");
44 std::string RawDataMcCnv_Name("RawDataMcCnv");
45
46 // for Mutil-thread by tianhl
47 //ConversionSvc* pCnvSvc = 0;
48 //if (pCnvSvc = dynamic_cast<ConversionSvc*>(conversionSvc())){
49 SmartIF<IService> pCnvSvc(conversionSvc());
50 if (isGaudiThreaded(pCnvSvc->name())){
51 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
52 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
53 RawDataMcCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
54 }
55 //}
56
57
58 MsgStream log(messageService(), RawDataMcCnv_Name.c_str());
59
60 StatusCode sc = RawDataBaseCnv::initialize();
61 if (StatusCode::SUCCESS != sc) {
62 log << MSG::ERROR << "RawDataBaseCnv: Cant initialize PackedRawDataCnvSvc" << endreq;
63 return sc;
64 }
65
66 // Check RawDataCnvSvc
67 IService* isvc = 0;
68 sc = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc, true);
69 if (sc != StatusCode::SUCCESS) {
70 log << MSG::ERROR << "Cant get PackedRawDataCnvSvc" << endreq;
71 }
72
73 m_RawDataAccess = dynamic_cast<PackedRawDataCnvSvc*> (isvc);
74 if (m_RawDataAccess == 0 ) {
75 log << MSG::ERROR << "RawDataMdcCnv: Cant cast to RawDataCnvSvc " << endreq;
76 return StatusCode::FAILURE;
77 }
78
79 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), isvc);
80 if (sc != StatusCode::SUCCESS ) {
81 log << MSG::WARNING << "Cant get RawDataInputSvc " << endreq;
82 return sc ;
83 }
84
85 m_inputSvc = dynamic_cast<RawDataInputSvc*> (isvc);
86 if (m_inputSvc == 0 ) {
87 log << MSG::ERROR << "Cant cast to RawDataInputSvc " << endreq;
88 return StatusCode::FAILURE ;
89 }
90
91 return StatusCode::SUCCESS;
92}
StatusCode initialize()

◆ initialize() [2/2]

StatusCode RawDataMcCnv::initialize ( )

◆ repSvcType() [1/2]

virtual long RawDataMcCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

Definition at line 45 of file Event/RawDataCnv/RawDataCnv-00-04-29-tag/RawDataCnv/RawDataMcCnv.h.

45 {
47 }

◆ repSvcType() [2/2]

virtual long RawDataMcCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

Definition at line 45 of file InstallArea/include/RawDataCnv/RawDataCnv/RawDataMcCnv.h.

45 {
47 }

◆ storageType() [1/2]

static const unsigned char RawDataMcCnv::storageType ( )
inlinestatic

◆ storageType() [2/2]

static const unsigned char RawDataMcCnv::storageType ( )
inlinestatic

◆ updateObj() [1/2]

StatusCode RawDataMcCnv::updateObj ( IOpaqueAddress *  pAddr,
DataObject *  pObj 
)
virtual

override the RawDataBaseCnv version

Definition at line 95 of file RawDataMcCnv.cxx.

95 {
96 // Purpose and Method: This method does nothing other than announce it has
97 // been called.
98
99 //MsgStream log(msgSvc(), "RawDataMcCnv");
100 //log << MSG::DEBUG << "RawDataMcCnv::updateObj" << endreq;
101 return Converter::updateObj(pAddr, pObj);
102}

◆ updateObj() [2/2]

virtual StatusCode RawDataMcCnv::updateObj ( IOpaqueAddress *  ,
DataObject *   
)
virtual

override the RawDataBaseCnv version

Friends And Related Function Documentation

◆ CnvFactory< RawDataMcCnv >


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