BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataTrigGTDCnv Class Reference

#include <RawDataTrigGTDCnv.hpp>

Inheritance diagram for RawDataTrigGTDCnv:

Public Member Functions

 RawDataTrigGTDCnv (ISvcLocator *svc)
StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj)
Public Member Functions inherited from RawDataBaseCnv
StatusCode initialize ()
long repSvcType () const
const long storageType ()
Public Member Functions inherited from Converter< Ty1, Ty2 >
destinationoperator (const source &) const
destinationoperator (const source &) const
destinationoperator (const source &) const

Static Public Member Functions

static const CLID & classID ()

Additional Inherited Members

Public Types inherited from Converter< Ty1, Ty2 >
typedef Ty1 source
typedef Ty2 destination
typedef Ty1 source
typedef Ty2 destination
typedef Ty1 source
typedef Ty2 destination
Protected Member Functions inherited from RawDataBaseCnv
 RawDataBaseCnv (long storageType, const CLID &clid, ISvcLocator *svc)
 RawDataBaseCnv (ISvcLocator *svc, const CLID &clid)
Protected Member Functions inherited from Converter< Ty1, Ty2 >
virtual destinationconvert (const source &) const =0
virtual destinationconvert (const source &) const =0
virtual destinationconvert (const source &) const =0
Protected Attributes inherited from RawDataBaseCnv
std::vector< IRawDataCnvSvc::Leafm_leaves
IRawDataCnvSvcm_cnvSvc
IRawDataInputSvcm_inputSvc

Detailed Description

Definition at line 10 of file RawDataTrigGTDCnv.hpp.

Constructor & Destructor Documentation

◆ RawDataTrigGTDCnv()

RawDataTrigGTDCnv::RawDataTrigGTDCnv ( ISvcLocator * svc)
inline

Definition at line 12 of file RawDataTrigGTDCnv.hpp.

12: RawDataBaseCnv( svc, classID() ) {}
RawDataBaseCnv(long storageType, const CLID &clid, ISvcLocator *svc)
static const CLID & classID()

Member Function Documentation

◆ classID()

const CLID & RawDataTrigGTDCnv::classID ( )
inlinestatic

Definition at line 14 of file RawDataTrigGTDCnv.hpp.

14{ return CLID_TrigGTDCol; }
const CLID & CLID_TrigGTDCol

Referenced by RawDataCnvSvc::addConverters(), RawDataCnvSvc::createConverter(), and RawDataTrigGTDCnv().

◆ createObj()

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

Definition at line 16 of file RawDataTrigGTDCnv.hpp.

16 {
17 MsgStream log( msgSvc(), "RawDataTrigGTDCnv" );
18 RawDataAddress* pEFAddr;
19
20 RAWEVENT* evt;
21 TrigGTD* trigGTD;
22
23 TrigGTDCol* gtdCol = new TrigGTDCol;
24 pObj = gtdCol;
25
26 evt = m_inputSvc->currentEvent();
27 if ( evt == NULL )
28 {
29 log << MSG::ERROR << "RawDataTrigGTDCnv::createObj has no event!" << endmsg;
30 return StatusCode::FAILURE;
31 }
32
33 const BufferHolder& gtdBuf = evt->getGTDBuf();
34 uint32_t nbuf = gtdBuf.nBuf();
35
36 for ( uint32_t i = 0; i < nbuf; i++ )
37 {
38 uint32_t* buf = gtdBuf( i );
39 uint32_t bufSize = gtdBuf.bufSize( i );
40 uint32_t index = 0;
41 while ( bufSize - index > 1 )
42 {
43 uint32_t blockSize = ( ( ( *( buf + index ) ) >> 14 ) & 0x3FF );
44 uint32_t id = ( ( *( buf + index ) ) >> 24 );
45 if ( blockSize == 0 || ( index + blockSize ) > bufSize ) break;
46 if ( ( id > 0xD1 && id < 0xD8 && id != 0xD5 ) || id == 0xDA ||
47 ( id > 0xE1 && id < 0xED ) )
48 {
49 trigGTD = new TrigGTD( buf + index );
50 gtdCol->push_back( trigGTD );
51 }
52 index += blockSize;
53 }
54 }
55
56 return StatusCode::SUCCESS;
57 }
ObjectVector< TrigGTD > TrigGTDCol
IMessageSvc * msgSvc()
IRawDataInputSvc * m_inputSvc

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