BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataLumiDigiCnv Class Reference

#include <RawDataLumiDigiCnv.h>

+ Inheritance diagram for RawDataLumiDigiCnv:

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

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

Friends

class CnvFactory< RawDataLumiDigiCnv >
 

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 19 of file RawDataLumiDigiCnv.h.

Constructor & Destructor Documentation

◆ RawDataLumiDigiCnv()

RawDataLumiDigiCnv::RawDataLumiDigiCnv ( ISvcLocator *  svc)
protected

Definition at line 19 of file RawDataLumiDigiCnv.cxx.

19 :
21{
22}
unsigned const long PACKEDRAWEVENT_StorageType
Definition: ClassID_temp.h:17
static const CLID & classID()

◆ ~RawDataLumiDigiCnv()

RawDataLumiDigiCnv::~RawDataLumiDigiCnv ( )
protected

Definition at line 24 of file RawDataLumiDigiCnv.cxx.

25{
26}

Member Function Documentation

◆ classID()

const CLID & RawDataLumiDigiCnv::classID ( )
static

Definition at line 30 of file RawDataLumiDigiCnv.cxx.

31{
32 return CLID_LumiDigiCol;
33}
const CLID & CLID_LumiDigiCol
Definition: EventModel.cxx:243

Referenced by PackedRawDataCnvSvc::addConverters().

◆ createObj()

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

Definition at line 101 of file RawDataLumiDigiCnv.cxx.

102{
103 DataObject* pLumi;
104 dataProvider()->findObject("/Event/Digi/LumiDigiCol", pLumi);
105
106 if ( pLumi == NULL ) {
107 LumiDigiCol* lumiDigiCol = new LumiDigiCol;
108 dataProvider()->registerObject("/Event/Digi/LumiDigiCol", lumiDigiCol);
109 pObj = lumiDigiCol;
110 }
111 else {
112 pObj = pLumi;
113 }
114
115 return StatusCode::SUCCESS;
116}
ObjectVector< LumiDigi > LumiDigiCol
Definition: LumiDigi.h:36

◆ createRep()

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

Definition at line 118 of file RawDataLumiDigiCnv.cxx.

119{
120 return StatusCode::SUCCESS;
121}

◆ initialize()

StatusCode RawDataLumiDigiCnv::initialize ( )

Definition at line 35 of file RawDataLumiDigiCnv.cxx.

36{
37
38 std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc");
39 std::string RawDataInputSvc_Name("RawDataInputSvc");
40 std::string RawDataLumiDigiCnv_Name("RawDataLumiDigiCnv");
41
42 // for Mutil-thread by tianhl
43 //ConversionSvc* pCnvSvc = 0;
44 //if (pCnvSvc = dynamic_cast<ConversionSvc*>(conversionSvc())){
45 SmartIF<IService> pCnvSvc(conversionSvc());
46 if (isGaudiThreaded(pCnvSvc->name())){
47 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
48 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
49 RawDataLumiDigiCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
50 }
51 //}
52
53 StatusCode sc = RawDataBaseCnv::initialize();
54 if(StatusCode::SUCCESS!=sc)
55 {
56 return sc;
57 }
58
59 MsgStream log(messageService(), RawDataLumiDigiCnv_Name.c_str());
60
61 // Check RawDataCnvSvc
62 IService* isvc = 0;
63 StatusCode status = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc, true);
64
65 m_RawDataAccess = dynamic_cast<PackedRawDataCnvSvc*> (isvc);
66 if(m_RawDataAccess == 0 ) {
67 log<<MSG::ERROR<< " RawDataLumiCnv: Cant cast to RawDataCnvSvc " <<endreq;
68 return StatusCode::FAILURE ;
69 }
70
71 if(m_RawDataAccess)
72 log << MSG::INFO << "RawDataCnvSvc retrieved "<< endreq;
73
74 IService* svc ;
75 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc);
76 if(sc != StatusCode::SUCCESS ) {
77 log<<MSG::WARNING << " Cant get RawDataInputSvc " <<endreq;
78 return sc ;
79 }
80
81 m_inputSvc = dynamic_cast<RawDataInputSvc*> (svc);
82 if(m_inputSvc == 0 ) {
83 log<<MSG::WARNING<< " Cant cast to RawDataInputSvc " <<endreq;
84 return StatusCode::FAILURE ;
85 }
86
87 return StatusCode::SUCCESS;
88}
StatusCode initialize()

◆ repSvcType()

virtual long RawDataLumiDigiCnv::repSvcType ( ) const
inlinevirtual

Reimplemented from RawDataBaseCnv.

Definition at line 35 of file RawDataLumiDigiCnv.h.

35 {
37 }

◆ storageType()

static const unsigned char RawDataLumiDigiCnv::storageType ( )
inlinestatic

Definition at line 39 of file RawDataLumiDigiCnv.h.

39 {
41 }

◆ updateObj()

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

override the RawDataBaseCnv version

Definition at line 91 of file RawDataLumiDigiCnv.cxx.

91 {
92 // Purpose and Method: This method does nothing other than announce it has
93 // been called.
94
95 //MsgStream log(msgSvc(), "RawDataLumiDigiCnv");
96 //log << MSG::DEBUG << "RawDataLumiDigiCnv::updateObj" << endreq;
97 return Converter::updateObj(pAddr, pObj);
98}

Friends And Related Function Documentation

◆ CnvFactory< RawDataLumiDigiCnv >

friend class CnvFactory< RawDataLumiDigiCnv >
friend

Definition at line 1 of file RawDataLumiDigiCnv.h.


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