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

#include <RawDataTrigGTDCnv.h>

+ Inheritance diagram for RawDataTrigGTDCnv:

Public Member Functions

StatusCode init ()
 
virtual long repSvcType () const
 
StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj)
 
virtual StatusCode updateObj (IOpaqueAddress *, DataObject *)
 
virtual StatusCode createRep (DataObject *pObj, IOpaqueAddress *&pAddr)
 Convert the transient object to the requested representation.
 
StatusCode init ()
 
virtual long repSvcType () const
 
StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj)
 
virtual StatusCode updateObj (IOpaqueAddress *, DataObject *)
 
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

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

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

◆ RawDataTrigGTDCnv() [1/2]

RawDataTrigGTDCnv::RawDataTrigGTDCnv ( ISvcLocator *  svc)
protected

◆ RawDataTrigGTDCnv() [2/2]

RawDataTrigGTDCnv::RawDataTrigGTDCnv ( ISvcLocator *  svc)
protected

Member Function Documentation

◆ classID() [1/2]

const CLID & RawDataTrigGTDCnv::classID ( )
static

Definition at line 18 of file RawDataTrigGTDCnv.cxx.

19{
20 return CLID_TrigGTDCol;
21}
const CLID & CLID_TrigGTDCol
Definition: EventModel.cxx:323

Referenced by PackedRawDataCnvSvc::addConverters().

◆ classID() [2/2]

static const CLID & RawDataTrigGTDCnv::classID ( )
static

◆ createObj() [1/2]

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

Definition at line 66 of file RawDataTrigGTDCnv.cxx.

67{
68 MsgStream log(msgSvc(), "RawDataTrigGTDCnv");
69 RawDataAddress* pEFAddr;
70
71 RAWEVENT* evt;
72 TrigGTD* trigGTD;
73
74 TrigGTDCol* gtdCol = new TrigGTDCol;
75 pObj = gtdCol;
76
77 evt = m_inputSvc->currentEvent();
78 if (evt == NULL) {
79 log << MSG::ERROR << "RawDataTrigGTDCnv::createObj has no event!" << endreq;
80 return StatusCode::FAILURE;
81 }
82
83 const BufferHolder& gtdBuf = evt->getGTDBuf();
84 uint32_t nbuf = gtdBuf.nBuf();
85
86 for (uint32_t i = 0; i < nbuf; i++) {
87 uint32_t* buf = gtdBuf(i);
88 uint32_t bufSize = gtdBuf.bufSize(i);
89 uint32_t index = 0;
90 while (bufSize - index > 1) {
91 uint32_t blockSize = ( ((*(buf+index))>>14) & 0x3FF);
92 uint32_t id = ((*(buf+index))>>24);
93 if (blockSize == 0 || (index+blockSize) > bufSize) break;
94 if ((id> 0xD1 && id < 0xD8 && id != 0xD5) || id == 0xDA || (id > 0xE1 && id < 0xED)) {
95 trigGTD = new TrigGTD(buf+index);
96 gtdCol->push_back(trigGTD);
97 }
98 index += blockSize;
99 }
100 }
101
102 return StatusCode::SUCCESS;
103}
ObjectVector< TrigGTD > TrigGTDCol
virtual RAWEVENT * currentEvent()=0

◆ createObj() [2/2]

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

◆ createRep() [1/2]

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

Definition at line 105 of file RawDataTrigGTDCnv.cxx.

106{
107 MsgStream log(messageService(), "RawDataTrigGTDCnv");
108
109 return StatusCode::SUCCESS;
110}

◆ createRep() [2/2]

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

◆ init() [1/2]

StatusCode RawDataTrigGTDCnv::init ( )

Definition at line 23 of file RawDataTrigGTDCnv.cxx.

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

Referenced by RawDataTrigGTDCnv().

◆ init() [2/2]

StatusCode RawDataTrigGTDCnv::init ( )

◆ repSvcType() [1/2]

virtual long RawDataTrigGTDCnv::repSvcType ( ) const
inlinevirtual

◆ repSvcType() [2/2]

virtual long RawDataTrigGTDCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

Definition at line 35 of file InstallArea/include/RawDataCnv/RawDataCnv/RawDataTrigGTDCnv.h.

35 {
37 }

◆ storageType() [1/2]

static const unsigned char RawDataTrigGTDCnv::storageType ( )
inlinestatic

◆ storageType() [2/2]

static const unsigned char RawDataTrigGTDCnv::storageType ( )
inlinestatic

◆ updateObj() [1/2]

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

Definition at line 59 of file RawDataTrigGTDCnv.cxx.

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

◆ updateObj() [2/2]

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

Friends And Related Function Documentation

◆ CnvFactory< RawDataTrigGTDCnv >


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