46{
47
48 std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc");
49 std::string RawDataInputSvc_Name("RawDataInputSvc");
50 std::string RawDataMcParticleCnv_Name("RawDataMcParticleCnv");
51
52
53
54
55 SmartIF<IService> pCnvSvc(conversionSvc());
56 if (isGaudiThreaded(pCnvSvc->name())){
57 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
58 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
59 RawDataMcParticleCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
60 }
61
62
63 MsgStream log(messageService(), RawDataMcParticleCnv_Name.c_str());
64
66 if (StatusCode::SUCCESS != sc) {
67 log << MSG::ERROR << "RawDataBaseCnv: Cant initialize PackedRawDataCnvSvc" << endreq;
68 return sc;
69 }
70
71
72 IService* isvc = 0;
73 sc = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc, true);
74 if (sc != StatusCode::SUCCESS) {
75 log << MSG::ERROR << "Cant get PackedRawDataCnvSvc" << endreq;
76 }
77
78 m_RawDataAccess = dynamic_cast<PackedRawDataCnvSvc*> (isvc);
79 if (m_RawDataAccess == 0 ) {
80 log << MSG::ERROR << "RawDataMcParticleCnv: Cant cast to RawDataCnvSvc " << endreq;
81 return StatusCode::FAILURE;
82 }
83
84 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), isvc);
85 if (sc != StatusCode::SUCCESS ) {
86 log << MSG::WARNING << "Cant get RawDataInputSvc " << endreq;
87 return sc ;
88 }
89
90 m_inputSvc = dynamic_cast<RawDataInputSvc*> (isvc);
91 if (m_inputSvc == 0 ) {
92 log << MSG::WARNING << "Cant cast to RawDataInputSvc " << endreq;
93 return StatusCode::FAILURE ;
94 }
95
96 return StatusCode::SUCCESS;
97}