ATLAS Offline Software
Loading...
Searching...
No Matches
LArRodDecoder.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Implementation of LArRodDecoder class
7#include "GaudiKernel/TypeNameString.h"
8#include "GaudiKernel/MsgStream.h"
9#include "GaudiKernel/Bootstrap.h"
10#include "GaudiKernel/ISvcLocator.h"
11#include "GaudiKernel/IToolSvc.h"
12
16// IWS 14.07.2005
18// IWS 25.04.2006
29#include <algorithm>
30#include <fstream>
31
35
36static const InterfaceID IID_ILArRodDecoder
37 ("LArRodDecoder", 1, 0);
38
39LArRodDecoder::LArRodDecoder ( const std::string& type, const std::string& name,const IInterface* parent )
40 : AthAlgTool(type,name,parent),
42 m_readtdc(false),
44 {
45 declareInterface< LArRodDecoder >( this );
46 declareProperty("IgnoreCheckFEBs",m_IgnoreCheckFEBs);
47 declareProperty("CellCorrections",m_LArCellCorrNames );
48 declareProperty("LArCellEthreshold",m_LArCellEthreshold );
49 declareProperty("ReadTDC",m_readtdc);
50 declareProperty("DelayScale",m_delayScale=(25./240.)*CLHEP::ns);
51 declareProperty("FebExchange", m_febExchange=0); //FIXME: Very ugly hack! See explanation in .h file
52 declareProperty("FebId1", m_febId1=0);
53 declareProperty("FebId2", m_febId2=0);
54 declareProperty("FirstSample", m_firstSample=0); //FIXME: Very ugly hack! See explanation in .h file
55
56 declareProperty("BEPreselection",m_vBEPreselection,"For channel-selection: Barrel=0, Endcap=1");
57 declareProperty("PosNegPreselection",m_vPosNegPreselection,"For channel-selection: C-Side:0, A-Side: 1");
58 declareProperty("FTNumPreselection",m_vFTPreselection,"For channel-selection: Feedthrough numbers (e.g. 0 - 31 for barrel)");
59 declareProperty("MultiDSPMode", m_MultiDSPMode=false);
60 declareProperty("CheckSum", m_CheckSum=false);
61 declareProperty("StatusMask", m_StatusMask=0x00000212);
62 declareProperty("RequiredPhysicsNSamples", m_requiredPhysicsNSamples = 0);
63}
64
65// destructor
69
70const InterfaceID& LArRodDecoder::interfaceID( )
71{ return IID_ILArRodDecoder; }
72
73StatusCode
74LArRodDecoder::initialize ATLAS_NOT_THREAD_SAFE ()
75{
76 // Before anything, access message service
77 m_StatusNMask = !m_StatusMask;
78
79 StatusCode sc = detStore()->retrieve(m_onlineHelper, "LArOnlineID");
80 if (sc.isFailure()) {
81 ATH_MSG_ERROR ("Could not get LArOnlineID helper !");
82 return sc;
83 }
84
85 ATH_CHECK( m_evt.initialize() );
86
87 std::vector<std::string>::const_iterator it = m_LArCellCorrNames.begin();
88 std::vector<std::string>::const_iterator it_end = m_LArCellCorrNames.end();
89 for(; it!=it_end;++it)
90 {
91 IAlgTool* tool;
92 CaloCellCorrection* corr;
93 Gaudi::Utils::TypeNameString li(*it);
94 if((toolSvc()->retrieveTool(li.type(), li.name(), tool)).isFailure() )
95 {
96 ATH_MSG_ERROR(" Can't get AlgTool for CaloCellCorrection ");
97 return StatusCode::FAILURE;
98 }
99
100 corr = dynamic_cast<CaloCellCorrection*> (tool);
101 if(!corr )
102 {
103 ATH_MSG_ERROR(" Can't d-cast to CaloCellCorrection* ");
104 return StatusCode::FAILURE;
105 }
106 m_LArCellCorrTools.push_back(corr);
107 }
108
109 //Build list of preselected Feedthroughs
110 if (m_vBEPreselection.size() && m_vPosNegPreselection.size() && m_vFTPreselection.size()) {
111 ATH_MSG_INFO("Building list of selected feedthroughs");
112 for (const unsigned BE : m_vBEPreselection) {
113 for (const unsigned PN : m_vPosNegPreselection) {
114 for (const unsigned FT : m_vFTPreselection) {
115 HWIdentifier finalFTId=m_onlineHelper->feedthrough_Id(BE,PN,FT);
116 unsigned int finalFTId32 = finalFTId.get_identifier32().get_compact();
117 ATH_MSG_INFO("Adding feedthrough Barrel/Endcap=" << BE << " pos/neg=" << PN << " FT=" << FT
118 << " (0x" << std::hex << finalFTId32 << std::dec << ")");
119 m_vFinalPreselection.push_back(finalFTId32);
120 }
121 }
122 }
123 std::sort(m_vFinalPreselection.begin(),m_vFinalPreselection.end());
124 }//end if something set
125 else {
126 if (m_vBEPreselection.size() || m_vPosNegPreselection.size() || m_vFTPreselection.size()) {
127 ATH_MSG_ERROR("Feedthrough preselection: jobOption inconsistency! ");
128 ATH_MSG_ERROR("Need to set all three jobOptions BEPreselection PNPreselecton and FTPreselection");
129 return StatusCode::FAILURE;
130 }
131 ATH_MSG_DEBUG("No feedthrough preselection by jobOptions.");
132 }
133 return sc;
134}
135
136
137
139 const uint32_t* p, uint32_t n, LArDigitContainer& coll, CaloGain::CaloGain RequestedGain) const
140{ // Digit pointer
141 LArDigit * dg=0 ;
142 CaloGain::CaloGain calogain;
143 uint32_t gain;
144 int fcNb;
145 std::vector<short> samples;
146 LArRodBlockStructure* BlStruct=prepareBlockStructure(robFrag, p, n, RequestedGain);
147 if (!BlStruct) return;
148
149 do {
150 HWIdentifier fId( Identifier32(BlStruct->getFEBID()) );
151 unsigned int fId32 = fId.get_identifier32().get_compact();
152 if (!m_onlineHelper->isValidId(fId)) {
153 ATH_MSG_WARNING("Invalid FEB identifer 0x" << std::hex << fId32 << std::dec << ". Skipping");
154 continue;
155 }
156 if(m_febExchange) {
157 if (fId32 == m_febId1) {
159 fId32 = fId.get_identifier32().get_compact();
160 }
161 else if(fId32 == m_febId2) {
163 fId32 = fId.get_identifier32().get_compact();
164 }
165 }
166
167 // IWS 24.01.2006 protection against NULL events (null pointer to rawdata block)
168 if (!BlStruct->hasRawDataBlock())
169 {
170 ATH_MSG_DEBUG("No Raw Data for this FEB - NULL event for FEBID 0x"<< std::hex << BlStruct->getFEBID() << std::dec);
171 continue;
172 }
173
174 // RL 04.17.2008 skip check for some FEBs
175 int do_check=1;
176 std::vector<unsigned int>::const_iterator it_feb = m_IgnoreCheckFEBs.begin();
177 std::vector<unsigned int>::const_iterator it_feb_end = m_IgnoreCheckFEBs.end();
178 for(; it_feb!=it_feb_end;++it_feb)
179 if(fId==*it_feb) {
180 do_check=0;
181 break;
182 }
183 if(do_check) {
184 //WL 31.10.2007 //check RodStatus-word to catch corrupt events
185 if (BlStruct->getStatus() & m_StatusNMask) {
186 ATH_MSG_WARNING("RodStatus&0x" << std::hex << m_StatusNMask << " indicates corrupt data for FEB "<< std::hex << fId32 << std::dec <<". Ignored.");
187 continue;
188 }
189 }
190 // RL 05.11.2007 checksum
191 if(m_CheckSum) {
192 const uint32_t onsum = BlStruct->onlineCheckSum();
193 const uint32_t offsum = BlStruct->offlineCheckSum();
194 if(onsum!=offsum) {
195 ATH_MSG_WARNING("Checksum error for FEB: " << MSG::hex << fId32);
196 ATH_MSG_WARNING(" online checksum = " << MSG::hex << onsum);
197 ATH_MSG_WARNING(" offline checksum = " << MSG::hex << offsum << MSG::dec);
198 continue;
199 }
200 }
201
202 if (m_vFinalPreselection.size()) {
203 const unsigned int ftId=m_onlineHelper->feedthrough_Id(fId).get_identifier32().get_compact();
204 if (!std::binary_search(m_vFinalPreselection.begin(), m_vFinalPreselection.end(),ftId)) {
205 ATH_MSG_DEBUG("Feedthrough with id 0x" << MSG::hex << ftId << MSG::dec <<" not in preselection. Ignored.");
206 continue;
207 }
208 }
209 const int NthisFebChannel=m_onlineHelper->channelInSlotMax(fId);
210 while (BlStruct->getNextRawData(fcNb,samples,gain))
211 {
212 if (fcNb>=NthisFebChannel)
213 continue;
214 if (samples.size()==0) continue; // Ignore missing cells
215 HWIdentifier cId = m_onlineHelper->channel_Id(fId,fcNb);
216 calogain=(CaloGain::CaloGain)gain;
217 dg = new LArDigit(cId, calogain, std::move(samples));
218 samples.clear();
219 coll.push_back(dg);
220 }
221 }
222 while (BlStruct->nextFEB()); //Get NextFeb
223}
224
225//*******
226
227
229 const uint32_t* p, uint32_t n, LArRawChannelContainer& coll, CaloGain::CaloGain RequestedGain) const
230{
231 int32_t energy;
232 int32_t time;
233 int32_t quality;
234 uint32_t gain;
235 int fcNb;
236 HWIdentifier cId;
237 LArRodBlockStructure* BlStruct=prepareBlockStructure(robFrag, p, n, RequestedGain);
238 if (!BlStruct) return;
239
240 do {
241 HWIdentifier fId( Identifier32(BlStruct->getFEBID()) );
242 unsigned int fId32 = fId.get_identifier32().get_compact();
243 if (!m_onlineHelper->isValidId(fId)) {
244 ATH_MSG_WARNING("Invalid FEB identifer " << std::hex << fId32 << std::dec << ". Skipping");
245 continue;
246 }
247
248 if(m_febExchange) {
249 if (fId32 == m_febId1) {
251 fId32 = fId.get_identifier32().get_compact();
252 }
253 else if(fId32 == m_febId2) {
255 fId32 = fId.get_identifier32().get_compact();
256 }
257 }
258 if (!BlStruct->hasPhysicsBlock()) {
259 ATH_MSG_DEBUG("No Physics Data for this FEB - NULL event for FEBID 0x" << std::hex << BlStruct->getFEBID() << std::dec);
260 continue;
261 }
262
263 // RL 04.17.2008 skip check for some FEBs
264 int do_check=1;
265 std::vector<unsigned int>::const_iterator it_feb = m_IgnoreCheckFEBs.begin();
266 std::vector<unsigned int>::const_iterator it_feb_end = m_IgnoreCheckFEBs.end();
267 for(; it_feb!=it_feb_end;++it_feb)
268 if(fId==*it_feb) {
269 do_check=0;
270 break;
271 }
272 if(do_check) {
273 //WL 31.10.2007 //check RodStatus-word to catch corrupt events
274 if (BlStruct->getStatus() & m_StatusNMask) {
275 ATH_MSG_WARNING("RodStatus&0x" << std::hex << m_StatusNMask << " indicates corrupt data for FEB "<< std::hex << fId32 << std::dec <<". Ignored.");
276 continue;
277 }
278 }
279
280 // RL 05.11.2007 checksum
281 if(m_CheckSum) {
282 const uint32_t onsum = BlStruct->onlineCheckSum();
283 const uint32_t offsum = BlStruct->offlineCheckSum();
284 if(onsum!=offsum) {
285 ATH_MSG_WARNING("Checksum error:");
286 ATH_MSG_WARNING(" online checksum = " << MSG::hex << onsum);
287 ATH_MSG_WARNING(" offline checksum = " << MSG::hex << offsum);
288 continue;
289 }
290 }
291
292 if (m_vFTPreselection.size()) {
293 int ftId=m_onlineHelper->feedthrough_Id(fId).get_identifier32().get_compact();
294 if (!std::binary_search(m_vFTPreselection.begin(), m_vFTPreselection.end(),ftId)) {
295 ATH_MSG_DEBUG("Feedthrough with id " << std::hex << ftId << std::dec <<" not in preselection. Ignored.");
296 continue;
297 }
298 }
299 const int NthisFebChannel=m_onlineHelper->channelInSlotMax(fId);
300 while (BlStruct->getNextEnergy(fcNb,energy,time,quality,gain)) {
301 if (fcNb>=NthisFebChannel)
302 continue;
303 cId = m_onlineHelper->channel_Id(fId,fcNb);
304 uint16_t iquality = 0;
305 uint16_t iprovenance = 0x1000;
306 if (quality>0) {
307 iprovenance |= 0x2000;
308 iquality = (quality & 0xFFFF);
309 }
310 LArRawChannel chan(cId, energy, time, iquality, iprovenance, (CaloGain::CaloGain)gain);
311 coll.push_back(chan);
312 }
313 }
314 while (BlStruct->nextFEB()); //Get NextFeb
315}
316
317
319 const uint32_t* p,
320 uint32_t n,
322 CaloGain::CaloGain RequestedGain,
323 const LArCalibLineMapping& calibLineMapping,
324 const LArOnOffIdMapping& onOffIdMapping) const
325{ // CalibDigit pointer
326 LArCalibDigit * dg=0 ;
327 uint32_t gain;
328 CaloGain::CaloGain calogain;
329 int fcNb;
330 uint16_t dac, delay;
331 bool ispulsed;
332 std::vector<short> samples;
333
334 ATH_MSG_VERBOSE("FillCollection for LArCalibDigitContainer is called.");
335 LArRodBlockStructure* BlStruct=prepareBlockStructure(robFrag, p, n, RequestedGain);
336 if (!BlStruct) return;
337 if (BlStruct->canSetCalibration()) {
338 dac=BlStruct->getDAC();
339 delay=BlStruct->getDelay();
340 do
341 {
342 // IWS 24.01.2006 protection against NULL events (null pointer to rawdata block)
343 if (!BlStruct->hasRawDataBlock()) {
344 ATH_MSG_DEBUG("No Raw Data for this FEB - NULL event for FEBID " << std::hex << BlStruct->getFEBID());
345 continue;
346 }
347 HWIdentifier fId(Identifier32(BlStruct->getFEBID()));
348 unsigned int fId32 = fId.get_identifier32().get_compact();
349 // RL 20.09.2006 protection against 0 FebId
350 if (!fId32){
351 ATH_MSG_DEBUG("Bad FebID=0x"<< std::hex << BlStruct->getFEBID() << " found for this FEB, skipping it!");
352 continue;
353 }
354 // RL 04.17.2008 skip check for some FEBs
355 int do_check=1;
356 std::vector<unsigned int>::const_iterator it_feb = m_IgnoreCheckFEBs.begin();
357 std::vector<unsigned int>::const_iterator it_feb_end = m_IgnoreCheckFEBs.end();
358 for(; it_feb!=it_feb_end;++it_feb)
359 if(fId==*it_feb) {
360 do_check=0;
361 break;
362 }
363 if(do_check) {
364 //WL 31.10.2007 //check RodStatus-word to catch corrupt events
365 if (BlStruct->getStatus() & m_StatusNMask) {
366 msg(MSG::WARNING) << "RodStatus&0x" << std::hex << m_StatusNMask << " indicates corrupt data for FEB "<< std::hex << fId32 << std::dec <<". Ignored." << endmsg;
367 continue;
368 }
369 }
370 // RL 05.11.2007 checksum
371 if(m_CheckSum) {
372 uint32_t onsum = BlStruct->onlineCheckSum();
373 uint32_t offsum = BlStruct->offlineCheckSum();
374 if(onsum!=offsum) {
375 msg(MSG::WARNING) << "Checksum error:" << endmsg;
376 msg(MSG::WARNING) << " online checksum = " << MSG::hex << onsum << endmsg;
377 msg(MSG::WARNING) << " offline checksum = " << MSG::hex << offsum << endmsg;
378 continue;
379 }
380 }
381 if(m_febExchange) {
382 if (fId32 == m_febId1) {
384 fId32 = fId.get_identifier32().get_compact();
385 }
386 else if(fId32 == m_febId2) {
388 fId32 = fId.get_identifier32().get_compact();
389 }
390 }
391
392 if (m_vFinalPreselection.size()) {
393 unsigned int ftId=m_onlineHelper->feedthrough_Id(fId).get_identifier32().get_compact();
394 if (!std::binary_search(m_vFinalPreselection.begin(), m_vFinalPreselection.end(),ftId)) {
395 ATH_MSG_DEBUG("Feedthrough with id 0x" << std::hex << ftId << std::dec <<" not in preselection. Ignored.");
396 continue;
397 }
398 }
399 const int NthisFebChannel=m_onlineHelper->channelInSlotMax(fId);
400 while (BlStruct->getNextRawData(fcNb,samples,gain))
401 {if (fcNb>=NthisFebChannel)
402 continue;
403 if (samples.size()==0) continue; // Ignore missing cells
404 HWIdentifier cId = m_onlineHelper->channel_Id(fId,fcNb);
405 ispulsed=BlStruct->getPulsed(fcNb);
406
407 calogain=(CaloGain::CaloGain)gain;
408 dg = new LArCalibDigit(cId, calogain, samples, dac, delay, ispulsed);
409 samples.clear();
410 coll.push_back(dg);
411 }
412 }
413 while (BlStruct->nextFEB()); //Get NextFeb
414 }
415 else {//Not a calibration data block, try to get from database
416 ATH_MSG_VERBOSE("Not LArCalibDigit data block found. Building it using DB values");
417 //1st step, get Calib board config object
418 const LArCalibParams* calibParams = nullptr;
419 StatusCode sc=detStore()->retrieve(calibParams);
420 if (sc.isFailure())
421 {msg(MSG::ERROR) << "Cannot load LArCalibParams from DetStore!" << endmsg;
422 return;
423 }
424 //2st step, get Event number
426 if (!evt.isValid()) {
427 ATH_MSG_ERROR("Cannot get EventInfo");
428 return; //Return empty container.
429 }
430 const unsigned eventNb=evt->eventNumber();
431 const std::vector<HWIdentifier>* calibChannelIDs;
432 do { //Loop over all FEBs in this ROD
433
434 // IWS 24.01.2006 protection against NULL events (null pointer to rawdata block)
435 if (!BlStruct->hasRawDataBlock()) {
436 ATH_MSG_DEBUG("No Raw Data for this FEB - NULL event for FEBID 0x" << std::hex << BlStruct->getFEBID() << std::dec);
437 continue;
438 }
439 HWIdentifier fId(Identifier32(BlStruct->getFEBID()));
440 unsigned int fId32 = fId.get_identifier32().get_compact();
441 // RL 20.09.2006 protection against 0 FebId
442 if (!fId32) {
443 ATH_MSG_DEBUG("Bad FebID=0x" << std::hex << BlStruct->getFEBID() << " found for this FEB, skipping it!" << std::dec);
444 continue;
445 }
446 if(m_febExchange) {
447 if (fId32 == m_febId1) {
449 fId32 = fId.get_identifier32().get_compact();
450 }
451 else if(fId32 == m_febId2) {
453 fId32 = fId.get_identifier32().get_compact();
454 }
455 }
456 fcNb=0;
457 HWIdentifier cId;
458 do { //Search for the first connected channel of this FEB (probably the first one...)
459 fcNb++;
460 cId = m_onlineHelper->channel_Id(fId,fcNb);
461 calibChannelIDs=&calibLineMapping.calibSlotLine(cId);
462 }
463 while ( (!onOffIdMapping.isOnlineConnected(cId) || calibChannelIDs->size()==0) && fcNb<128); // This is the right conditions to exit the loop!
464
465 if ( calibChannelIDs->size()==0 ) {
466 msg(MSG::ERROR) << "Cannot get calibration Channel ID for FEB " << std::hex << fId32 << std::dec << endmsg;
467 return;
468 }
469
470 uint16_t dac;
471 uint16_t delay;
472
473 std::vector<HWIdentifier>::const_iterator csl_it=calibChannelIDs->begin();
474 //Derive DAC and Delay value from this channel
475 dac=calibParams->DAC(eventNb,*csl_it);
476 delay=calibParams->Delay(eventNb,*csl_it);
477
478 //Now start looping over channels in FEB
479 const int NthisFebChannel=m_onlineHelper->channelInSlotMax(fId);
480
481 fcNb=0;
482 while (BlStruct->getNextRawData(fcNb,samples,gain))
483 {
484 if (fcNb>=NthisFebChannel) continue;
485 if (samples.size()==0) continue; // Ignore missing cells
486 cId = m_onlineHelper->channel_Id(fId,fcNb);
487 calibChannelIDs=&calibLineMapping.calibSlotLine(cId);
488 //For the time being, I assume we are in H8 and have only one calib channel per FEB channel
489
490 if (calibChannelIDs->size()!=0) {
491 csl_it=calibChannelIDs->begin();
492 ispulsed=calibParams->isPulsed(eventNb,*csl_it);
493
494 } else ispulsed=0;
495 calogain=(CaloGain::CaloGain)gain;
496 dg = new LArCalibDigit(cId, calogain, samples, dac, delay, ispulsed);
497 samples.clear();
498
499 coll.push_back(dg);
500 }
501 }
502 while (BlStruct->nextFEB()); //Get NextFeb
503 }
505}
506
508 const uint32_t* p,
509 uint32_t n,
511 CaloGain::CaloGain RequestedGain,
512 const LArCalibLineMapping& calibLineMapping) const
513{ // Accumulated Digit pointer
515 CaloGain::CaloGain calogain;
516 uint32_t gain, ntrigger;
517 int dac, delay, NStep=-1, StepIndex=-1;
518 bool ispulsed;
519 uint16_t ispulsed_int;
520 int bitShift;
521 uint32_t FirstGoodFEB=1;
522 int fcNb;
523 std::vector< uint64_t > samplesSum;
524 std::vector< uint64_t > samples2Sum;
525
526 LArRodBlockStructure* BlStruct=prepareBlockStructure(robFrag, p, n, RequestedGain);
527 if (!BlStruct) return;
528 do
529 {
530 // IWS 24.01.2006 protection against NULL events (null pointer to rawdata block)
531 if (!BlStruct->hasCalibBlock())
532 {
533 ATH_MSG_DEBUG("No Calib Data for this FEB - NULL event");
534 continue;
535 }
536 if(FirstGoodFEB)
537 {
538 FirstGoodFEB=0;
539 }
540 HWIdentifier fId(Identifier32(BlStruct->getFEBID()));
541 unsigned int fId32 = fId.get_identifier32().get_compact();
542 // RL 20.09.2006 protection against 0 FebId
543 if (!fId32){
544 ATH_MSG_DEBUG("Bad FebID=0x" << std::hex << BlStruct->getFEBID() << " found for this FEB, skipping it!" << std::dec);
545 continue;
546 }
547 // RL 04.17.2008 skip check for some FEBs
548 int do_check=1;
549 std::vector<unsigned int>::const_iterator it_feb = m_IgnoreCheckFEBs.begin();
550 std::vector<unsigned int>::const_iterator it_feb_end = m_IgnoreCheckFEBs.end();
551 for(; it_feb!=it_feb_end;++it_feb)
552 if(fId==*it_feb) {
553 do_check=0;
554 break;
555 }
556 if(do_check) {
557 //WL 31.10.2007 //check RodStatus-word to catch corrupt events
558 if (BlStruct->getStatus() & m_StatusNMask) {
559 ATH_MSG_WARNING("RodStatus&0x" << std::hex << m_StatusNMask << " indicates corrupt data for FEB "<< std::hex << fId32 << std::dec <<". Ignored.");
560 continue;
561 }
562 }
563 // RL 05.11.2007 checksum
564 if(m_CheckSum) {
565 uint32_t onsum = BlStruct->onlineCheckSum();
566 uint32_t offsum = BlStruct->offlineCheckSum();
567 if(onsum!=offsum) {
568 ATH_MSG_WARNING("Checksum error:");
569 ATH_MSG_WARNING(" online checksum = " << MSG::hex << onsum);
570 ATH_MSG_WARNING(" offline checksum = " << MSG::hex << offsum);
571 continue;
572 }
573 }
574 if(m_febExchange) {
575 if (fId32 == m_febId1) {
577 fId32 = fId.get_identifier32().get_compact();
578 }
579 else if(fId32 == m_febId2) {
581 fId32 = fId.get_identifier32().get_compact();
582 }
583 }
584
585 if (m_vFinalPreselection.size()) {
586 unsigned int ftId=m_onlineHelper->feedthrough_Id(fId).get_identifier32().get_compact();
587 if (!std::binary_search(m_vFinalPreselection.begin(), m_vFinalPreselection.end(),ftId)) {
588 ATH_MSG_DEBUG("Feedthrough with id " << std::hex << ftId << std::dec <<" not in preselection. Ignored.");
589 continue;
590 }
591 }
592 int NthisFebChannel=m_onlineHelper->channelInSlotMax(fId);
593 uint32_t idum=0;
594 while (BlStruct->getNextAccumulatedCalibDigit(fcNb,samplesSum,samples2Sum,idum,gain))
595 {
596 ispulsed_int=0;
597 bitShift=0;
598 if (fcNb>=NthisFebChannel)continue;
599 if (samplesSum.size()==0) continue; // Ignore missing cells
600 HWIdentifier cId = m_onlineHelper->channel_Id(fId,fcNb);
601 calogain=(CaloGain::CaloGain)gain;
602 ntrigger=BlStruct->getNTrigger();
603 dac=BlStruct->getDAC();
604 delay=BlStruct->getDelay();
605 NStep=BlStruct->getNStep();
606 if(!NStep) NStep=1; // To be able to decode v6 code
607 StepIndex=BlStruct->getStepIndex();
608 // 08.08.2005 IWS get calib line
609 const std::vector<HWIdentifier>& calibChannelIDs = calibLineMapping.calibSlotLine(cId);
610 if (calibChannelIDs.size()==0) {
611 samplesSum.clear();
612 samples2Sum.clear();
613 continue;// connected channel
614 }
615 //GR: Loop over all the calib chans instead of just looking at the first one and set four bit isPulsed int
616 for(std::vector<HWIdentifier>::const_iterator csl_it=calibChannelIDs.begin(); csl_it!=calibChannelIDs.end();++csl_it){
617 uint32_t calibLine = m_onlineHelper->channel(*csl_it);
618 ispulsed=BlStruct->getPulsed(calibLine);
619 ispulsed_int=( ispulsed_int | ((uint16_t)ispulsed<<bitShift) );
620 bitShift++;
621 }
622
623 dg=new LArAccumulatedCalibDigit(cId, calogain, samplesSum, samples2Sum, ntrigger, dac, delay,
624 (uint16_t)ispulsed_int, NStep, StepIndex);
625
626 coll.push_back(dg);
627 } // End while
628 }//End do loop of FEBs
629 while (BlStruct->nextFEB()); //Get NextFeb
630}
631
633 const uint32_t* p, uint32_t n, LArAccumulatedDigitContainer& coll, CaloGain::CaloGain RequestedGain) const
634{ // Accumulated Digit pointer
635 LArAccumulatedDigit * dg=0 ;
636 CaloGain::CaloGain calogain;
637 uint32_t gain, ntrigger;
638 int fcNb;
639 std::vector<uint64_t> sampleSum;
640 std::vector< uint64_t > sampleSquare;
641
642 LArRodBlockStructure* BlStruct=prepareBlockStructure(robFrag, p, n, RequestedGain);
643 if (!BlStruct) return;
644 do
645 {
646 // IWS 24.01.2006 protection against NULL events (null pointer to rawdata block)
647 if (!BlStruct->hasAccumBlock()) {
648 ATH_MSG_DEBUG("No Accum Data for this FEB - NULL event");
649 continue;
650 }
651 HWIdentifier fId(Identifier32(BlStruct->getFEBID()));
652 unsigned int fId32 = fId.get_identifier32().get_compact();
653 // RL 20.09.2006 protection against 0 FebId
654 if (!fId32) {
655 ATH_MSG_DEBUG("Bad FebID=0x" << std::hex << BlStruct->getFEBID() << " found for this FEB, skipping it!" << std::dec);
656 continue;
657 }
658 // RL 04.17.2008 skip check for some FEBs
659 int do_check=1;
660 std::vector<unsigned int>::const_iterator it_feb = m_IgnoreCheckFEBs.begin();
661 std::vector<unsigned int>::const_iterator it_feb_end = m_IgnoreCheckFEBs.end();
662 for(; it_feb!=it_feb_end;++it_feb)
663 if(fId==*it_feb) {
664 do_check=0;
665 break;
666 }
667 if(do_check) {
668 //WL 31.10.2007 //check RodStatus-word to catch corrupt events
669 if (BlStruct->getStatus() & m_StatusNMask) {
670 ATH_MSG_WARNING("RodStatus&0x" << std::hex << m_StatusNMask << " indicates corrupt data for FEB "<< std::hex << fId32 << std::dec <<". Ignored.");
671 continue;
672 }
673 }
674 // RL 05.11.2007 checksum
675 if(m_CheckSum) {
676 uint32_t onsum = BlStruct->onlineCheckSum();
677 uint32_t offsum = BlStruct->offlineCheckSum();
678 if(onsum!=offsum) {
679 ATH_MSG_WARNING("Checksum error:");
680 ATH_MSG_WARNING(" online checksum = " << MSG::hex << onsum);
681 ATH_MSG_WARNING(" offline checksum = " << MSG::hex << offsum);
682 continue;
683 }
684 }
685 if(m_febExchange) {
686 if (fId32 == m_febId1) {
688 fId32 = fId.get_identifier32().get_compact();
689 }
690 else if(fId32 == m_febId2) {
692 fId32 = fId.get_identifier32().get_compact();
693 }
694 }
695
696 if (m_vFinalPreselection.size()) {
697 unsigned int ftId=m_onlineHelper->feedthrough_Id(fId).get_identifier32().get_compact();
698 if (!std::binary_search(m_vFinalPreselection.begin(), m_vFinalPreselection.end(),ftId)) {
699 ATH_MSG_DEBUG("Feedthrough with id " << std::hex << ftId << std::dec <<" not in preselection. Ignored.");
700 continue;
701 }
702 }
703 int NthisFebChannel=m_onlineHelper->channelInSlotMax(fId);
704 ntrigger=BlStruct->getNTrigger();
705 while (BlStruct->getNextAccumulatedDigit(fcNb,sampleSum,sampleSquare,gain)) {
706 if (fcNb>=NthisFebChannel)continue;
707 if (sampleSquare.size()==0) continue; // Ignore missing cells
708 HWIdentifier cId = m_onlineHelper->channel_Id(fId,fcNb);
709 calogain=(CaloGain::CaloGain)gain;
710 dg=new LArAccumulatedDigit(cId,calogain,sampleSum,sampleSquare,ntrigger);
711 coll.push_back(dg);
712 } // End while
713 }//End do loop of FEBs
714 while (BlStruct->nextFEB()); //Get NextFeb
715}
716
718 const uint32_t* p, uint32_t n, LArFebHeaderContainer& coll,const CaloGain::CaloGain RequestedGain) const
719{
720 LArFebHeader* larFebHeader;
721 HWIdentifier FEBID;
722
723 LArRodBlockStructure* BlStruct=prepareBlockStructure(robFrag, p, n, RequestedGain);
724 if (!BlStruct) return;
725
726 do{
727 //Read first FEB. The header of this feb is combined with the ROD-Header
728
729 FEBID=HWIdentifier(Identifier32(BlStruct->getFEBID()));
730 unsigned int FEBID32 = FEBID.get_identifier32().get_compact();
731 if (!m_onlineHelper->isValidId(FEBID)) {
732 ATH_MSG_WARNING("Invalid FEB identifer " << std:: hex << FEBID32 << std::dec << ". Skipping");
733 continue;
734 }
735
736 if(m_febExchange) {
737 if (FEBID32 == m_febId1) {
739 FEBID32 = FEBID.get_identifier32().get_compact();
740 }
741 else if(FEBID32 == m_febId2) {
743 FEBID32 = FEBID.get_identifier32().get_compact();
744 }
745 }
746
747 if (m_vFinalPreselection.size()) {
748 const unsigned int ftId=m_onlineHelper->feedthrough_Id(FEBID).get_identifier32().get_compact();
749 if (!std::binary_search(m_vFinalPreselection.begin(), m_vFinalPreselection.end(),ftId)) {
750 ATH_MSG_DEBUG("Feedthrough with id 0x" << std::hex << ftId << std::dec <<" not in preselection. Ignored.");
751 continue;
752 }
753 }
754
755
756
757 larFebHeader=new LArFebHeader(FEBID);
758 //setROD header data
759
760 larFebHeader->SetFormatVersion(robFrag.rod_version());
761 larFebHeader->SetSourceId(robFrag.rod_source_id());
762 larFebHeader->SetRunNumber(robFrag.rod_run_no());
763 larFebHeader->SetELVL1Id(robFrag.rod_lvl1_id());
764 larFebHeader->SetBCId(robFrag.rod_bc_id());
765 larFebHeader->SetLVL1TigType(robFrag.rod_lvl1_trigger_type());
766 larFebHeader->SetDetEventType(robFrag.rod_detev_type());
767
768 //set DSP data
769 const unsigned nsample=BlStruct->getNumberOfSamples();
770 const uint32_t status= BlStruct->getStatus();
771 larFebHeader->SetDspCodeVersion(BlStruct->getDspCodeVersion());
772 larFebHeader->SetDspEventCounter(BlStruct->getDspEventCounter());
773 larFebHeader->SetRodResults1Size(BlStruct->getResults1Size());
774 larFebHeader->SetRodResults2Size(BlStruct->getResults2Size());
775 larFebHeader->SetRodRawDataSize(BlStruct->getRawDataSize());
776 larFebHeader->SetNbSweetCells1(BlStruct->getNbSweetCells1());
777 larFebHeader->SetNbSweetCells2(BlStruct->getNbSweetCells2());
778 larFebHeader->SetNbSamples(nsample);
779 larFebHeader->SetOnlineChecksum(BlStruct->onlineCheckSum());
780 larFebHeader->SetOfflineChecksum(BlStruct->offlineCheckSum());
781
782 if(!BlStruct->hasControlWords()) {
783 larFebHeader->SetFebELVL1Id(robFrag.rod_lvl1_id());
784 larFebHeader->SetFebBCId(robFrag.rod_bc_id());
785 } else {
786 const uint16_t evtid = BlStruct->getCtrl1(0) & 0x1f;
787 const uint16_t bcid = BlStruct->getCtrl2(0) & 0x1fff;
788
789 larFebHeader->SetFebELVL1Id(evtid);
790 larFebHeader->SetFebBCId(bcid);
791 for(int iadc=0;iadc<16;iadc++) {
792 larFebHeader->SetFebCtrl1(BlStruct->getCtrl1(iadc));
793 larFebHeader->SetFebCtrl2(BlStruct->getCtrl2(iadc));
794 larFebHeader->SetFebCtrl3(BlStruct->getCtrl3(iadc));
795 }
796 for(unsigned int i = 0; i<nsample; i++ ) {
797 larFebHeader->SetFebSCA(BlStruct->getRadd(0,i) & 0xff);
798 }
799 }
800 larFebHeader->SetRodStatus(status);
801 coll.push_back(larFebHeader);
802
803 } while (BlStruct->nextFEB()); //Get NextFeb
804}
805
806
808LArRodDecoder::prepareBlockStructure1 (const uint16_t rodMinorVersion, const uint32_t robBlockType) const
809{
810 const unsigned MAXMINOR = 12;
811 const unsigned MAXTYPE = 10;
812
813 if (rodMinorVersion > MAXMINOR || robBlockType > MAXTYPE) {
814 ATH_MSG_ERROR("Bad Rod block type " << robBlockType
815 << " / " << rodMinorVersion);
816 return nullptr;
817 }
818 std::vector<std::unique_ptr<LArRodBlockStructure> >& blstructs =
819 *m_blstructs.get();
820 unsigned int index = robBlockType * (MAXMINOR+1) + rodMinorVersion;
821 if (blstructs.empty()) {
822 blstructs.resize ((MAXMINOR+1)*(MAXTYPE+1));
823 }
824 if (!blstructs[index]) {
825 blstructs[index] = makeBlockStructure (robBlockType, rodMinorVersion);
826 }
827 if (!blstructs[index]) {
828 ATH_MSG_ERROR("Bad Rod block type " << robBlockType
829 << " / " << rodMinorVersion);
830 return nullptr;
831 }
832
833#ifndef NDEBUG
834 ATH_MSG_DEBUG("Found version " << rodMinorVersion << " of Rod block type " << robBlockType);
835#endif
836
837 return blstructs[index].get();
838}
839
840
843 const uint32_t* p, uint32_t n, const CaloGain::CaloGain RequestedGain) const
844{
845#ifndef NDEBUG
846 ATH_MSG_DEBUG("Prepare LArRodBlockStructure. Got a fragement of size " << n);
847#endif
848
849 //Get version and blocktype form header
850 eformat::helper::Version ver(robFrag.rod_version());
851 const uint16_t rodMinorVersion=ver.minor_version();
852 const uint32_t rodBlockType=robFrag.rod_detev_type()&0xff;
853 LArRodBlockStructure* BlStruct = prepareBlockStructure1 (rodMinorVersion, rodBlockType);
854 if (!BlStruct) {
855 return nullptr;
856 }
857
858 if (!BlStruct->setFragment(p,n)) {
859 constexpr int maxMess = 100;
860 static std::atomic<int> nMess = 1;
861 int thismess = nMess++;
862 if (thismess <= maxMess) {
863 ATH_MSG_ERROR("Could not set fragment (wrong number of samples in data ?) - container will not be filled");
864 if (thismess == maxMess)
865 ATH_MSG_ERROR("This message will not be repeated");
866 }
867 return NULL;
868 }
869#ifndef NDEBUG
870 ATH_MSG_VERBOSE("Set Fragment at address "<< &(p[0]) << " " << p[5]);
871#endif
872
873 BlStruct->setGain(RequestedGain); //Will be ignored if BlockStructure does not support fixed gains.
874 //FIXME: Very ugly hack! See explanation in LArRodDecoder.h
875 if (m_firstSample) {
876 BlStruct->setFirstSample(m_firstSample);
877 }
878 return BlStruct;
879}
880
881
882std::unique_ptr<LArRodBlockStructure>
883LArRodDecoder::makeBlockStructure (unsigned int rodBlockType,
884 unsigned int rodMinorVersion) const
885{
886 switch (rodBlockType) {
887 case 2:
888 // RodBlockType 2 = Transparent mode only
889 switch (rodMinorVersion) {
890 case 0: // Transparent mode v0 05.01.2004
891 case 1: // Transparent mode v0
892 case 2: // Transparent mode v0
893 case 3: // Transparent mode v0
894 case 4: // Transparent mode v0
895 return std::make_unique<LArRodBlockTransparentV0<LArRodBlockHeaderTransparentV0> >(this->msgSvc().get());
896 case 5: // Calibration (Transparent mode) v1 17.01.2006
897 return std::make_unique<LArRodBlockCalibrationV1>(this->msgSvc().get());
898 case 6: // Calibration (Transparent mode) v3 31.05.2006
899 case 7: // Calibration (Transparent mode) v3
900 case 8: // Calibration (Transparent mode) v3
901 case 9: // Calibration (Transparent mode) v3
902 case 10:// Calibration (Transparent mode) v3
903 case 11:// Calibration (Transparent mode) v3
904 case 12:// Calibration (Transparent mode) v3
905 return std::make_unique<LArRodBlockCalibrationV3>(this->msgSvc().get());
906 default:
907 break;
908 }
909 break;
910
911 case 3:
912 // RodBlockType 3 = Test mode
913 return std::make_unique<LArRodBlockTransparentV0<LArRodBlockHeaderTransparentV0> >(this->msgSvc().get());
914
915 case 4:
916 // RodBlockType 4 = Physics mode
917 switch (rodMinorVersion) {
918 case 0: // Physics mode v0 05.01.2004 first draft
919 return std::make_unique<LArRodBlockPhysicsV0>(this->msgSvc().get());
920 case 1: // Physics mode v1 19.08.2004 only small differences
921 return std::make_unique<LArRodBlockPhysicsV1>(this->msgSvc().get());
922 case 2: // Physics mode v2 05.10.2004 adapted to real DSP data
923 case 3: // Physics mode v2
924 case 4: // Physics mode v2
925 case 5: // Physics mode v2
926 case 6: // Physics mode v2
927 case 7: // Physics mode v2
928 case 8: // Physics mode v2
929 return std::make_unique<LArRodBlockPhysicsV2>(this->msgSvc().get());
930 case 9: // Physics mode v4 10.07.2007 for commissioning
931 return std::make_unique<LArRodBlockPhysicsV4>(this->msgSvc().get());
932 case 10: // Physics mode v5 16.06.2008 for LHC
933 case 11: // Physics mode v5 16.06.2008 for LHC
934 {
935 auto bl = std::make_unique<LArRodBlockPhysicsV5>(this->msgSvc().get());
937 bl->setRequiredNSamples(m_requiredPhysicsNSamples);
938 }
939 return bl;
940 }
941 case 12: // Physics mode v5 09.03.2011 for LHC
942 {
943 auto bl = std::make_unique<LArRodBlockPhysicsV6>(this->msgSvc().get());
945 bl->setRequiredNSamples(m_requiredPhysicsNSamples);
946 }
947 return bl;
948 }
949 default:
950 break;
951 }
952 break;
953
954 case 5:
955 // RodBlockType 5 = Physics simulation mode
956 // Physics mode v3 11.04.2005 for simulation
957 return std::make_unique<LArRodBlockPhysicsV3>(this->msgSvc().get());
958
959 case 6:
960 // RodBlockType 6 = Physics test mode
961 switch (rodMinorVersion) {
962 case 0: // Physics mode v0 05.01.2004 first draft
963 return std::make_unique<LArRodBlockPhysicsV0>(this->msgSvc().get());
964 case 1: // Physics mode v2 05.10.2004 adapted to real DSP data
965 case 2: // Physics mode v2
966 return std::make_unique<LArRodBlockPhysicsV2>(this->msgSvc().get());
967 default:
968 break;
969 }
970 break;
971
972 case 7:
973 // RodBlockType 7 = Calibration mode
974 switch (rodMinorVersion) {
975 case 0: // Calibration mode v0 05.01.2004
976 return std::make_unique<LArRodBlockCalibrationV0<LArRodBlockHeaderCalibrationV0> >(this->msgSvc().get());
977 case 1: // Calibration mode v1 17.01.2006
978 case 2: // Calibration mode v1
979 case 3: // Calibration mode v1
980 case 4: // Calibration mode v1
981 return std::make_unique<LArRodBlockCalibrationV1>(this->msgSvc().get());
982 case 5: // Calibration mode v2 26.04.2006
983 return std::make_unique<LArRodBlockCalibrationV2>(this->msgSvc().get());
984 case 6: // Calibration mode v3 31.05.2006
985 case 7: // Calibration mode v3
986 case 8: // Calibration mode v3
987 case 9: // Calibration mode v3
988 case 10:// Calibration mode v3
989 case 11:// Calibration mode v3
990 case 12:// Calibration mode v3
991 return std::make_unique<LArRodBlockCalibrationV3>(this->msgSvc().get());
992 default:
993 break;
994 }
995 break;
996
997 case 10:
998 // RodBlockType 10 = Accumulated mode (used for pre-processed pedestal runs)
999 // Accumulated mode v3 10.06.2008
1000 return std::make_unique<LArRodBlockAccumulatedV3>(this->msgSvc().get());
1001
1002 default:
1003 break;
1004 }
1005
1006 return std::unique_ptr<LArRodBlockStructure>();
1007}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
double delay(std::size_t d)
static Double_t sc
StatusCode LArRodDecoder::initialize ATLAS_NOT_THREAD_SAFE()
Install fatal handler with default options.
static const InterfaceID IID_ILArRodDecoder("LArRodDecoder", 1, 0)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
MsgStream & msg() const
value_type push_back(value_type pElem)
Add an element to the end of the collection.
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Container class for LArAccumulatedCalibDigit.
Data class for calibration ADC samples preprocessed by the DSP.
Container class for LArAccumulatedDigit.
Data class for ADC samples and autocorr preprocessed by the DSP.
Container class for LArCalibDigit.
void setDelayScale(const double scale)
set delay scale
Base class for LArDigits taken during calibration runs.
const std::vector< HWIdentifier > & calibSlotLine(const HWIdentifier id) const
unsigned Delay(const unsigned event, const HWIdentifier calibLineID) const
bool isPulsed(const unsigned event, const HWIdentifier calibLineID) const
unsigned DAC(const unsigned event, const HWIdentifier calibLineID) const
Container class for LArDigit.
Liquid Argon digit base class.
Definition LArDigit.h:25
Container class for LArFebHeader.
Holds information from the FEB Header.
void SetRodResults1Size(const uint16_t size)
set the ROD block sizes
void SetOnlineChecksum(const uint32_t checksum)
void SetNbSweetCells2(const uint16_t n)
void SetRodStatus(const uint32_t status)
set the ROD Status
void SetFebBCId(const uint16_t bcid)
set the FEB Bunch Crossing ID
void SetFebCtrl2(const uint16_t ctrl2)
set the FEB Control Word #2
void SetFormatVersion(const uint32_t formatVersion)
set the format version
void SetOfflineChecksum(const uint32_t checksum)
void SetFebSCA(const uint16_t sca)
set the SCA's
void SetDetEventType(const uint32_t detEvType)
set the Detector event type ID
void SetDspEventCounter(const uint32_t eventCounter)
set the Event number counted by the DSP code
void SetLVL1TigType(const uint32_t lvl1ttype)
set the Level1 trigger type ID
void SetRodRawDataSize(const uint16_t size)
void SetFebCtrl3(const uint16_t ctrl3)
set the FEB Control Word #3
void SetFebCtrl1(const uint16_t ctrl1)
set the FEB Control Word #1
void SetBCId(const uint16_t bcid)
set the Bunch Crossing ID
void SetFebELVL1Id(const uint16_t elvl1Id)
set the FEB Event ID
void SetRunNumber(const uint32_t runNumber)
set the run number
void SetSourceId(const uint32_t sourceID)
set the source Id
void SetRodResults2Size(const uint16_t size)
void SetDspCodeVersion(const uint32_t codeVersion)
set the version of the DSP code
void SetNbSweetCells1(const uint16_t n)
set the number of samples and cells above thresholds
void SetNbSamples(const uint16_t n)
void SetELVL1Id(const uint16_t elvl1Id)
set the EventID
bool isOnlineConnected(const HWIdentifier &sid) const
Test whether a HWIdentifier is connected of not (inline) .
Container for LArRawChannel (IDC using LArRawChannelCollection).
Liquid Argon ROD output object base class.
virtual uint16_t getCtrl1(uint32_t adc) const
bool setFragment(const uint32_t *p, uint32_t n)
virtual uint32_t hasPhysicsBlock() const
virtual uint16_t getNStep() const
virtual uint32_t hasCalibBlock() const
virtual uint16_t getDelay() const
virtual uint16_t getCtrl3(uint32_t adc) const
virtual uint16_t getResults1Size() const
virtual bool getPulsed(unsigned channelNumber) const
virtual uint16_t getDAC() const
virtual int getNextEnergy(int &channelNumber, int32_t &energy, int32_t &time, int32_t &quality, uint32_t &gain)
virtual uint16_t getRawDataSize() const
virtual uint32_t hasAccumBlock() const
virtual int getNextAccumulatedCalibDigit(int &channelNumber, std::vector< uint64_t > &SamplesSum, std::vector< uint64_t > &Samples2Sum, uint32_t &nStepTriggers, uint32_t &gain)
virtual uint32_t hasRawDataBlock() const
virtual bool canSetCalibration()
virtual uint32_t getDspCodeVersion() const
virtual uint16_t getCtrl2(uint32_t adc) const
virtual uint32_t getRadd(uint32_t adc, uint32_t sample) const
virtual uint16_t getStepIndex() const
virtual uint16_t getNTrigger() const
virtual int setGain(const int GainValue)
virtual uint32_t offlineCheckSum() const
void setFirstSample(const int rearrangeFirstSample)
virtual uint16_t getNbSweetCells2() const
virtual uint32_t getNumberOfSamples() const
virtual uint32_t hasControlWords() const
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
virtual uint32_t getStatus() const
virtual uint16_t getResults2Size() const
virtual uint16_t getNbSweetCells1() const
virtual int32_t getDspEventCounter() const
virtual uint32_t onlineCheckSum() const
virtual int getNextAccumulatedDigit(int &channelNumber, std::vector< uint64_t > &SamplesSum, std::vector< uint64_t > &corr2Sum, uint32_t &gain)
std::vector< unsigned int > m_vFinalPreselection
uint32_t m_StatusNMask
virtual ~LArRodDecoder()
Destructor.
std::vector< std::string > m_LArCellCorrNames
LArRodBlockStructure * prepareBlockStructure1(const uint16_t rodMinorVersion, const uint32_t robBlockType) const
std::vector< int > m_vFTPreselection
const LArOnlineID * m_onlineHelper
std::vector< unsigned int > m_IgnoreCheckFEBs
unsigned int m_febId1
std::unique_ptr< LArRodBlockStructure > makeBlockStructure(unsigned int rodBlockType, unsigned int rodMinorVersion) const
SG::ReadHandleKey< xAOD::EventInfo > m_evt
static const InterfaceID & interfaceID()
float m_LArCellEthreshold
unsigned short m_requiredPhysicsNSamples
std::vector< int > m_vBEPreselection
void fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, const uint32_t *p, uint32_t n, LArRawChannelContainer &coll, const CaloGain::CaloGain gain) const
unsigned int m_febId2
LArRodBlockStructure * prepareBlockStructure(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, const uint32_t *p, uint32_t n, const CaloGain::CaloGain RequestedGain) const
uint32_t m_StatusMask
std::vector< int > m_vPosNegPreselection
LArRodDecoder(const std::string &type, const std::string &name, const IInterface *parent)
Constructor Standard AlgTool constructor.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130
eformat::ROBFragment< PointerType > ROBFragment
Definition RawEvent.h:27
Definition index.py:1
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.