BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataTrigCnv Class Reference

#include <RawDataTrigCnv.h>

+ Inheritance diagram for RawDataTrigCnv:

Public Member Functions

StatusCode init ()
 
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.
 
- 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

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

Friends

class CnvFactory< RawDataTrigCnv >
 

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 17 of file RawDataTrigCnv.h.

Constructor & Destructor Documentation

◆ RawDataTrigCnv()

RawDataTrigCnv::RawDataTrigCnv ( ISvcLocator *  svc)
protected

Definition at line 12 of file RawDataTrigCnv.cxx.

12 :
14{
15 init();
16}
unsigned const long PACKEDRAWEVENT_StorageType
Definition: ClassID_temp.h:17
static const CLID & classID()
StatusCode init()

Member Function Documentation

◆ classID()

const CLID & RawDataTrigCnv::classID ( )
static

Definition at line 18 of file RawDataTrigCnv.cxx.

19{
20 return CLID_TrigEvent;
21}
const CLID & CLID_TrigEvent
Definition: EventModel.cxx:277

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

◆ createObj()

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

Definition at line 66 of file RawDataTrigCnv.cxx.

67{
68 TrigEvent * evt = new TrigEvent();
69 pObj = evt;
70 return StatusCode::SUCCESS;
71}

◆ createRep()

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

Definition at line 73 of file RawDataTrigCnv.cxx.

74{
75 std::string nm = pObj->registry()->name();
76 RawDataAddress* addr = new RawDataAddress(classID(), nm, "");
77 pAddr = addr;
78
79 return StatusCode::SUCCESS;
80}

◆ init()

StatusCode RawDataTrigCnv::init ( )

Definition at line 23 of file RawDataTrigCnv.cxx.

24{
25 StatusCode sc = RawDataBaseCnv::initialize();
26 if (sc.isFailure()) {
27 return sc;
28 }
29
30 MsgStream log(messageService(), "RawDataTrigCnv");
31
32 IService* svc = 0;
33 sc = serviceLocator()->service("PackedRawDataCnvSvc", svc);
34 if (sc != StatusCode::SUCCESS) {
35 log << MSG::ERROR << "Can't get RawDataAccess interface" << endreq;
36 return StatusCode::FAILURE;
37 }
38
39 m_RawDataAccess = dynamic_cast<PackedRawDataCnvSvc*> (svc);
40 if (m_RawDataAccess == 0 ) {
41 log << MSG::ERROR << "RawDataCnv: Cant cast to RawDataCnvSvc" << endreq;
42 return StatusCode::FAILURE;
43 }
44
45 sc = serviceLocator()->getService("RawDataInputSvc", svc);
46 if(sc != StatusCode::SUCCESS ) {
47 log << MSG::WARNING << "Cant get RawDataInputSvc " << endreq;
48 return sc ;
49 }
50
51 m_inputSvc = dynamic_cast<RawDataInputSvc*> (svc);
52 if(m_inputSvc == 0 ) {
53 log << MSG::ERROR << "Cant cast to RawDataInputSvc" << endreq;
54 return StatusCode::FAILURE ;
55 }
56
57 return StatusCode::SUCCESS;
58}
StatusCode initialize()

Referenced by RawDataTrigCnv().

◆ repSvcType()

virtual long RawDataTrigCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

Definition at line 31 of file RawDataTrigCnv.h.

31 {
33 }

◆ storageType()

static const unsigned char RawDataTrigCnv::storageType ( )
inlinestatic

Definition at line 35 of file RawDataTrigCnv.h.

35 {
37 }

◆ updateObj()

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

override the RawDataBaseCnv version

Definition at line 60 of file RawDataTrigCnv.cxx.

60 {
61 MsgStream log(msgSvc(), "RawDataTrigCnv");
62 log << MSG::DEBUG << "RawDataTrigCnv::updateObj" << endreq;
63 return Converter::updateObj(pAddr, pObj);
64}
IMessageSvc * msgSvc()

Friends And Related Function Documentation

◆ CnvFactory< RawDataTrigCnv >

friend class CnvFactory< RawDataTrigCnv >
friend

Definition at line 1 of file RawDataTrigCnv.h.


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