#include <RawDataMucDigiCnv.h>
Inheritance diagram for RawDataMucDigiCnv:
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 |
RawDataMucDigiCnv (ISvcLocator *svc) | |
RawDataMucDigiCnv (ISvcLocator *svc) | |
~RawDataMucDigiCnv () | |
~RawDataMucDigiCnv () | |
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 | |
MucConverter * | m_cnv |
EmcConverter for packing or unpacking data. | |
MucConverter * | m_cnv |
EmcConverter 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. | |
Friends | |
class | CnvFactory<RawDataMucDigiCnv> |
|
|
|
|
|
|
|
|
|
00030 : 00031 RawDataBaseCnv(PACKEDRAWEVENT_StorageType, classID(), svc) 00032 { 00033 }
|
|
00036 { 00037 MucConverter::destroy(); 00038 }
|
|
|
|
|
|
Reimplemented from RawDataBaseCnv. |
|
Reimplemented from RawDataBaseCnv. 00043 {
00044 return CLID_MucDigiCol;
00045 }
|
|
|
|
|
|
|
|
00108 { 00109 //MsgStream log(msgSvc(), "RawDataMucDigiCnv"); 00110 // Purpose and Method: This converter will create an empty MucDigiCol on 00111 // the TDS. 00112 MucDigiCol *digiCol = new MucDigiCol; 00113 pObj = digiCol; 00114 00115 RAWEVENT* evt = m_inputSvc->currentEvent(); 00116 if (evt == NULL) { 00117 cout << "RawDataMucDigiCnv::createObj has event!" << endl; 00118 return StatusCode::FAILURE; 00119 } 00120 00121 const BufferHolder& mucBuf = evt->getMucBuf(); 00122 00123 return m_cnv->convert(mucBuf, digiCol); 00124 }
|
|
Convert the transient object to the requested representation.
Reimplemented from RawDataBaseCnv. |
|
Convert the transient object to the requested representation.
Reimplemented from RawDataBaseCnv. 00127 { 00128 // convert PixelRaw in the container into ByteStream 00129 //MsgStream log(messageService(), "RawDataMucDigiCnv"); 00130 00131 WriteRawEvent*& re = m_RawDataAccess->getRawEvent(); 00132 if (re == 0) { 00133 //log << " get RawEvent failed !" << endreq; 00134 return StatusCode::FAILURE; 00135 } 00136 00137 SmartDataPtr<MucDigiCol> digiCol(dataProvider(), EventModel::Digi::MucDigiCol); 00138 if (digiCol == 0) { 00139 //log << "no MucDigiCol found" << endreq; 00140 return StatusCode::FAILURE; 00141 } 00142 /* 00143 else { 00144 log << MSG::INFO << endreq << "Detailed dump of 1st event: " << endreq << endreq; 00145 int ndigi = 0; 00146 MucDigiCol::const_iterator pMucDigi = digiCol->begin(); 00147 for (pMucDigi; pMucDigi!= digiCol->end(); pMucDigi++) { 00148 log <<MSG::INFO << "Digi " << ndigi++ << " "; 00149 // output the digi proper: " << digi " no longer works because 00150 // "digi" now returns an integer sort order 00151 (**pMucDigi).fillStream(log.stream()); 00152 log << endreq; 00153 } 00154 } 00155 */ 00156 00157 return m_cnv->convert(digiCol, re); 00158 }
|
|
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. 00048 { 00049 std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc"); 00050 std::string RawDataInputSvc_Name("RawDataInputSvc"); 00051 std::string RawDataMucDigiCnv_Name("RawDataMucDigiCnv"); 00052 00053 // for Mutil-thread by tianhl 00054 ConversionSvc* pCnvSvc = 0; 00055 if (pCnvSvc = dynamic_cast<ConversionSvc*>(conversionSvc())){ 00056 if (isGaudiThreaded(pCnvSvc->name())){ 00057 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00058 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00059 RawDataMucDigiCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name()); 00060 } 00061 } 00062 00063 MsgStream log(messageService(), RawDataMucDigiCnv_Name.c_str()); 00064 00065 StatusCode sc = RawDataBaseCnv::initialize(); 00066 if ( sc.isFailure() ) { 00067 return sc; 00068 } 00069 00070 // Check RawDataCnvSvc 00071 IService* isvc = 0; 00072 StatusCode status = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc, true); 00073 m_RawDataAccess = dynamic_cast<PackedRawDataCnvSvc*> (isvc); 00074 if(m_RawDataAccess == 0 ) { 00075 log<<MSG::ERROR<< " MucRawDataCnv: Cant cast to RawDataCnvSvc " <<endreq; 00076 return StatusCode::FAILURE ; 00077 } 00078 00079 IService* svc ; 00080 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc); 00081 //if ( sc.isFailure() ) { 00082 // log<<MSG::WARNING << " Cant get RawDataInputSvc " <<endreq; 00083 // return sc ; 00084 //} 00085 m_inputSvc = dynamic_cast<RawDataInputSvc*> (svc); 00086 if ( m_inputSvc == 0 ) { 00087 log<< MSG::WARNING << " Cant cast to RawDataInputSvc " <<endreq; 00088 return StatusCode::FAILURE ; 00089 } 00090 00091 m_cnv = MucConverter::instance(); 00092 00093 return StatusCode::SUCCESS; 00094 }
|
|
|
|
|
|
Reimplemented from RawDataBaseCnv. 00045 {
00046 return PACKEDRAWEVENT_StorageType;
00047 }
|
|
Reimplemented from RawDataBaseCnv. 00045 {
00046 return PACKEDRAWEVENT_StorageType;
00047 }
|
|
Reimplemented from RawDataBaseCnv. 00049 {
00050 return PACKEDRAWEVENT_StorageType;
00051 }
|
|
Reimplemented from RawDataBaseCnv. 00049 {
00050 return PACKEDRAWEVENT_StorageType;
00051 }
|
|
override the RawDataBaseCnv version
|
|
override the RawDataBaseCnv version
00097 { 00098 // Purpose and Method: This method does nothing other than announce it has 00099 // been called. 00100 00101 //MsgStream log(msgSvc(), "RawDataMucDigiCnv"); 00102 //log << MSG::DEBUG << "RawDataMucDigiCnv::updateObj" << endreq; 00103 return Converter::updateObj(pAddr, pObj); 00104 }
|
|
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 }
|
|
|
|
EmcConverter for packing or unpacking data.
|
|
EmcConverter 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.
|