#include <RawDataLumiDigiCnv.h>
Inheritance diagram for RawDataLumiDigiCnv:
Public Types | |
typedef Ty1 | source |
typedef Ty2 | destination |
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. | |
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 | 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. | |
destination * | operator (const source &) const |
Static Public Member Functions | |
static const CLID & | classID () |
static const unsigned char | storageType () |
Protected Member Functions | |
RawDataLumiDigiCnv (ISvcLocator *svc) | |
~RawDataLumiDigiCnv () | |
virtual destination * | convert (const source &) const =0 |
Protected Attributes | |
IRawDataCnvSvc * | m_CnvSvc |
Pointer to event conversion service interface. | |
std::vector< IRawDataCnvSvc::Leaf > | m_leaves |
Leaf objects giving the locations of the objects in the data store. | |
Private Attributes | |
IRawDataInputSvc * | m_inputSvc |
PackedRawDataCnvSvc * | m_RawDataAccess |
Define the interface to raw data cnv. | |
Friends | |
class | CnvFactory< RawDataLumiDigiCnv > |
Definition at line 19 of file RawDataLumiDigiCnv.h.
typedef Ty2 Converter< Ty1, Ty2 >::destination [inherited] |
Definition at line 19 of file Converter.h.
Definition at line 18 of file Converter.h.
RawDataLumiDigiCnv::RawDataLumiDigiCnv | ( | ISvcLocator * | svc | ) | [protected] |
Definition at line 19 of file RawDataLumiDigiCnv.cxx.
00019 : 00020 RawDataBaseCnv(PACKEDRAWEVENT_StorageType, classID(), svc) 00021 { 00022 }
RawDataLumiDigiCnv::~RawDataLumiDigiCnv | ( | ) | [protected] |
const CLID & RawDataLumiDigiCnv::classID | ( | ) | [static] |
Reimplemented from RawDataBaseCnv.
Definition at line 30 of file RawDataLumiDigiCnv.cxx.
References CLID_LumiDigiCol.
Referenced by PackedRawDataCnvSvc::addConverters().
00031 { 00032 return CLID_LumiDigiCol; 00033 }
virtual destination* Converter< Ty1, Ty2 >::convert | ( | const source & | ) | const [protected, pure virtual, inherited] |
StatusCode RawDataLumiDigiCnv::createObj | ( | IOpaqueAddress * | pAddr, | |
DataObject *& | pObj | |||
) |
Definition at line 101 of file RawDataLumiDigiCnv.cxx.
References EventModel::Digi::LumiDigiCol.
00102 { 00103 DataObject* pLumi; 00104 dataProvider()->findObject("/Event/Digi/LumiDigiCol", pLumi); 00105 00106 if ( pLumi == NULL ) { 00107 LumiDigiCol* lumiDigiCol = new LumiDigiCol; 00108 dataProvider()->registerObject("/Event/Digi/LumiDigiCol", lumiDigiCol); 00109 pObj = lumiDigiCol; 00110 } 00111 else { 00112 pObj = pLumi; 00113 } 00114 00115 return StatusCode::SUCCESS; 00116 }
StatusCode RawDataLumiDigiCnv::createRep | ( | DataObject * | pObj, | |
IOpaqueAddress *& | pAddr | |||
) | [virtual] |
Convert the transient object to the requested representation.
Reimplemented from RawDataBaseCnv.
Definition at line 118 of file RawDataLumiDigiCnv.cxx.
void RawDataBaseCnv::declareObject | ( | const std::string & | fullPath, | |
const CLID & | clid, | |||
const std::string & | bank, | |||
long | par = 0 | |||
) | [inherited] |
Store TDS path to link a particular converter to an object on the TDS.
Definition at line 81 of file RawDataBaseCnv.cxx.
00082 { 00083 // Purpose and Method: Save the path on the TDS, in the m_leaves vector, 00084 // corresponding to the DataObject that the converter handles. 00085 // m_leaves.push_back(IRawDataCnvSvc::Leaf(path, cl, bank, par)); 00086 }
StatusCode RawDataBaseCnv::fillRepRefs | ( | IOpaqueAddress * | pAddress, | |
DataObject * | pObject | |||
) | [virtual, inherited] |
Resolve the references of the converted object.
Definition at line 29 of file RawDataBaseCnv.cxx.
00030 { 00031 // Purpose and Method: Resolve the references of the converted object. 00032 // It is expected that derived classes will override this method. 00033 return StatusCode::SUCCESS; 00034 }
StatusCode RawDataBaseCnv::finalize | ( | ) | [virtual, inherited] |
Definition at line 73 of file RawDataBaseCnv.cxx.
References RawDataBaseCnv::m_CnvSvc.
00073 { 00074 if ( m_CnvSvc ) { 00075 m_CnvSvc->release(); 00076 m_CnvSvc = 0; 00077 } 00078 return Converter::finalize(); 00079 }
StatusCode RawDataLumiDigiCnv::initialize | ( | ) |
Reimplemented from RawDataBaseCnv.
Definition at line 35 of file RawDataLumiDigiCnv.cxx.
References calibUtil::ERROR, Bes_Common::INFO, RawDataBaseCnv::initialize(), m_inputSvc, m_RawDataAccess, deljobs::string, and Bes_Common::WARNING.
00036 { 00037 00038 std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc"); 00039 std::string RawDataInputSvc_Name("RawDataInputSvc"); 00040 std::string RawDataLumiDigiCnv_Name("RawDataLumiDigiCnv"); 00041 00042 // for Mutil-thread by tianhl 00043 //ConversionSvc* pCnvSvc = 0; 00044 //if (pCnvSvc = dynamic_cast<ConversionSvc*>(conversionSvc())){ 00045 SmartIF<IService> pCnvSvc(conversionSvc()); 00046 if (isGaudiThreaded(pCnvSvc->name())){ 00047 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00048 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00049 RawDataLumiDigiCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00050 } 00051 //} 00052 00053 StatusCode sc = RawDataBaseCnv::initialize(); 00054 if(StatusCode::SUCCESS!=sc) 00055 { 00056 return sc; 00057 } 00058 00059 MsgStream log(messageService(), RawDataLumiDigiCnv_Name.c_str()); 00060 00061 // Check RawDataCnvSvc 00062 IService* isvc = 0; 00063 StatusCode status = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc, true); 00064 00065 m_RawDataAccess = dynamic_cast<PackedRawDataCnvSvc*> (isvc); 00066 if(m_RawDataAccess == 0 ) { 00067 log<<MSG::ERROR<< " RawDataLumiCnv: Cant cast to RawDataCnvSvc " <<endreq; 00068 return StatusCode::FAILURE ; 00069 } 00070 00071 if(m_RawDataAccess) 00072 log << MSG::INFO << "RawDataCnvSvc retrieved "<< endreq; 00073 00074 IService* svc ; 00075 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc); 00076 if(sc != StatusCode::SUCCESS ) { 00077 log<<MSG::WARNING << " Cant get RawDataInputSvc " <<endreq; 00078 return sc ; 00079 } 00080 00081 m_inputSvc = dynamic_cast<RawDataInputSvc*> (svc); 00082 if(m_inputSvc == 0 ) { 00083 log<<MSG::WARNING<< " Cant cast to RawDataInputSvc " <<endreq; 00084 return StatusCode::FAILURE ; 00085 } 00086 00087 return StatusCode::SUCCESS; 00088 }
destination* Converter< Ty1, Ty2 >::operator | ( | const source & | ) | const [inline, inherited] |
virtual long RawDataLumiDigiCnv::repSvcType | ( | ) | const [inline, virtual] |
Reimplemented from RawDataBaseCnv.
Definition at line 35 of file RawDataLumiDigiCnv.h.
References PACKEDRAWEVENT_StorageType.
00035 { 00036 return PACKEDRAWEVENT_StorageType; 00037 }
static const unsigned char RawDataLumiDigiCnv::storageType | ( | ) | [inline, static] |
Reimplemented from RawDataBaseCnv.
Definition at line 39 of file RawDataLumiDigiCnv.h.
References PACKEDRAWEVENT_StorageType.
00039 { 00040 return PACKEDRAWEVENT_StorageType; 00041 }
StatusCode RawDataLumiDigiCnv::updateObj | ( | IOpaqueAddress * | , | |
DataObject * | ||||
) | [virtual] |
override the RawDataBaseCnv version
Definition at line 91 of file RawDataLumiDigiCnv.cxx.
00091 { 00092 // Purpose and Method: This method does nothing other than announce it has 00093 // been called. 00094 00095 //MsgStream log(msgSvc(), "RawDataLumiDigiCnv"); 00096 //log << MSG::DEBUG << "RawDataLumiDigiCnv::updateObj" << endreq; 00097 return Converter::updateObj(pAddr, pObj); 00098 }
StatusCode RawDataBaseCnv::updateRep | ( | IOpaqueAddress * | pAddress, | |
DataObject * | pObject | |||
) | [virtual, inherited] |
Update the converted representation of a transient object.
Definition at line 36 of file RawDataBaseCnv.cxx.
00037 { 00038 // Purpose and Method: Update the converted representation of a transient 00039 // object. It is expected that derived classes will override this. 00040 return StatusCode::SUCCESS; 00041 }
StatusCode RawDataBaseCnv::updateRepRefs | ( | IOpaqueAddress * | pAddress, | |
DataObject * | pObject | |||
) | [virtual, inherited] |
Update the references of an already converted object.
Definition at line 43 of file RawDataBaseCnv.cxx.
00044 { 00045 // Purpose and Method: Update the references of an already converted object. 00046 // It is expected that derived classes will override this method. 00047 return StatusCode::SUCCESS; 00048 }
friend class CnvFactory< RawDataLumiDigiCnv > [friend] |
Definition at line 23 of file RawDataLumiDigiCnv.h.
IRawDataCnvSvc* RawDataBaseCnv::m_CnvSvc [protected, inherited] |
Pointer to event conversion service interface.
Definition at line 28 of file RawDataBaseCnv.h.
Referenced by RawDataBaseCnv::finalize().
IRawDataInputSvc* RawDataLumiDigiCnv::m_inputSvc [private] |
std::vector<IRawDataCnvSvc::Leaf> RawDataBaseCnv::m_leaves [protected, inherited] |
Leaf objects giving the locations of the objects in the data store.
Definition at line 30 of file RawDataBaseCnv.h.
Define the interface to raw data cnv.
Definition at line 54 of file RawDataLumiDigiCnv.h.
Referenced by initialize().