#include <RawDataCnv.h>
Inheritance diagram for RawDataCnv:
Public Types | |
typedef Ty2 | destination |
typedef Ty2 | destination |
typedef Ty1 | source |
typedef Ty1 | source |
Public Member Functions | |
StatusCode | createObj (IOpaqueAddress *pAddr, DataObject *&pObj) |
StatusCode | createObj (IOpaqueAddress *pAddr, DataObject *&pObj) |
virtual StatusCode | createRep (DataObject *pObj, IOpaqueAddress *&pAddr) |
Convert the transient object to the requested representation. | |
virtual StatusCode | createRep (DataObject *pObj, IOpaqueAddress *&pAddr) |
Convert the transient object to the requested representation. | |
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. | |
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 | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
Resolve the references of the converted object. | |
virtual StatusCode | finalize () |
virtual StatusCode | finalize () |
StatusCode | initialize () |
StatusCode | initialize () |
destination * | operator (const source &) const |
destination * | operator (const source &) const |
virtual long | repSvcType () const |
virtual long | repSvcType () const |
virtual StatusCode | updateObj (IOpaqueAddress *, DataObject *) |
override the RawDataBaseCnv version | |
virtual StatusCode | updateObj (IOpaqueAddress *, DataObject *) |
override the RawDataBaseCnv version | |
virtual StatusCode | updateRep (IOpaqueAddress *pAddress, DataObject *pObject) |
Update the converted representation of a transient 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. | |
virtual StatusCode | updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
Update the references of an already converted object. | |
Static Public Member Functions | |
const CLID & | classID () |
const CLID & | classID () |
const unsigned char | storageType () |
const unsigned char | storageType () |
Protected Member Functions | |
virtual destination * | convert (const source &) const =0 |
virtual destination * | convert (const source &) const =0 |
RawDataCnv (ISvcLocator *svc) | |
RawDataCnv (ISvcLocator *svc) | |
Protected Attributes | |
IRawDataCnvSvc * | m_CnvSvc |
Pointer to event conversion service interface. | |
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. | |
std::vector< IRawDataCnvSvc::Leaf > | m_leaves |
Leaf objects giving the locations of the objects in the data store. | |
Private Attributes | |
IRawDataInputSvc * | m_inputSvc |
IRawDataInputSvc * | m_inputSvc |
Friends | |
class | CnvFactory<RawDataCnv> |
|
|
|
|
|
|
|
|
|
00027 : 00028 RawDataBaseCnv(PACKEDRAWEVENT_StorageType, classID(), svc) 00029 { 00030 //init(); 00031 }
|
|
|
|
Reimplemented from RawDataBaseCnv. |
|
Reimplemented from RawDataBaseCnv. 00082 {
00083 return CLID_Event;
00084 }
|
|
|
|
|
|
|
|
00097 { 00098 RawDataAddress *pEFAddr; 00099 const RAWEVENT *evt; 00100 00101 Event::EventH * evh = new Event::EventH(); 00102 pObj = evh; 00103 00104 if ( (pEFAddr = dynamic_cast<RawDataAddress*>(pAddr)) ) { 00105 evt = m_inputSvc->currentEvent(); 00106 if (evt == NULL) return StatusCode::FAILURE; 00107 return StatusCode::SUCCESS; 00108 } 00109 else { 00110 return StatusCode::FAILURE; 00111 } 00112 }
|
|
Convert the transient object to the requested representation.
Reimplemented from RawDataBaseCnv. |
|
Convert the transient object to the requested representation.
Reimplemented from RawDataBaseCnv. 00115 { 00116 Event::EventH * evh=dynamic_cast<Event::EventH *> (pObj); 00117 if (!evh) { 00118 std::string RawDataCnv_Name("RawDataCnv"); 00119 ConversionSvc* pCnvSvc = 0; 00120 if (pCnvSvc = dynamic_cast<ConversionSvc*>(conversionSvc())){ 00121 if (isGaudiThreaded(pCnvSvc->name())){ 00122 RawDataCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00123 } 00124 } 00125 MsgStream log(msgSvc(), RawDataCnv_Name.c_str()); 00126 log << MSG::DEBUG << "RawDataCnv::createRep()" << endreq; 00127 00128 log << MSG::ERROR << "Could not downcast Event" << endreq; 00129 return StatusCode::FAILURE; 00130 } 00131 // nothing to do, will be done in lower converters 00132 return StatusCode::SUCCESS; 00133 }
|
|
Store TDS path to link a particular converter to an object on the TDS.
|
|
Store TDS path to link a particular converter to an object on the TDS.
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 }
|
|
Resolve the references of the converted object.
|
|
Resolve the references of the converted object.
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 }
|
|
|
|
00073 { 00074 if ( m_CnvSvc ) { 00075 m_CnvSvc->release(); 00076 m_CnvSvc = 0; 00077 } 00078 return Converter::finalize(); 00079 }
|
|
Reimplemented from RawDataBaseCnv. |
|
Reimplemented from RawDataBaseCnv. 00034 { 00035 StatusCode sc = RawDataBaseCnv::initialize(); 00036 if( sc.isFailure() ) return sc; 00037 00038 std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc"); 00039 std::string RawDataInputSvc_Name("RawDataInputSvc"); 00040 std::string RawDataCnv_Name("RawDataCnv"); 00041 00042 // for Mutil-thread by tianhl 00043 ConversionSvc* pCnvSvc = 0; 00044 if (pCnvSvc = dynamic_cast<ConversionSvc*>(conversionSvc())){ 00045 if (isGaudiThreaded(pCnvSvc->name())){ 00046 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00047 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00048 RawDataCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00049 } 00050 } 00051 // for Mutil-thread by tianhl 00052 00053 MsgStream log(messageService(), RawDataCnv_Name.c_str()); 00054 /*if (StatusCode::SUCCESS != service("PackedRawDataCnvSvc", 00055 m_RawDataAccess) || !m_RawDataAccess ) 00056 { 00057 log << MSG::ERROR << " Can't get RawDataAccess interface " 00058 << endreq; 00059 return StatusCode::FAILURE; 00060 } 00061 log << MSG::INFO << " RawDataCnvSvc retrieved "<< endreq; */ 00062 00063 IService* svc ; 00064 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc); 00065 if(sc != StatusCode::SUCCESS ) { 00066 log<<MSG::WARNING << " Cant get RawDataInputSvc " <<endreq; 00067 return sc ; 00068 } 00069 00070 m_inputSvc = dynamic_cast<RawDataInputSvc*> (svc); 00071 if(m_inputSvc == 0 ) { 00072 log<<MSG::WARNING << " Cant cast to RawDataInputSvc " <<endreq; 00073 return StatusCode::FAILURE ; 00074 } 00075 00076 return StatusCode::SUCCESS; 00077 }
|
|
|
|
|
|
Reimplemented from RawDataBaseCnv. 00044 {
00045 return PACKEDRAWEVENT_StorageType;
00046 }
|
|
Reimplemented from RawDataBaseCnv. 00044 {
00045 return PACKEDRAWEVENT_StorageType;
00046 }
|
|
Reimplemented from RawDataBaseCnv. 00048 {
00049 return PACKEDRAWEVENT_StorageType;
00050 }
|
|
Reimplemented from RawDataBaseCnv. 00048 {
00049 return PACKEDRAWEVENT_StorageType;
00050 }
|
|
override the RawDataBaseCnv version
|
|
override the RawDataBaseCnv version
00086 { 00087 // Purpose and Method: This method does nothing other than announce it has 00088 // been called. 00089 00090 //MsgStream log(msgSvc(), "RawDataCnv"); 00091 //log << MSG::DEBUG << "RawDataCnv::updateObj" << endreq; 00092 return Converter::updateObj(pAddr, pObj); 00093 }
|
|
Update the converted representation of a transient object.
|
|
Update the converted representation of a transient object.
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 }
|
|
Update the references of an already converted object.
|
|
Update the references of an already converted object.
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 }
|
|
|
|
Pointer to event conversion service interface.
|
|
Pointer to event conversion service interface.
|
|
|
|
|
|
Leaf objects giving the locations of the objects in the data store.
|
|
Leaf objects giving the locations of the objects in the data store.
|