#include <RawDataMdcDigiCnv.h>
Inheritance diagram for RawDataMdcDigiCnv:
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 |
RawDataMdcDigiCnv (ISvcLocator *svc) | |
RawDataMdcDigiCnv (ISvcLocator *svc) | |
~RawDataMdcDigiCnv () | |
~RawDataMdcDigiCnv () | |
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 | |
MdcConverter * | m_cnv |
MdcConverter for packing or unpacking data. | |
MdcConverter * | m_cnv |
MdcConverter for packing or unpacking data. | |
IRawDataInputSvc * | m_inputSvc |
IRawDataInputSvc * | m_inputSvc |
PackedRawDataCnvSvc * | m_RawDataAccess |
Define the interface to raw data cnv. | |
PackedRawDataCnvSvc * | m_RawDataAccess |
Define the interface to raw data cnv. | |
int | m_runFrom |
int | m_runTo |
Friends | |
class | CnvFactory<RawDataMdcDigiCnv> |
|
|
|
|
|
|
|
|
|
00032 : 00033 RawDataBaseCnv(PACKEDRAWEVENT_StorageType, classID(), svc) 00034 { 00035 PropertyMgr m_propMgr; 00036 m_propMgr.declareProperty("ExWireFromRun", m_runFrom = 0 ); 00037 m_propMgr.declareProperty("ExWireToRun", m_runTo = 999999); 00038 00039 IJobOptionsSvc* jobSvc; 00040 serviceLocator()->service("JobOptionsSvc", jobSvc); 00041 jobSvc->setMyProperties("RawDataMdcDigiCnv", &m_propMgr); 00042 }
|
|
00045 { 00046 MdcConverter::destroy(); 00047 }
|
|
|
|
|
|
Reimplemented from RawDataBaseCnv. |
|
Reimplemented from RawDataBaseCnv. 00052 {
00053 return CLID_MdcDigiCol;
00054 }
|
|
|
|
|
|
|
|
00120 { 00121 //MsgStream log(msgSvc(), "RawDataMdcDigiCnv"); 00122 00123 // Purpose and Method: This converter will create an empty MdcDigiCol on 00124 // the TDS. 00125 MdcDigiCol *digiCol = new MdcDigiCol; 00126 pObj = digiCol; 00127 00128 RAWEVENT* evt = m_inputSvc->currentEvent(); 00129 00130 if (evt == NULL) { 00131 //log << MSG::ERROR << "RawDataMdcDigiCnv::createObj has event!" << endreq; 00132 return StatusCode::FAILURE; 00133 } 00134 00135 int runId = evt->eventHeader().run_number(); 00136 m_cnv->setRunId(runId); 00137 00138 const BufferHolder& mdcBuf = evt->getMdcBuf(); 00139 00140 return m_cnv->convert(mdcBuf, digiCol); 00141 }
|
|
Convert the transient object to the requested representation.
Reimplemented from RawDataBaseCnv. |
|
Convert the transient object to the requested representation.
Reimplemented from RawDataBaseCnv. 00144 { 00145 // convert PixelRaw in the container into ByteStream 00146 MsgStream log(messageService(), "RawDataMdcDigiCnv"); 00147 00148 WriteRawEvent*& re = m_RawDataAccess->getRawEvent(); 00149 if (re == 0) { 00150 log << " get RawEvent failed !" << endreq; 00151 return StatusCode::FAILURE; 00152 } 00153 00154 SmartDataPtr<MdcDigiCol> digiCol(dataProvider(), EventModel::Digi::MdcDigiCol); 00155 if (digiCol == 0) { 00156 log << "no MdcDigiCol found" << endreq; 00157 return StatusCode::FAILURE; 00158 } 00159 /* 00160 else { 00161 log << MSG::DEBUG << endreq << "Detailed dump of 1st event: " << endreq << endreq; 00162 int ndigi = 0; 00163 MdcDigiCol::const_iterator pMdcDigi = digiCol->begin(); 00164 for (pMdcDigi; pMdcDigi!= digiCol->end(); pMdcDigi++) { 00165 log <<MSG::INFO << "Digi " << ndigi++ << " "; 00166 // output the digi proper: " << digi " no longer works because 00167 // "digi" now returns an integer sort order 00168 (**pMdcDigi).fillStream(log.stream()); 00169 log << endreq; 00170 } 00171 } 00172 */ 00173 00174 return m_cnv->convert(digiCol, re); 00175 }
|
|
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. 00057 { 00058 std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc"); 00059 std::string RawDataInputSvc_Name("RawDataInputSvc"); 00060 std::string RawDataMdcDigiCnv_Name("RawDataMdcDigiCnv"); 00061 00062 // for Mutil-thread by tianhl 00063 ConversionSvc* pCnvSvc = 0; 00064 if (pCnvSvc = dynamic_cast<ConversionSvc*>(conversionSvc())){ 00065 if (isGaudiThreaded(pCnvSvc->name())){ 00066 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00067 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00068 RawDataMdcDigiCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00069 } 00070 } 00071 00072 00073 StatusCode sc = RawDataBaseCnv::initialize(); 00074 if ( sc.isFailure() ) { 00075 return sc; 00076 } 00077 00078 MsgStream log(messageService(), RawDataMdcDigiCnv_Name.c_str()); 00079 00080 // Check RawDataCnvSvc 00081 IService* isvc = 0; 00082 StatusCode status = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc, true); 00083 m_RawDataAccess = dynamic_cast<PackedRawDataCnvSvc*> (isvc); 00084 if(m_RawDataAccess == 0 ) { 00085 log<<MSG::ERROR<< " RawDataMdcCnv: Cant cast to RawDataCnvSvc " <<endreq; 00086 return StatusCode::FAILURE ; 00087 } 00088 00089 IService* svc ; 00090 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc); 00091 //if ( sc.isFailure() ) { 00092 // log<<MSG::WARNING << " Cant get RawDataInputSvc " <<endreq; 00093 // return sc ; 00094 //} 00095 m_inputSvc = dynamic_cast<RawDataInputSvc*> (svc); 00096 if(m_inputSvc == 0 ) { 00097 log<<MSG::WARNING<< " Cant cast to RawDataInputSvc " <<endreq; 00098 return StatusCode::FAILURE ; 00099 } 00100 00101 m_cnv = MdcConverter::instance( m_inputSvc->runMode() ); 00102 00103 m_cnv->init(m_runFrom, m_runTo); 00104 00105 return StatusCode::SUCCESS; 00106 }
|
|
|
|
|
|
Reimplemented from RawDataBaseCnv. 00046 {
00047 return PACKEDRAWEVENT_StorageType;
00048 }
|
|
Reimplemented from RawDataBaseCnv. 00046 {
00047 return PACKEDRAWEVENT_StorageType;
00048 }
|
|
Reimplemented from RawDataBaseCnv. 00050 {
00051 return PACKEDRAWEVENT_StorageType;
00052 }
|
|
Reimplemented from RawDataBaseCnv. 00050 {
00051 return PACKEDRAWEVENT_StorageType;
00052 }
|
|
override the RawDataBaseCnv version
|
|
override the RawDataBaseCnv version
00109 { 00110 // Purpose and Method: This method does nothing other than announce it has 00111 // been called. 00112 00113 //MsgStream log(msgSvc(), "RawDataMdcDigiCnv"); 00114 //log << MSG::DEBUG << "RawDataMdcDigiCnv::updateObj" << endreq; 00115 return Converter::updateObj(pAddr, pObj); 00116 }
|
|
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 }
|
|
|
|
MdcConverter for packing or unpacking data.
|
|
MdcConverter for packing or unpacking data.
|
|
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.
|
|
Define the interface to raw data cnv.
|
|
Define the interface to raw data cnv.
|
|
|
|
|