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