BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataZddEventCnv Class Reference

#include <RawDataZddEventCnv.h>

+ Inheritance diagram for RawDataZddEventCnv:

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

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

Friends

class CnvFactory< RawDataZddEventCnv >
 

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

◆ RawDataZddEventCnv() [1/2]

RawDataZddEventCnv::RawDataZddEventCnv ( ISvcLocator *  svc)
protected

◆ ~RawDataZddEventCnv() [1/2]

RawDataZddEventCnv::~RawDataZddEventCnv ( )
protectedvirtual

Definition at line 17 of file RawDataZddEventCnv.cxx.

18{
20}
static void destroy()

◆ RawDataZddEventCnv() [2/2]

RawDataZddEventCnv::RawDataZddEventCnv ( ISvcLocator *  svc)
protected

◆ ~RawDataZddEventCnv() [2/2]

virtual RawDataZddEventCnv::~RawDataZddEventCnv ( )
protectedvirtual

Member Function Documentation

◆ classID() [1/2]

const CLID & RawDataZddEventCnv::classID ( )
static

Definition at line 53 of file RawDataZddEventCnv.cxx.

54{
55 return CLID_ZddEvent;
56}
const CLID & CLID_ZddEvent
Definition: EventModel.cxx:290

Referenced by PackedRawDataCnvSvc::addConverters().

◆ classID() [2/2]

static const CLID & RawDataZddEventCnv::classID ( )
static

◆ createObj() [1/2]

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

Definition at line 58 of file RawDataZddEventCnv.cxx.

59{
60 ZddEvent* zddEvt = new ZddEvent;
61 pObj = zddEvt;
62
63 RAWEVENT* evt = m_inputSvc->currentEvent();
64 if (evt == NULL) {
65 //log << MSG::ERROR << "RawDataZddEventCnv::createObj has no event!" << endreq;
66 return StatusCode::FAILURE;
67 }
68
69 const BufferHolder& zddBuf = evt->getZddBuf();
70
71 // Data decoding
72 uint32_t nbuf = zddBuf.nBuf();
73 for ( uint32_t i = 0; i < nbuf; ++i ) { //loop the buffers
74 uint32_t* buf = zddBuf(i);
75 m_cnv->convert(buf, zddBuf.bufSize(i), zddEvt);
76 }
77
78 return StatusCode::SUCCESS;
79}
virtual RAWEVENT * currentEvent()=0
bool convert(uint32_t *pdata, int size, Event::ZddEvent *evt)

◆ createObj() [2/2]

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

◆ createRep() [1/2]

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

Definition at line 86 of file RawDataZddEventCnv.cxx.

87{
88 // to be filled
89 return StatusCode::SUCCESS;
90}

◆ createRep() [2/2]

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

◆ initialize() [1/2]

StatusCode RawDataZddEventCnv::initialize ( )

Definition at line 22 of file RawDataZddEventCnv.cxx.

23{
24 StatusCode sc = RawDataBaseCnv::initialize();
25 if ( sc.isFailure() ) return sc;
26
27 std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc");
28 std::string RawDataInputSvc_Name("RawDataInputSvc");
29 std::string RawDataZddEventCnv_Name("RawDataZddEventCnv");
30
31 SmartIF<IService> pCnvSvc(conversionSvc());
32 if (isGaudiThreaded(pCnvSvc->name())){
33 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
34 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
35 RawDataZddEventCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
36 }
37
38 MsgStream log(messageService(), RawDataZddEventCnv_Name.c_str());
39
40 IService* svc ;
41 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc);
42 m_inputSvc = dynamic_cast<RawDataInputSvc*> (svc);
43 if ( m_inputSvc == 0 ) {
44 log<<MSG::WARNING<< " Cant cast to RawDataInputSvc " <<endreq;
45 return StatusCode::FAILURE ;
46 }
47
48 m_cnv = ZddConverter::instance( m_inputSvc->runMode() );
49
50 return StatusCode::SUCCESS;
51}
virtual int runMode()=0
StatusCode initialize()
static ZddConverter * instance(int runMode=2)
Definition: ZddConverter.cxx:9

◆ initialize() [2/2]

StatusCode RawDataZddEventCnv::initialize ( )

◆ repSvcType() [1/2]

virtual long RawDataZddEventCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

Definition at line 28 of file Event/RawDataCnv/RawDataCnv-00-04-37/RawDataCnv/RawDataZddEventCnv.h.

28 {
30 }

◆ repSvcType() [2/2]

virtual long RawDataZddEventCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

Definition at line 28 of file InstallArea/include/RawDataCnv/RawDataCnv/RawDataZddEventCnv.h.

28 {
30 }

◆ storageType() [1/2]

static const unsigned char RawDataZddEventCnv::storageType ( )
inlinestatic

◆ storageType() [2/2]

static const unsigned char RawDataZddEventCnv::storageType ( )
inlinestatic

◆ updateObj() [1/2]

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

override the RawDataBaseCnv version

Definition at line 81 of file RawDataZddEventCnv.cxx.

82{
83 return Converter::updateObj(pAddr, pObj);
84}

◆ updateObj() [2/2]

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

override the RawDataBaseCnv version

Friends And Related Function Documentation

◆ CnvFactory< RawDataZddEventCnv >


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