12#include "GaudiKernel/MsgStream.h"
13#include "GaudiKernel/SmartDataPtr.h"
14#include "GaudiKernel/IDataProviderSvc.h"
16#include "GaudiKernel/ThreadGaudi.h"
50 std::string PackedRawDataCnvSvc_Name(
"PackedRawDataCnvSvc");
51 std::string RawDataInputSvc_Name(
"RawDataInputSvc");
52 std::string RawDataTofDigiCnv_Name(
"RawDataTofDigiCnv");
57 SmartIF<IService> pCnvSvc(conversionSvc());
58 if (isGaudiThreaded(pCnvSvc->name())){
59 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
60 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
61 RawDataTofDigiCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
66 if ( sc.isFailure() ) {
70 MsgStream log(messageService(), RawDataTofDigiCnv_Name.c_str());
74 StatusCode status = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc,
true);
76 if(m_RawDataAccess == 0 ) {
77 log<<MSG::ERROR<<
" RawDataTofCnv: Cant cast to RawDataCnvSvc " <<endreq;
78 return StatusCode::FAILURE ;
82 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc);
88 if ( m_inputSvc == 0 ) {
89 log<<MSG::WARNING<<
" Cant cast to RawDataInputSvc " <<endreq;
90 return StatusCode::FAILURE ;
95 return StatusCode::SUCCESS;
105 return Converter::updateObj(pAddr, pObj);
111 MsgStream log(
msgSvc(),
"RawDataTofDigiCnv");
113 uint32_t TEId, TEData, TEOverflow, TETorQ;
123 dataProvider()->findObject(
"/Event/Digi/LumiDigiCol", pLumi);
124 if ( pLumi == NULL ) {
126 StatusCode sc = dataProvider()->registerObject(
"/Event/Digi/LumiDigiCol", lumiDigiCol);
127 if ( sc.isFailure() ) {
128 log << MSG::ERROR <<
"Could not register LumiDigiCol in TDS!" << endreq;
138 cout <<
"RawDataTofDigiCnv::createObj has no event!" << endl;
139 return StatusCode::FAILURE;
144 return m_cnv->
convert(tofBuf, digiCol, lumiDigiCol);
155 return StatusCode::FAILURE;
161 return StatusCode::FAILURE;
178 return m_cnv->
convert(digiCol, re);
unsigned const long PACKEDRAWEVENT_StorageType
const CLID & CLID_TofDigiCol
ObjectVector< LumiDigi > LumiDigiCol
const CLID & CLID_TofDigiCol
ObjectVector< TofDigi > TofDigiCol
virtual WriteRawEvent *& getRawEvent()
const BufferHolder & getTofBuf() const
static const CLID & classID()
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr)
Convert the transient object to the requested representation.
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj)
RawDataTofDigiCnv(ISvcLocator *svc)
virtual StatusCode updateObj(IOpaqueAddress *, DataObject *)
override the RawDataBaseCnv version
StatusCode convert(const BufferHolder &src, TofDigiCol *des, LumiDigiCol *des2=0)
static TofConverter * instance()
_EXTERN_ std::string TofDigiCol