12#include "GaudiKernel/Converter.h"
13#include "GaudiKernel/MsgStream.h"
15#include "GaudiKernel/ThreadGaudi.h"
18#include "EventModel/Event.h"
19#include "RawDataCnv/RawDataCnv.h"
20#include "RawDataCnv/RawDataAddress.h"
21#include "RawDataCnv/RawDataInputSvc.h"
22#include "RawDataCnv/EventManagement/RAWEVENT.h"
36 if( sc.isFailure() )
return sc;
38 std::string PackedRawDataCnvSvc_Name(
"PackedRawDataCnvSvc");
39 std::string RawDataInputSvc_Name(
"RawDataInputSvc");
40 std::string RawDataCnv_Name(
"RawDataCnv");
46 SmartIF<IService> pCnvSvc(conversionSvc());
47 if (isGaudiThreaded(pCnvSvc->name())){
48 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
49 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
50 RawDataCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
55 MsgStream log(messageService(), RawDataCnv_Name.c_str());
66 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc);
67 if(sc != StatusCode::SUCCESS ) {
68 log<<MSG::WARNING <<
" Cant get RawDataInputSvc " <<endreq;
73 if(m_inputSvc == 0 ) {
74 log<<MSG::WARNING <<
" Cant cast to RawDataInputSvc " <<endreq;
75 return StatusCode::FAILURE ;
78 return StatusCode::SUCCESS;
94 return Converter::updateObj(pAddr, pObj);
108 if (evt == NULL)
return StatusCode::FAILURE;
109 return StatusCode::SUCCESS;
112 return StatusCode::FAILURE;
120 std::string RawDataCnv_Name(
"RawDataCnv");
124 SmartIF<IService> pCnvSvc(conversionSvc());
125 if (isGaudiThreaded(pCnvSvc->name())){
126 RawDataCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
129 MsgStream log(
msgSvc(), RawDataCnv_Name.c_str());
130 log << MSG::DEBUG <<
"RawDataCnv::createRep()" << endreq;
132 log << MSG::ERROR <<
"Could not downcast Event" << endreq;
133 return StatusCode::FAILURE;
136 return StatusCode::SUCCESS;
unsigned const long PACKEDRAWEVENT_StorageType
virtual StatusCode updateObj(IOpaqueAddress *, DataObject *)
override the RawDataBaseCnv version
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj)
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr)
Convert the transient object to the requested representation.
static const CLID & classID()
RawDataCnv(ISvcLocator *svc)