12#include "GaudiKernel/MsgStream.h"
13#include "GaudiKernel/IRegistry.h"
15#include "GaudiKernel/ThreadGaudi.h"
18#include "McTruth/McEvent.h"
19#include "RawDataCnv/RawDataAddress.h"
20#include "RawDataCnv/RawDataInputSvc.h"
21#include "RawDataCnv/RawDataMcCnv.h"
42 std::string PackedRawDataCnvSvc_Name(
"PackedRawDataCnvSvc");
43 std::string RawDataInputSvc_Name(
"RawDataInputSvc");
44 std::string RawDataMcCnv_Name(
"RawDataMcCnv");
49 SmartIF<IService> pCnvSvc(conversionSvc());
50 if (isGaudiThreaded(pCnvSvc->name())){
51 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
52 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
53 RawDataMcCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
58 MsgStream log(messageService(), RawDataMcCnv_Name.c_str());
61 if (StatusCode::SUCCESS != sc) {
62 log << MSG::ERROR <<
"RawDataBaseCnv: Cant initialize PackedRawDataCnvSvc" << endreq;
68 sc = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc,
true);
69 if (sc != StatusCode::SUCCESS) {
70 log << MSG::ERROR <<
"Cant get PackedRawDataCnvSvc" << endreq;
74 if (m_RawDataAccess == 0 ) {
75 log << MSG::ERROR <<
"RawDataMdcCnv: Cant cast to RawDataCnvSvc " << endreq;
76 return StatusCode::FAILURE;
79 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), isvc);
80 if (sc != StatusCode::SUCCESS ) {
81 log << MSG::WARNING <<
"Cant get RawDataInputSvc " << endreq;
86 if (m_inputSvc == 0 ) {
87 log << MSG::ERROR <<
"Cant cast to RawDataInputSvc " << endreq;
88 return StatusCode::FAILURE ;
91 return StatusCode::SUCCESS;
101 return Converter::updateObj(pAddr, pObj);
112 return StatusCode::SUCCESS;
121 std::string nm = pObj->registry()->name();
127 return StatusCode::SUCCESS;
const CLID & CLID_McEvent
unsigned const long PACKEDRAWEVENT_StorageType
const CLID & CLID_McEvent
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()
RawDataMcCnv(ISvcLocator *svc)