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