BOSS 7.0.3
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.
 
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

 RawDataHltCnv (ISvcLocator *svc)
 
 RawDataHltCnv (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< RawDataHltCnv >
 

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

◆ RawDataHltCnv() [1/2]

RawDataHltCnv::RawDataHltCnv ( ISvcLocator *  svc)
protected

◆ RawDataHltCnv() [2/2]

RawDataHltCnv::RawDataHltCnv ( ISvcLocator *  svc)
protected

Member Function Documentation

◆ classID() [1/2]

const CLID & RawDataHltCnv::classID ( )
static

Definition at line 36 of file RawDataHltCnv.cxx.

37{
38 return CLID_HltEvent;
39}
const CLID & CLID_HltEvent
Definition: EventModel.cxx:283

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

◆ classID() [2/2]

static const CLID & RawDataHltCnv::classID ( )
static

◆ createObj() [1/2]

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}

◆ createObj() [2/2]

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

◆ createRep() [1/2]

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}

◆ createRep() [2/2]

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

◆ initialize() [1/2]

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()

◆ initialize() [2/2]

StatusCode RawDataHltCnv::initialize ( )

◆ repSvcType() [1/2]

virtual long RawDataHltCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

Definition at line 45 of file Event/RawDataCnv/RawDataCnv-00-04-37/RawDataCnv/RawDataHltCnv.h.

45 {
47 }

◆ repSvcType() [2/2]

virtual long RawDataHltCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

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

45 {
47 }

◆ storageType() [1/2]

static const unsigned char RawDataHltCnv::storageType ( )
inlinestatic

◆ storageType() [2/2]

static const unsigned char RawDataHltCnv::storageType ( )
inlinestatic

◆ updateObj() [1/2]

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}

◆ updateObj() [2/2]

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

override the RawDataBaseCnv version

Friends And Related Function Documentation

◆ CnvFactory< RawDataHltCnv >


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