30 if ( sc.isFailure() )
return sc;
32 std::string PackedRawDataCnvSvc_Name(
"PackedRawDataCnvSvc");
33 std::string RawDataInputSvc_Name(
"RawDataInputSvc");
34 std::string RawDataEvtHeaderCnv_Name(
"RawDataEvtHeaderCnv");
39 SmartIF<IService> pCnvSvc(conversionSvc());
40 if (isGaudiThreaded(pCnvSvc->name())){
41 PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
42 RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
43 RawDataEvtHeaderCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
47 MsgStream log(messageService(), RawDataEvtHeaderCnv_Name.c_str());
50 sc = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), svc);
51 if ( sc.isFailure() ) {
52 log << MSG::ERROR <<
"Can't get RawDataAccess interface" << endreq;
53 return StatusCode::FAILURE;
57 if (m_RawDataAccess == 0 ) {
58 log << MSG::ERROR <<
"RawDataEvtHeaderCnv: Cant cast to RawDataCnvSvc" << endreq;
59 return StatusCode::FAILURE;
62 sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc);
63 if ( sc.isFailure() ) {
64 log << MSG::WARNING <<
"Cant get RawDataInputSvc " << endreq;
69 if ( m_inputSvc == 0 ) {
70 log << MSG::ERROR <<
"Cant cast to RawDataInputSvc" << endreq;
71 return StatusCode::FAILURE ;
74 _localRevisor =
dynamic_cast<RawDataInputSvc*
>(m_inputSvc)->offlineRevisor();
76 return StatusCode::SUCCESS;
103 if (evt ==
NULL)
return StatusCode::FAILURE;
112 if ( rBuf.
nBuf() == 1 ) {
113 uint32_t dataLen = rBuf.
bufSize(0);
114 uint32_t * dataPtr = rBuf(0);
123 if ( dataLen > 11 && dataPtr[1] == 0xffffffff ) {
125 if ( (dataPtr[start] >> 24) == 0xcf ) {
128 unsigned long t1 = calEts( dataPtr + start );
131 static unsigned long t2 = 0;
132 if ( (start+3) < dataLen && dataPtr[start+2] != 0xf0f0f0f0 ) {
133 if ((dataPtr[start+2]>>24) == 0xd1 ) {
134 t2 = calEts( dataPtr + start + 2 );
137 uint32_t _dataT2[2] = {dataPtr[10], dataPtr[12]};
138 unsigned long _t2 = calEts( _dataT2 );
139 if ( labs(_t2-t2) < 150*2000 ) {
142 else if ( labs(_t2-2000000-t2) < 150*2000 ) {
145 else if ( labs(_t2+2000000-t2) < 150*2000 ) {
169 return StatusCode::SUCCESS;