Belle II Software  release-06-00-14
eclUnpackerModule.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 //This module
10 #include <ecl/modules/eclUnpacker/eclUnpackerModule.h>
11 
12 //STL
13 #include <iomanip>
14 
15 //Framework
16 #include <framework/dataobjects/EventMetaData.h>
17 
18 //Rawdata
19 #include <rawdata/dataobjects/RawECL.h>
20 
21 //ECL
22 #include <ecl/dataobjects/ECLDigit.h>
23 #include <ecl/dataobjects/ECLDsp.h>
24 #include <ecl/utility/ECLChannelMapper.h>
25 #include <ecl/utility/ECLDspUtilities.h>
26 
27 using namespace std;
28 using namespace Belle2;
29 using namespace ECL;
30 
31 #define B2DEBUG_eclunpacker(level, msg) \
32  if (m_debugLevel >= level) {\
33  B2DEBUG(level, msg); \
34  }
35 
36 /*
37 
38 Data format of data packet from shaperDSP (32 bit words)
39 
40 ---------------------------------------------------------------------------------------
41 Offset | MSW(16 bits) | LSW(16 bits) |
42 --------------------------------------------------------------------------------------|
43  | | |
44 0 | 0x10 | 4+DSP_NUM+ADC_NUM*SAMPLES_NUM |
45  | | (Packet length) |
46 --------------------------------------------------------------------------------------|
47  | |
48 1 | b[28..24] – number of active ADC data channels (ADC_NUM) |
49  | b[22..16] – ADC samples per channel (SAMPLES_NUM) |
50  | b[12..8] – number of active DSP channels (DSP_NUM |
51  | b[7..0] – trigger phase |
52  | |
53 --------------------------------------------------------------------------------------|
54 2 | b[31…16] – dsp_mask | b[15…0] – trigger tag |
55  | | |
56 --------------------------------------------------------------------------------------|
57 3 | 0 | b[15…0] – adc_mask |
58  | | |
59 --------------------------------------------------------------------------------------|
60 4…3+DSP_NUM | b[31..30] – quality flag |
61  | quality = 0 : good fit |
62  | quality = 1 : internal error of approximation |
63  | quality = 2 : A < A_th, |
64  | time is replace with chi2 |
65  | quality = 3 : bad fit, A > A_thr |
66  | b[29..18] – reconstructed time (chi2 if qality = 2) |
67  | chi2 = m<<(p*2), m = b[29:27], p = b[26:18] |
68  | b[17..0] – reconstructed amplitude |
69  | |
70 --------------------------------------------------------------------------------------|
71 4+DSP_NUM… | |
72 3+DSP_NUM+ | ADC_NUM*SAMPLES_NUM -- ADC samples |
73 ADC_NUM*SAMPLES_NUM | |
74 --------------------------------------------------------------------------------------|
75 
76 */
77 
78 
79 REG_MODULE(ECLUnpacker)
80 
82  m_globalEvtNum(0),
83  m_localEvtNum(0),
84  m_bufPtr(0),
85  m_bufPos(0),
86  m_bufLength(0),
87  m_bitPos(0),
88  m_storeTrigTime(0),
89  m_storeUnmapped(0),
90  m_unpackingParams("ECLUnpackingParameters", false),
91  m_eclDigits("", DataStore::c_Event),
92  m_debugLevel(0)
93 {
94  setDescription("The module reads RawECL data from the DataStore and writes the ECLDigit data");
95 
96  setPropertyFlags(c_ParallelProcessingCertified);
97 
98  addParam("InitFileName", m_eclMapperInitFileName, "Initialization file", string("/ecl/data/ecl_channels_map.txt"));
99  addParam("ECLDigitsName", m_eclDigitsName, "Name of the ECLDigits container", string("ECLDigits"));
100  addParam("ECLDspsName", m_eclDspsName, "Name of the ECLDsp container", string("ECLDsps"));
101  addParam("ECLTrigsName", m_eclTrigsName, "Name of the ECLTrig container", string("ECLTrigs"));
102  // flag to store trigger times needed for calibration with pulse generator only, so false by default
103  addParam("storeTrigTime", m_storeTrigTime, "Store trigger time", false);
104  addParam("storeUnmapped", m_storeUnmapped, "Store ECLDsp for channels that don't "
105  "exist in ECL mapping", false);
106  addParam("useUnpackingParameters", m_useUnpackingParameters,
107  "Use ECLUnpackingParameters payload", true);
108 }
109 
110 ECLUnpackerModule::~ECLUnpackerModule()
111 {
112 
113 }
114 
115 void ECLUnpackerModule::initialize()
116 {
117  // Get cached debug level to improve performance
118  auto& config = LogSystem::Instance().getCurrentLogConfig(PACKAGENAME());
119  m_debugLevel = config.getLogLevel() == LogConfig::c_Debug ? config.getDebugLevel() : 0;
120 
121  // require input data
122  m_rawEcl.isRequired();
123 
124  // register output containers in data store
125  m_eclDigits.registerInDataStore(m_eclDigitsName);
126  if (m_storeTrigTime) {
127  m_eclTrigs.registerInDataStore(m_eclTrigsName);
128  m_relDigitToTrig.registerInDataStore();
129  }
130  m_eclDsps.registerInDataStore(m_eclDspsName);
131  m_relDigitToDsp.registerInDataStore();
132  m_eclDsps.registerRelationTo(m_eclDigits);
133 
134 }
135 
136 void ECLUnpackerModule::beginRun()
137 {
138  m_evtNumReportedMask = 0;
139  m_tagsReportedMask = 0;
140  m_phasesReportedMask = 0;
141  m_badHeaderReportedMask = 0;
142  // Initialize channel mapper at run start to account for possible
143  // changes in ECL mapping between runs.
144  if (!m_eclMapper.initFromDB()) {
145  B2FATAL("ECL Unpacker: Can't initialize eclChannelMapper!");
146  }
147  if (!m_unpackingParams.isValid() && m_useUnpackingParameters) {
148  B2FATAL("ECL Unpacker: Can't access ECLUnpackingParameters payload");
149  }
150 }
151 
152 void ECLUnpackerModule::event()
153 {
154  // output data
155  m_eclDigits.clear();
156  m_eclDsps.clear();
157  m_eclTrigs.clear();
158  // clear relations arrays
159  if (m_relDigitToTrig) m_relDigitToTrig.clear();
160  if (m_relDigitToDsp) m_relDigitToDsp.clear();
161 
162  if (m_eventMetaData.isValid()) {
163  m_globalEvtNum = m_eventMetaData->getEvent();
164  } else {
165  m_globalEvtNum = -1;
166  }
167 
168  for (int i = 0; i < ECL_CRATES; i++) {
169  m_eclTrigsBuffer[i].setTrigId(0);
170  }
171 
172  //=== Read raw event data
173 
174  int nRawEclEntries = m_rawEcl.getEntries();
175 
176  B2DEBUG_eclunpacker(22, "Ecl unpacker event called N_RAW = " << nRawEclEntries);
177 
178  for (int i = 0; i < nRawEclEntries; i++) {
179  for (int n = 0; n < m_rawEcl[i]->GetNumEntries(); n++) {
180  readRawECLData(m_rawEcl[ i ], n); // read data from RawECL and put into the m_eclDigits container
181  }
182  }
183 
184  //=== Add created ECLTrig objects to the StoreArray
185 
186  ECLTrig* new_ecl_trigs[ECL_CRATES] = {};
187  for (int i = 0; i < ECL_CRATES; i++) {
188  if (m_eclTrigsBuffer[i].getTrigId() > 0) {
189  new_ecl_trigs[i] = m_eclTrigs.appendNew(m_eclTrigsBuffer[i]);
190  }
191  }
192 
193  for (int i = 0; i < m_eclDigits.getEntries(); i++) {
194  int cid = m_eclDigits[i]->getCellId();
195  int crate0 = m_eclMapper.getCrateID(cid) - 1;
196  if (new_ecl_trigs[crate0]) {
197  m_relDigitToTrig.add(i, crate0);
198  }
199  }
200 
201  m_localEvtNum++;
202 
203 }
204 
205 void ECLUnpackerModule::endRun()
206 {
207 }
208 
209 void ECLUnpackerModule::terminate()
210 {
211 }
212 
213 // meathod to read collector data by 32-bit words
214 unsigned int ECLUnpackerModule::readNextCollectorWord()
215 {
216  if (m_bufPos == m_bufLength) {
217  B2DEBUG_eclunpacker(22, "Reached the end of the FINESSE buffer");
218  throw Unexpected_end_of_FINESSE_buffer();
219  }
220  unsigned int value = m_bufPtr[m_bufPos];
221  m_bufPos++;
222  return value;
223 }
224 
225 // read given number of bits from the buffer (in order to read compressed ADC data)
226 unsigned int ECLUnpackerModule::readNBits(int bitsToRead)
227 {
228  unsigned int val = 0;
229 
230  val = m_bufPtr[m_bufPos] >> m_bitPos;
231  if (m_bitPos + bitsToRead > 31)
232  if (m_bufPos == m_bufLength) {
233  B2ERROR("Reached the end of the FINESSE buffer while read compressed ADC data");
234 
235  throw Unexpected_end_of_FINESSE_buffer();
236  } else {
237  m_bufPos++;
238  val += m_bufPtr[m_bufPos] << (32 - m_bitPos);
239  m_bitPos += bitsToRead;
240  m_bitPos -= 32;
241  }
242  else {
243  m_bitPos += bitsToRead;
244  if (m_bitPos == 32) {
245  m_bufPos++;
246  m_bitPos -= 32;
247  }
248  }
249 
250  val &= (1 << bitsToRead) - 1;
251 
252  return val;
253 }
254 
255 void ECLUnpackerModule::readRawECLData(RawECL* rawCOPPERData, int n)
256 {
257  int iCrate, iShaper, iChannel, cellID;
258 
259  int shapersMask;
260  int adcDataBase, adcDataDiffWidth;
261  int compressMode, shaperDataLength;
262  unsigned int value = 0;
263  unsigned int nRead = 0, ind = 0, indSample = 0;
264  unsigned int nActiveChannelsWithADCData, nADCSamplesPerChannel, nActiveDSPChannels;
265  int triggerPhase;
266  int dspMask = 0, triggerTag = 0;
267  int nShapers;
268  int adcMask, adcHighMask, dspTime, dspAmplitude, dspQualityFlag;
269  // Mask of shapers that discarded waveform data due to beam burst suppression
270  int burstSuppressionMask;
271 
272 
273  std::vector <int> eclWaveformSamples;
274 
275  int nodeID = rawCOPPERData->GetNodeID(n);
276 
277 
278  // loop over FINESSEs in the COPPER
279  for (int iFINESSE = 0; iFINESSE < ECL_FINESSES_IN_COPPER; iFINESSE++) {
280 
281  m_bitPos = 0;
282  m_bufPos = 0;
283 
284  m_bufLength = rawCOPPERData->GetDetectorNwords(n, iFINESSE);
285 
286  if (m_bufLength <= 0) continue;
287 
288  // get Number of Collector/Crate connected to the FINESSE
289  iCrate = m_eclMapper.getCrateID(nodeID, iFINESSE);
290 
291  // pointer to data from COPPER/FINESSE
292  m_bufPtr = (unsigned int*)rawCOPPERData->GetDetectorBuffer(n, iFINESSE);
293 
294  B2DEBUG_eclunpacker(21, "***** iEvt " << m_localEvtNum << " node " << std::hex << nodeID);
295 
296  // dump buffer data
297  for (int i = 0; i < m_bufLength; i++) {
298  B2DEBUG_eclunpacker(29, "" << std::hex << setfill('0') << setw(8) << m_bufPtr[i]);
299  }
300  B2DEBUG_eclunpacker(21, "***** ");
301 
302 
303  m_bufPos = 0; // set read position to the 1-st word
304 
305  // get number of shapers depending on the subsystem this crate belongs to(barrel/forward/backward)
306  int eclSubSystem = m_eclMapper.getSubSystem(iCrate);
307  switch (eclSubSystem) {
308  case 0 : nShapers = ECL_BARREL_SHAPERS_IN_CRATE; break;
309  case 1 : nShapers = ECL_FWD_SHAPERS_IN_CRATE; break;
310  case 2 : nShapers = ECL_BKW_SHAPERS_IN_CRATE; break;
311  default : nShapers = ECL_BARREL_SHAPERS_IN_CRATE;
312  }
313 
314  try {
315  burstSuppressionMask = 0;
316 
317  // trigger phase of the Collector connected to this FINESSE
318  // -1 if there are no triggered shapers
319  int triggerPhase0 = -1;
320  int triggerTag0 = -1;
321 
322  // read the collector header
323  value = readNextCollectorWord();
324  shapersMask = value & 0xFFF; // mask of active shapers
325  compressMode = (value & 0xF000) >> 12; // compression mode for ADC data, 0 -- disabled, 1 -- enabled
326 
327  B2DEBUG_eclunpacker(22, "ShapersMask = " << std::hex << shapersMask << " compressMode = " << compressMode);
328 
329  // loop over all shapers in crate
330  for (iShaper = 1; iShaper <= nShapers; iShaper++) {
331 
332  // check if shaper is active
333  int thisShaperMask = (1 << (iShaper - 1)) & shapersMask;
334  if (thisShaperMask != (1 << (iShaper - 1))) continue;
335 
336  // read the shaper header
337  value = readNextCollectorWord();
338  shaperDataLength = value & 0xFFFF; // amount of words in DATA section (without COLLECTOR HEADER)
339  B2DEBUG_eclunpacker(22, "iCrate = " << iCrate << " iShaper = " << iShaper);
340  B2DEBUG_eclunpacker(22, "Shaper HEADER = 0x" << std::hex << value << " dataLength = " << std::dec << shaperDataLength);
341  // check shaperDSP header
342  if ((value & 0x00FF0000) != 0x00100000) {
343  doBadHeaderReport(iCrate);
344  throw Bad_ShaperDSP_header();
345  }
346 
347  value = readNextCollectorWord();
348  burstSuppressionMask |= ((value >> 29) & 1) << (iShaper - 1); // burst suppression bit
349  nActiveChannelsWithADCData = (value >> 24) & 0x1F;//number of channels with ADC data
350  nADCSamplesPerChannel = (value >> 16) & 0x7F; //ADC samples per channel
351  nActiveDSPChannels = (value >> 8) & 0x1F; //number of active channels in DSP
352  triggerPhase = value & 0xFF; //trigger phase
353 
354  // check that trigger phases for all shapers in the crate are equal
355  if (triggerPhase0 == -1) triggerPhase0 = triggerPhase;
356  else if (triggerPhase != triggerPhase0) {
357  doPhasesReport(iCrate, triggerPhase0, triggerPhase);
358  }
359 
360  B2DEBUG_eclunpacker(22, "nActiveADCChannels = " << nActiveChannelsWithADCData << " samples " << nADCSamplesPerChannel <<
361  " nActiveDSPChannels "
362  << nActiveDSPChannels);
363 
364  value = readNextCollectorWord();
365 
366  dspMask = (value >> 16) & 0xFFFF; // Active DSP channels mask
367  triggerTag = value & 0xFFFF; // trigger tag
368  B2DEBUG_eclunpacker(22, "DSPMASK = 0x" << std::hex << dspMask << " triggerTag " << std::dec << triggerTag);
369 
370  if (triggerTag0 == -1) triggerTag0 = triggerTag;
371  else if (triggerTag != triggerTag0) {
372  doTagsReport(iCrate, triggerTag0, triggerTag);
373  triggerTag0 |= (1 << 16);
374  }
375 
376  if (m_globalEvtNum >= 0) {
377  if (triggerTag != (m_globalEvtNum & 0xFFFF)) {
378  doEvtNumReport(iCrate, triggerTag, m_globalEvtNum);
379  }
380  }
381 
382  value = readNextCollectorWord();
383  adcMask = value & 0xFFFF; // mask for channels with ADC data
384  adcHighMask = (value >> 16) & 0xFFFF;
385  B2DEBUG_eclunpacker(22, "ADCMASK = 0x" << std::hex << adcMask << " adcHighMask = 0x" << adcHighMask);
386 
387  ECLDigit* newEclDigits[ECL_CHANNELS_IN_SHAPER] = {};
388  int newEclDigitsIdx[ECL_CHANNELS_IN_SHAPER] = {};
389 
390  nRead = 0;
391  // read DSP data (quality, fitted time, amplitude)
392  for (ind = 0; ind < ECL_CHANNELS_IN_SHAPER; ind++) {
393  // check if DSP channel is active
394  if (((1 << ind) & dspMask) != (1 << ind)) continue;
395  iChannel = ind + 1;
396  value = readNextCollectorWord();
397  dspTime = (int)(value << 2) >> 20;
398  dspQualityFlag = (value >> 30) & 0x3;
399  dspAmplitude = (value & 0x3FFFF) - 128;
400  nRead++;
401 
402  cellID = m_eclMapper.getCellId(iCrate, iShaper, iChannel);
403 
404  if (!isDSPValid(cellID, iCrate, iShaper, iChannel, dspAmplitude, dspTime, dspQualityFlag)) continue;
405 
406  // fill eclDigits data object
407  B2DEBUG_eclunpacker(23, "New eclDigit: cid = " << cellID << " amp = " << dspAmplitude << " time = " << dspTime << " qflag = " <<
408  dspQualityFlag);
409 
410  // construct eclDigit object and save it in DataStore
411  ECLDigit* newEclDigit = m_eclDigits.appendNew();
412  newEclDigitsIdx[ind] = m_eclDigits.getEntries() - 1;
413  newEclDigits[ind] = newEclDigit;
414  newEclDigit->setCellId(cellID);
415  newEclDigit->setAmp(dspAmplitude);
416  newEclDigit->setQuality(dspQualityFlag);
417  if (dspQualityFlag == 2) {
418  // amplitude is lower than threshold value time = trg_time => fit_time = 0
419  newEclDigit->setTimeFit(0);
420  // the time data is replaced with chi2 data
421  const int chi_mantissa = dspTime & 0x1FF;
422  const int chi_exponent = (dspTime >> 9) & 7;
423  const int chi2 = chi_mantissa << (chi_exponent * 2);
424  newEclDigit->setChi(chi2);
425 
426  } else {
427  // otherwise we do not have chi2 information
428  newEclDigit->setTimeFit(dspTime);
429  newEclDigit->setChi(0);
430  }
431 
432  }
433 
434 
435 
436  if (nRead != nActiveDSPChannels) {
437  B2ERROR("Number of active DSP channels and number of read channels don't match (Corrupted data?)"
438  << LogVar("nRead", nRead) << LogVar("nActiveDSP", nActiveDSPChannels));
439  // do something (throw an exception etc.) TODO
440  }
441 
442  //read ADC data
443  eclWaveformSamples.resize(nADCSamplesPerChannel);
444  nRead = 0;
445  for (ind = 0; ind < ECL_CHANNELS_IN_SHAPER; ind++) {
446  //check if there is ADC data for this channel
447  if (((1 << ind) & adcMask) != (1 << ind)) continue;
448  iChannel = ind + 1;
449  adcDataBase = 0;
450  adcDataDiffWidth = 0;
451  for (indSample = 0; indSample < nADCSamplesPerChannel; indSample++) {
452  if (compressMode == 0) value = readNextCollectorWord();
453  else {
454  if (indSample == 0) {
455  value = readNBits(18);
456  adcDataBase = value;
457  B2DEBUG_eclunpacker(24, "adcDataBase = " << adcDataBase);
458  value = readNBits(5);
459  adcDataDiffWidth = value;
460  B2DEBUG_eclunpacker(24, "adcDataDiffWidth = " << adcDataDiffWidth);
461  }
462  value = readNBits(adcDataDiffWidth);
463  B2DEBUG_eclunpacker(24, "adcDataOffset = " << value);
464  value += adcDataBase;
465  }
466  // fill waveform data for single channel
467  eclWaveformSamples[indSample] = value;
468  }
469 
470  // save ADC data to the eclDsp DataStore object if any
471  if (nADCSamplesPerChannel > 0) {
472 
473  cellID = m_eclMapper.getCellId(iCrate, iShaper, iChannel);
474 
475  if (cellID > 0 || m_storeUnmapped) {
476  m_eclDsps.appendNew(cellID, eclWaveformSamples);
477 
478  if (m_useUnpackingParameters) {
479  // Check run-dependent unpacking parameters
480  auto params = m_unpackingParams->get(iCrate, iShaper, iChannel);
481  if (params & ECL_OFFLINE_ADC_FIT) {
482  auto result = ECLDspUtilities::shapeFitter(cellID, eclWaveformSamples, triggerPhase0);
483  if (result.quality == 2) result.time = 0;
484 
485  if (!newEclDigits[ind]) {
486  ECLDigit* newEclDigit = m_eclDigits.appendNew();
487  newEclDigits[ind] = newEclDigit;
488  newEclDigit->setCellId(cellID);
489  newEclDigit->setAmp(result.amp);
490  newEclDigit->setTimeFit(result.time);
491  newEclDigit->setQuality(result.quality);
492  newEclDigit->setChi(result.chi2);
493  }
494  }
495  }
496  // Add relation from ECLDigit to ECLDsp
497  if (newEclDigits[ind]) {
498  int eclDspIdx = m_eclDsps.getEntries() - 1;
499  m_relDigitToDsp.add(newEclDigitsIdx[ind], eclDspIdx);
500  }
501  }
502 
503  }
504 
505  nRead++;
506  } // read ADC data loop
507 
508  if (m_bitPos > 0) {
509  m_bufPos++;
510  m_bitPos = 0;
511  }
512 
513  if (nRead != nActiveChannelsWithADCData) {
514  B2ERROR("Number of channels with ADC data and "
515  "number of read channels don't match (Corrupted data?)"
516  << LogVar("active channels", nActiveChannelsWithADCData)
517  << LogVar("read channels", nRead));
518  // do something (throw an exception etc.) TODO
519  }
520 
521 
522 
523  } // loop over shapers
524 
525  // make new eclTrig oject to store trigger time for crate if there are triggered shapers in the crate
526  if (m_storeTrigTime && shapersMask != 0) {
527  int trigId = iCrate & 0x3F;
528  ECLTrig* eclTrig = &m_eclTrigsBuffer[trigId - 1];
529  // fill trigid, trgtime for eclTrig object
530  trigId |= (burstSuppressionMask & 0xFFF) << 6;
531  eclTrig->setTrigId(trigId);
532  eclTrig->setTimeTrig(triggerPhase0);
533  eclTrig->setTrigTag(triggerTag0);
534  }
535 
536  } // try
537  catch (...) {
538  // errors while reading data block
539  // do something (count errors etc) TODO
540  B2ERROR("Corrupted data from ECL collector");
541  }
542 
543  }// loop over FINESSEs
544 
545 }
546 
547 bool ECLUnpackerModule::isDSPValid(int cellID, int crate, int shaper, int channel, int, int, int quality)
548 {
549  // Channel is not connected to crystal
550  if (cellID < 1) return false;
551 
552  if (m_useUnpackingParameters) {
553  // Check if data for this channel should be discarded in current run.
554  auto params = m_unpackingParams->get(crate, shaper, channel);
555  if (params & ECL_DISCARD_DSP_DATA) {
556  if (params & ECL_KEEP_GOOD_DSP_DATA) {
557  if (quality == 0) return true;
558  }
559  return false;
560  }
561  }
562 
563  return true;
564 }
565 
566 void ECLUnpackerModule::doEvtNumReport(unsigned int iCrate, int tag, int evt_number)
567 {
568  if (!evtNumReported(iCrate)) {
569  B2ERROR("ECL trigger tag is inconsistent with event number."
570  << LogVar("crate", iCrate)
571  << LogVar("trigger tag", tag)
572  << LogVar("event number", evt_number));
573  m_evtNumReportedMask |= 1L << (iCrate - 1);
574  }
575 }
576 void ECLUnpackerModule::doTagsReport(unsigned int iCrate, int tag0, int tag1)
577 {
578  if (!tagsReported(iCrate)) {
579  B2ERROR("Different trigger tags. ECL data is corrupted for whole run probably."
580  << LogVar("crate", iCrate)
581  << LogVar("trigger tag0", tag0) << LogVar("trigger tag1", tag1));
582  m_tagsReportedMask |= 1L << (iCrate - 1);
583  }
584 }
585 void ECLUnpackerModule::doPhasesReport(unsigned int iCrate, int phase0, int phase1)
586 {
587  if (!phasesReported(iCrate)) {
588  B2ERROR("Different trigger phases. ECL data is corrupted for whole run probably."
589  << LogVar("crate", iCrate)
590  << LogVar("trigger phase0", phase0) << LogVar("trigger phase1", phase1));
591  m_phasesReportedMask |= 1L << (iCrate - 1);
592  }
593 }
594 void ECLUnpackerModule::doBadHeaderReport(unsigned int iCrate)
595 {
596  if (!badHeaderReported(iCrate)) {
597  B2ERROR("Bad shaper header."
598  << LogVar("crate", iCrate));
599  m_badHeaderReportedMask |= 1L << (iCrate - 1);
600  }
601 }
602 
In the store you can park objects that have to be accessed by various modules.
Definition: DataStore.h:51
Class to store ECL digitized hits (output of ECLDigi) relation to ECLHit filled in ecl/modules/eclDig...
Definition: ECLDigit.h:23
void setAmp(int Amp)
Set Fitting Amplitude.
Definition: ECLDigit.h:43
void setTimeFit(int TimeFit)
Set Fitting Time.
Definition: ECLDigit.h:48
void setCellId(int CellId)
Set Cell ID.
Definition: ECLDigit.h:39
void setQuality(int Quality)
Set Fitting Quality.
Definition: ECLDigit.h:53
void setChi(int Chi)
Set Chi-squared.
Definition: ECLDigit.h:57
Class to store ECLTrig, still need to be study relation to ECLHit filled in ecl/modules/eclDigitizer/...
Definition: ECLTrig.h:25
void setTrigTag(int TrigTag)
Set Trig Time (crate Id)
Definition: ECLTrig.h:41
void setTrigId(int TrigId)
Set TrigID.
Definition: ECLTrig.h:38
void setTimeTrig(double TimeTrig)
Set Triger Tag (crate Id)
Definition: ECLTrig.h:44
the ECL unpacker module
The Raw ECL class Class for RawCOPPER class data taken by ECL Currently, this class is almost same as...
Definition: RawECL.h:26
Class to store variables with their name which were sent to the logging service.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
int GetDetectorNwords(int n, int finesse_num)
get Detector buffer length
Definition: RawCOPPER.h:654
int * GetDetectorBuffer(int n, int finesse_num)
get Detector buffer
Definition: RawCOPPER.h:678
unsigned int GetNodeID(int n)
get node-ID from data
Definition: RawCOPPER.h:394
Abstract base class for different kinds of events.