53 std::string PackedRawDataCnvSvc_Name(
"PackedRawDataCnvSvc");
54 std::string RawDataInputSvc_Name(
"RawDataInputSvc");
55 std::string RawDataMucMcHitCnv_Name(
"RawDataMucMcHitCnv");
60 SmartIF<IService> pCnvSvc(conversionSvc());
61 if (isGaudiThreaded(pCnvSvc->name())){
62 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
63 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
64 RawDataMucMcHitCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
69 MsgStream log(messageService(), RawDataMucMcHitCnv_Name.c_str());
72 if (StatusCode::SUCCESS != sc) {
73 log << MSG::ERROR <<
"RawDataBaseCnv: Cant initialize PackedRawDataCnvSvc" << endreq;
79 sc = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc,
true);
80 if (sc != StatusCode::SUCCESS) {
81 log << MSG::ERROR <<
"Cant get PackedRawDataCnvSvc" << endreq;
85 if (m_RawDataAccess == 0 ) {
86 log << MSG::ERROR <<
"RawDataMucCnv: Cant cast to RawDataCnvSvc " << endreq;
87 return StatusCode::FAILURE;
90 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), isvc);
91 if (sc != StatusCode::SUCCESS ) {
92 log << MSG::WARNING <<
"Cant get RawDataInputSvc " << endreq;
97 if (m_inputSvc == 0 ) {
98 log << MSG::WARNING <<
"Cant cast to RawDataInputSvc " << endreq;
99 return StatusCode::FAILURE ;
102 return StatusCode::SUCCESS;
124 RAWEVENT *evt = m_inputSvc->currentEvent();
127 return StatusCode::FAILURE;
135 std::vector<uint32_t>::const_iterator
iter = evt->
getMucTruth().begin();
136 std::vector<uint32_t>::const_iterator eiter = evt->
getMucTruth().end();
138 for (
int mucMcHitId = 0;
iter != eiter; mucMcHitId++) {
140 m_mucMcHitBuilder.unPack(
iter, eiter, m_MucTruth);
146 m_MucTruth.
x/(m_mucMcHitBuilder.m_xCoeff*1.0),
147 m_MucTruth.
y/(m_mucMcHitBuilder.m_yCoeff*1.0),
148 m_MucTruth.
z/(m_mucMcHitBuilder.m_zCoeff*1.0),
149 m_MucTruth.
px/(m_mucMcHitBuilder.m_pxCoeff*1.0),
150 m_MucTruth.
py/(m_mucMcHitBuilder.m_pyCoeff*1.0),
151 m_MucTruth.
pz/(m_mucMcHitBuilder.m_pzCoeff*1.0) );
153 mucMcHitCol->push_back(mucMcHit);
156 return StatusCode::SUCCESS;