BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataDigiCnv Class Reference

#include <RawDataDigiCnv.h>

+ Inheritance diagram for RawDataDigiCnv:

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.
 
- Public Member Functions inherited from RawDataBaseCnv
 RawDataBaseCnv (ISvcLocator *svc)
 
 RawDataBaseCnv (unsigned char storageType, const CLID &clid, ISvcLocator *svc)
 
virtual ~RawDataBaseCnv ()
 
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 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 CLID & classID ()
 
static const unsigned char storageType ()
 
- Static Public Member Functions inherited from RawDataBaseCnv
static const long storageType ()
 
static const CLID & classID ()
 

Protected Member Functions

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

Friends

class CnvFactory< RawDataDigiCnv >
 

Additional Inherited Members

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

Definition at line 29 of file RawDataDigiCnv.h.

Constructor & Destructor Documentation

◆ RawDataDigiCnv()

RawDataDigiCnv::RawDataDigiCnv ( ISvcLocator * svc)
protected

Definition at line 31 of file RawDataDigiCnv.cxx.

31 :
33{
34 //init();
35}
unsigned const long PACKEDRAWEVENT_StorageType
RawDataBaseCnv(ISvcLocator *svc)
static const CLID & classID()

Member Function Documentation

◆ classID()

const CLID & RawDataDigiCnv::classID ( )
static

Definition at line 39 of file RawDataDigiCnv.cxx.

40{
41 return CLID_DigiEvent;
42}
const CLID & CLID_DigiEvent
Raw event and Digi IDs.

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

◆ createObj()

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

Definition at line 108 of file RawDataDigiCnv.cxx.

109{
110 MsgStream log(msgSvc(), "RawDataDigiCnv");
111 //RawDataAddress *pEFAddr;
112
113 // Purpose and Method: This converter will create an empty EventHeader on
114 // the TDS.
115 DigiEvent *digi = new DigiEvent();
116 // Set fromMc to false
117 digi->initialize(false);
118 pObj = digi;
119 return StatusCode::SUCCESS;
120
121}
IMessageSvc * msgSvc()
void initialize(bool fromMc)
Definition DigiEvent.h:30

◆ createRep()

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

Definition at line 123 of file RawDataDigiCnv.cxx.

124{
125 // convert Raws in the container into ByteStream
126 StatusCode sc = StatusCode::SUCCESS ;
127 //MsgStream log(messageService(), "RawDataDigiCnv");
128
129 //WriteRawEvent* re = static_cast<WriteRawEvent*>(m_RawDataAccess->getRawEvent());
130
131
132 std::string nm = pObj->registry()->name();
133
134 RawDataAddress* addr = new RawDataAddress(classID(), nm, "");
135
136 pAddr = addr;
137
138 return StatusCode::SUCCESS;
139
140}

◆ initialize()

StatusCode RawDataDigiCnv::initialize ( )

Definition at line 44 of file RawDataDigiCnv.cxx.

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

◆ repSvcType()

virtual long RawDataDigiCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

Definition at line 43 of file RawDataDigiCnv.h.

43 {
45 }

◆ storageType()

static const unsigned char RawDataDigiCnv::storageType ( )
inlinestatic

Definition at line 47 of file RawDataDigiCnv.h.

47 {
49 }

◆ updateObj()

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

override the RawDataBaseCnv version

Definition at line 98 of file RawDataDigiCnv.cxx.

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

Friends And Related Symbol Documentation

◆ CnvFactory< RawDataDigiCnv >

friend class CnvFactory< RawDataDigiCnv >
friend

Definition at line 1 of file RawDataDigiCnv.h.


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