48 std::string PackedRawDataCnvSvc_Name(
"PackedRawDataCnvSvc");
49 std::string RawDataInputSvc_Name(
"RawDataInputSvc");
50 std::string RawDataHltRawCnv_Name(
"RawDataHltRawCnv");
55 SmartIF<IService> pCnvSvc(conversionSvc());
56 if (isGaudiThreaded(pCnvSvc->name())){
57 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
58 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
59 RawDataHltRawCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
63 MsgStream log(messageService(), RawDataHltRawCnv_Name.c_str());
65 if (StatusCode::SUCCESS != sc) {
72 StatusCode status = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc,
true);
75 if(m_RawDataAccess == 0 ) {
76 log<<MSG::ERROR<<
" RawDataCnv: Cant cast to RawDataCnvSvc " <<endreq;
77 return StatusCode::FAILURE ;
81 log << MSG::INFO <<
"RawDataCnvSvc retrieved "<< endreq;
84 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc);
85 if(sc != StatusCode::SUCCESS ) {
86 log<<MSG::WARNING <<
" Cant get RawDataInputSvc " <<endreq;
91 if(m_inputSvc == 0 ) {
92 log<<MSG::WARNING<<
" Cant cast to RawDataInputSvc " <<endreq;
93 return StatusCode::FAILURE ;
96 return StatusCode::SUCCESS;
121 RAWEVENT *evt = m_inputSvc->currentEvent();
123 cout <<
"RawDataHltRawCnv::createObj can't get event!" << endl;
124 return StatusCode::FAILURE;
129 uint32_t nbuf = hltBuf.
nBuf();
131 uint32_t REId = 0, TEId = 0;
132 uint32_t nmdc=0,ntof=0,nemc=0,nmuc=0;
133 for (uint32_t i = 0; i < nbuf; i++) {
134 uint32_t* buf = hltBuf(i);
135 uint32_t bufSize = hltBuf.
bufSize(i);
136 for (uint32_t j = 0; j < bufSize; j++, digiId++) {
138 m_hltBuilder.unPack(buf[j], digiId, REId, TEData[0], TEData[1]);
139 TEId = m_hltBuilder.getTEID(REId);
140 if ( TEId == 0xFFFFFFFF )
continue;
144 for (uint32_t k=0; k< 2;k++){
146 if(k==0||(k==1&&TEData[k])){
150 ntof=(TEData[k]>>8)&0xFF;
151 nemc=(TEData[k]>>16)&0xFF;
152 nmuc=(TEData[k]>>24)&0xFF;
160 digiCol->push_back ( hltRaw );
165 return StatusCode::SUCCESS;
static Identifier convert(const unsigned int id, const int nmdc=0, const int ntof=0, const int nemc=0, const int nmuc=0)
convert global id to sub-id(Identifier)