CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataHltCnv Class Reference

#include <RawDataHltCnv.h>

+ Inheritance diagram for RawDataHltCnv:

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

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

Friends

class CnvFactory< RawDataHltCnv >
 

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 31 of file RawDataHltCnv.h.

Constructor & Destructor Documentation

◆ RawDataHltCnv()

RawDataHltCnv::RawDataHltCnv ( ISvcLocator * svc)
protected

Definition at line 28 of file RawDataHltCnv.cxx.

28 :
30{
31 //init();
32}
unsigned const long PACKEDRAWEVENT_StorageType
RawDataBaseCnv(ISvcLocator *svc)
static const CLID & classID()

Member Function Documentation

◆ classID()

const CLID & RawDataHltCnv::classID ( )
static

Definition at line 36 of file RawDataHltCnv.cxx.

37{
38 return CLID_HltEvent;
39}
const CLID & CLID_HltEvent

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

◆ createObj()

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

Definition at line 104 of file RawDataHltCnv.cxx.

105{
106 //MsgStream log(msgSvc(), "RawDataHltCnv");
107 //RawDataAddress *pEFAddr;
108
109 // Purpose and Method: This converter will create an empty EventHeader on
110 // the TDS.
111 HltEvent *digi = new HltEvent();
112 // Set fromMc to false
113 digi->initialize(false);
114 pObj = digi;
115 return StatusCode::SUCCESS;
116
117}
void initialize(bool fromMc)
Definition HltEvent.h:13

◆ createRep()

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

Definition at line 119 of file RawDataHltCnv.cxx.

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

◆ initialize()

StatusCode RawDataHltCnv::initialize ( )

Definition at line 41 of file RawDataHltCnv.cxx.

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

◆ repSvcType()

virtual long RawDataHltCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

Definition at line 45 of file RawDataHltCnv.h.

45 {
47 }

◆ storageType()

static const unsigned char RawDataHltCnv::storageType ( )
inlinestatic

Definition at line 49 of file RawDataHltCnv.h.

49 {
51 }

◆ updateObj()

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

override the RawDataBaseCnv version

Definition at line 94 of file RawDataHltCnv.cxx.

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

Friends And Related Symbol Documentation

◆ CnvFactory< RawDataHltCnv >

friend class CnvFactory< RawDataHltCnv >
friend

Definition at line 1 of file RawDataHltCnv.h.


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