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