Project
Loading...
Searching...
No Matches
RawWriter.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#include <fairlogger/Logger.h>
13#include <iostream>
14
15#include <fmt/core.h>
16#include <gsl/span>
17#include <TSystem.h>
19#include "PHOSBase/Mapping.h"
22#include "CCDB/CcdbApi.h"
25
26using namespace o2::phos;
27
29{
30 mRawWriter = std::make_unique<o2::raw::RawFileWriter>(o2::header::gDataOriginPHS, false);
31 mRawWriter->setCarryOverCallBack(this);
32 mRawWriter->setApplyCarryOverToLastPage(true);
33
34 // initialize mapping
36
37 short flp, crorc, link;
38 for (auto iddl = 0; iddl < o2::phos::Mapping::NDDL; iddl++) {
39 // For PHOS set
40 Mapping::ddlToCrorcLink(iddl, flp, crorc, link);
41 std::string rawfilename = mOutputLocation;
42 switch (mFileFor) {
44 rawfilename += "/phos.raw";
45 break;
47 rawfilename += fmt::format("/PHS_alio2-cr1-flp{:d}_crorc{:d}.raw", flp, crorc);
48 break;
50 rawfilename += fmt::format("/PHS_alio2-cr1-flp{:d}_crorc{:d}_{:d}.raw", flp, crorc, link);
51 }
52 mRawWriter->registerLink(iddl, crorc, link, 0, rawfilename.data());
53 }
54
55 // initialize containers for SRU and TRU
56 for (auto isru = 0; isru < o2::phos::Mapping::NDDL; isru++) {
57 SRUDigitContainer srucont;
58 srucont.mSRUid = isru;
59 mSRUdata.push_back(srucont);
60
61 SRUDigitContainer trucont;
62 trucont.mSRUid = isru;
63 mTRUdata.push_back(trucont);
64 }
65}
66
67void RawWriter::digitsToRaw(gsl::span<o2::phos::Digit> digitsbranch, gsl::span<o2::phos::TriggerRecord> triggerbranch)
68{
69 if (!mCalibParams) {
70 if (o2::phos::PHOSSimParams::Instance().mCCDBPath.compare("localtest") == 0) {
71 mCalibParams = std::make_unique<CalibParams>(1); // test default calibration
72 LOG(info) << "[RawWriter] No reading calibration from ccdb requested, set default";
73 } else {
74 LOG(info) << "[RawWriter] getting calibration object from ccdb";
75 auto& ccdbManager = o2::ccdb::BasicCCDBManager::instance();
76 ccdbManager.setURL(o2::base::NameConf::getCCDBServer());
77 LOG(info) << " set-up CCDB " << o2::base::NameConf::getCCDBServer();
78
79 if (!ccdbManager.get<o2::phos::CalibParams>("PHS/Calib/CalibParams")) {
80 LOG(fatal) << "[RawWriter] can not get calibration object from ccdb";
81 }
82 mCalibParams = std::make_unique<CalibParams>(*(ccdbManager.get<o2::phos::CalibParams>("PHS/Calib/CalibParams")));
83 }
84 }
85
86 for (auto trg : triggerbranch) {
87 processTrigger(digitsbranch, trg);
88 }
89}
90
91bool RawWriter::processTrigger(const gsl::span<o2::phos::Digit> digitsbranch, const o2::phos::TriggerRecord& trg)
92{
93 // Account for L0-LM trigger lattency
94 const auto& ctpOffsets = o2::ctp::TriggerOffsetsParam::Instance();
95 o2::InteractionRecord currentIR = trg.getBCData();
96 currentIR += ctpOffsets.LM_L0;
97 // TODO:Should we check if we still within TF?
98
99 auto srucont = mSRUdata.begin();
100 while (srucont != mSRUdata.end()) {
101 srucont->mChannels.clear();
102 srucont++;
103 }
104 auto trucont = mTRUdata.begin();
105 while (trucont != mTRUdata.end()) {
106 trucont->mChannels.clear();
107 trucont++;
108 }
109 for (auto& dig : gsl::span(digitsbranch.data() + trg.getFirstEntry(), trg.getNumberOfObjects())) {
110 if (dig.isTRU()) {
111 short absId = dig.getTRUId();
112 short ddl, hwAddr;
113 // get ddl and High Gain hw addresses
114 if (Mapping::Instance()->absIdTohw(absId, Mapping::kTRU, ddl, hwAddr) != o2::phos::Mapping::kOK) {
115 LOG(error) << "Wrong truId=" << absId;
116 }
117 // Collect possible several digits (signal+pileup) into one map record
118 auto celldata = mTRUdata[ddl].mChannels.find(absId);
119 if (celldata == mTRUdata[ddl].mChannels.end()) {
120 const auto it = mTRUdata[ddl].mChannels.insert(celldata, {absId, std::vector<o2::phos::Digit*>()});
121 it->second.push_back(&dig);
122 } else {
123 celldata->second.push_back(&dig);
124 }
125 } else {
126 short absId = dig.getAbsId();
127 short ddl, hwAddr;
128 // get ddl and High Gain hw addresses
130 LOG(error) << "Wrong AbsId" << absId;
131 }
132
133 // Collect possible several digits (signal+pileup) into one map record
134 auto celldata = mSRUdata[ddl].mChannels.find(absId);
135 if (celldata == mSRUdata[ddl].mChannels.end()) {
136 const auto it = mSRUdata[ddl].mChannels.insert(celldata, {absId, std::vector<o2::phos::Digit*>()});
137 it->second.push_back(&dig);
138 } else {
139 celldata->second.push_back(&dig);
140 }
141 }
142 }
143 // Create and fill DMA pages for each channel
144 std::vector<uint32_t> rawbunches;
145 std::vector<char> payload;
146 std::vector<AltroBunch> rawbunchesTRU, rawbunchesHG, rawbunchesLG;
147
148 for (short ddl = 0; ddl < o2::phos::Mapping::NDDL; ddl++) {
149 payload.clear();
150 // Create trigger
151 // Trigger mask
152 short trmask[2 * Mapping::NTRUBranchReadoutChannels] = {0}; // Time bin in which trigger was fired.
153 for (auto ch = mTRUdata[ddl].mChannels.cbegin(); ch != mTRUdata[ddl].mChannels.cend(); ch++) {
154 short truId = ch->first;
155 short hwAddr, iddl;
156 if ((Mapping::Instance()->absIdTohw(truId, Mapping::kTRU, iddl, hwAddr) != o2::phos::Mapping::kOK) || iddl != ddl) {
157 LOG(error) << "Wrong truId=" << truId << ", iDDL=" << iddl << "!=" << ddl;
158 }
159 rawbunchesTRU.clear();
160 createTRUBunches(truId, ch->second, rawbunchesTRU);
161 rawbunches.clear();
162 for (auto& bunch : rawbunchesTRU) {
163 rawbunches.push_back(bunch.mADCs.size() + 2);
164 rawbunches.push_back(bunch.mStarttime);
165 for (auto adc : bunch.mADCs) {
166 rawbunches.push_back(adc);
167 }
168 trmask[truId % (2 * Mapping::NTRUBranchReadoutChannels)] = bunch.mStarttime + 1; // need last tile (inverse time order)
169 }
170 if (rawbunches.size() == 0) {
171 continue;
172 }
173 auto encodedbunches = encodeBunchData(rawbunches);
174 ChannelHeader chanhead = {0};
175 chanhead.mHardwareAddress = hwAddr;
176 chanhead.mPayloadSize = rawbunches.size();
177 chanhead.mMark = 1; // mark channel header
178 char* chanheadwords = reinterpret_cast<char*>(&chanhead.mDataWord);
179 for (unsigned int iword = 0; iword < sizeof(ChannelHeader) / sizeof(char); iword++) {
180 payload.emplace_back(chanheadwords[iword]);
181 }
182 char* channelwords = reinterpret_cast<char*>(encodedbunches.data());
183 for (unsigned int iword = 0; iword < encodedbunches.size() * sizeof(int) / sizeof(char); iword++) {
184 payload.emplace_back(channelwords[iword]);
185 }
186 }
187 if (mTRUdata[ddl].mChannels.size()) { // if there are TRU digits, fill trigger flags
188 std::vector<uint32_t> a;
189 for (unsigned short chan = 0; chan < Mapping::NTRUBranchReadoutChannels; chan++) {
190 if (trmask[chan] > 0) {
191 while (a.size() < static_cast<unsigned short>(trmask[chan])) {
192 a.push_back(0);
193 }
194 a[trmask[chan] - 1] |= (1 << (chan % 10)); // Fill mask for a given channel
195 }
196 if (chan % 10 == 9 || chan + 1 == Mapping::NTRUBranchReadoutChannels) {
197 auto encodedbunches = encodeBunchData(a);
198 ChannelHeader chanhead = {0};
199 chanhead.mHardwareAddress = 112 + chan / 10;
200 chanhead.mPayloadSize = a.size();
201 chanhead.mMark = 1; // mark channel header
202 char* chanheadwords = reinterpret_cast<char*>(&chanhead.mDataWord);
203 for (unsigned int iword = 0; iword < sizeof(ChannelHeader) / sizeof(char); iword++) {
204 payload.emplace_back(chanheadwords[iword]);
205 }
206 char* channelwords = reinterpret_cast<char*>(encodedbunches.data());
207 for (unsigned int iword = 0; iword < encodedbunches.size() * sizeof(int) / sizeof(char); iword++) {
208 payload.emplace_back(channelwords[iword]);
209 }
210 a.clear();
211 }
212 }
213 // second branch
214 for (short i = 0; i < Mapping::NTRUBranchReadoutChannels; i++) {
216 if (trmask[chan] > 0) {
217 while (a.size() < static_cast<unsigned short>(trmask[chan])) {
218 a.push_back(0);
219 }
220 a[trmask[chan] - 1] |= (1 << (i % 10)); // Fill mask for a given channel
221 }
222 if (i % 10 == 9 || i + 1 == Mapping::NTRUBranchReadoutChannels) {
223 auto encodedbunches = encodeBunchData(a);
224 ChannelHeader chanhead = {0};
225 chanhead.mHardwareAddress = 2048 + 112 + i / 10;
226 chanhead.mPayloadSize = a.size();
227 chanhead.mMark = 1; // mark channel header
228 char* chanheadwords = reinterpret_cast<char*>(&chanhead.mDataWord);
229 for (unsigned int iword = 0; iword < sizeof(ChannelHeader) / sizeof(char); iword++) {
230 payload.emplace_back(chanheadwords[iword]);
231 }
232 char* channelwords = reinterpret_cast<char*>(encodedbunches.data());
233 for (unsigned int iword = 0; iword < encodedbunches.size() * sizeof(int) / sizeof(char); iword++) {
234 payload.emplace_back(channelwords[iword]);
235 }
236 a.clear();
237 }
238 }
239 }
240
241 for (auto ch = mSRUdata[ddl].mChannels.cbegin(); ch != mSRUdata[ddl].mChannels.cend(); ch++) {
242 // Find out hardware address of the channel
243 bool isLGfilled = 0;
244 createRawBunches(ch->first, ch->second, rawbunchesHG, rawbunchesLG, isLGfilled);
245
246 short hwAddrHG; // High gain always filled
247 if (Mapping::Instance()->absIdTohw(ch->first, Mapping::kHighGain, ddl, hwAddrHG) != o2::phos::Mapping::kOK) {
248 LOG(error) << "Wrong AbsId" << ch->first;
249 }
250 rawbunches.clear();
251 for (auto& bunch : rawbunchesHG) {
252 rawbunches.push_back(bunch.mADCs.size() + 2);
253 rawbunches.push_back(bunch.mStarttime);
254 for (auto adc : bunch.mADCs) {
255 rawbunches.push_back(adc);
256 }
257 }
258 if (rawbunches.size() == 0) {
259 continue;
260 }
261 auto encodedbunches = encodeBunchData(rawbunches);
262 ChannelHeader chanhead = {0};
263 chanhead.mHardwareAddress = hwAddrHG;
264 chanhead.mPayloadSize = rawbunches.size();
265 chanhead.mMark = 1; // mark channel header
266 char* chanheadwords = reinterpret_cast<char*>(&chanhead.mDataWord);
267 for (unsigned int iword = 0; iword < sizeof(ChannelHeader) / sizeof(char); iword++) {
268 payload.emplace_back(chanheadwords[iword]);
269 }
270
271 char* channelwords = reinterpret_cast<char*>(encodedbunches.data());
272 for (unsigned int iword = 0; iword < encodedbunches.size() * sizeof(int) / sizeof(char); iword++) {
273 payload.emplace_back(channelwords[iword]);
274 }
275
276 if (isLGfilled) { // fill both HighGain, and LowGain channels in case of saturation
277 short hwAddrLG; // High gain always filled
278 if (Mapping::Instance()->absIdTohw(ch->first, 1, ddl, hwAddrLG) != o2::phos::Mapping::kOK) {
279 LOG(error) << "Wrong AbsId" << ch->first;
280 }
281
282 rawbunches.clear();
283 for (auto& bunch : rawbunchesLG) {
284 rawbunches.push_back(bunch.mADCs.size() + 2);
285 rawbunches.push_back(bunch.mStarttime);
286 for (auto adc : bunch.mADCs) {
287 rawbunches.push_back(adc);
288 }
289 }
290
291 encodedbunches = encodeBunchData(rawbunches);
292 ChannelHeader chanheadLG = {0};
293 chanheadLG.mHardwareAddress = hwAddrLG;
294 chanheadLG.mPayloadSize = rawbunches.size();
295 chanheadLG.mMark = 1; // mark channel header
296
297 chanheadwords = reinterpret_cast<char*>(&chanheadLG.mDataWord);
298 for (unsigned int iword = 0; iword < sizeof(ChannelHeader) / sizeof(char); iword++) {
299 payload.emplace_back(chanheadwords[iword]);
300 }
301 channelwords = reinterpret_cast<char*>(encodedbunches.data());
302 for (unsigned int iword = 0; iword < encodedbunches.size() * sizeof(int) / sizeof(char); iword++) {
303 payload.emplace_back(channelwords[iword]);
304 }
305 }
306 }
307
308 // Create RCU trailer
309 auto trailerwords = createRCUTrailer(payload.size() / 4, 16, 16, 100., 0.);
310 for (auto word : trailerwords) {
311 payload.emplace_back(word);
312 }
313
314 // register output data
315 LOG(debug1) << "Adding payload with size " << payload.size() << " (" << payload.size() / 4 << " ALTRO words)";
316
317 short flp, crorc, link;
318 Mapping::ddlToCrorcLink(ddl, flp, crorc, link);
319 mRawWriter->addData(ddl, crorc, link, 0, currentIR, payload);
320 }
321 return true;
322}
323void RawWriter::createTRUBunches(short truId, const std::vector<o2::phos::Digit*>& channelDigits,
324 std::vector<o2::phos::AltroBunch>& bunchs)
325{
326
327 AltroBunch currentBunch;
328 std::vector<short> samples;
329 float maxAmp = 0;
330 for (auto dig : channelDigits) {
331 float ampADC = dig->getAmplitude(); // Digits amplitude already in ADC channels
332 short time = short(dig->getTime() / 25.); // digit time in nc, convert to bunch crossings (25ns), max readout time 3 mks
333 if (time > 120) {
334 time = 120;
335 }
336 if (time < 0) {
337 time = 0;
338 }
339 if (maxAmp < ampADC) {
340 currentBunch.mStarttime = time;
341 maxAmp = ampADC;
342 }
343 while (samples.size() <= static_cast<unsigned short>(time)) {
344 samples.push_back(0);
345 }
346 samples[time] = ampADC;
347 }
348
349 // Note reverse time order
350 for (int i = samples.size(); i--;) {
351 currentBunch.mADCs.emplace_back(samples[i]);
352 }
353 bunchs.push_back(currentBunch);
354}
355
356void RawWriter::createRawBunches(short absId, const std::vector<o2::phos::Digit*>& channelDigits, std::vector<o2::phos::AltroBunch>& bunchHG,
357 std::vector<o2::phos::AltroBunch>& bunchLG, bool& isLGFilled)
358{
359
360 isLGFilled = false;
361 short samples[kNPHOSSAMPLES] = {0};
362 float hglgratio = mCalibParams->getHGLGRatio(absId);
363 for (auto dig : channelDigits) {
364 // Convert energy and time to ADC counts and time ticks
365 float ampADC = dig->getAmplitude(); // Digits amplitude already in ADC channels
366 if (!dig->isHighGain() || ampADC > o2::phos::PHOSSimParams::Instance().mMCOverflow) { // High Gain in saturation, fill also Low Gain
367 isLGFilled = true;
368 }
369 float timeTicks = dig->getTime(); // time in ns
370 timeTicks /= o2::phos::PHOSSimParams::Instance().mTimeTick; // time in PHOS ticks
371 // Add to current sample contribution from digit
372 if (!dig->isHighGain()) {
373 ampADC *= hglgratio;
374 }
375 fillGamma2(ampADC, timeTicks, samples);
376 }
377
378 // reduce samples below ZS and fill output
380 bunchHG.clear();
381 AltroBunch currentBunch;
382 // Note reverse time order
383 for (int i = kNPHOSSAMPLES; i--;) {
384 if (samples[i] > zs) {
385 currentBunch.mADCs.emplace_back(std::min(o2::phos::PHOSSimParams::Instance().mMCOverflow, samples[i]));
386 } else { // end of sample?
387 if (currentBunch.mADCs.size()) {
388 currentBunch.mStarttime = i + 1;
389 bunchHG.push_back(currentBunch);
390 currentBunch.mADCs.clear();
391 }
392 }
393 }
394 if (currentBunch.mADCs.size()) {
395 bunchHG.push_back(currentBunch);
396 currentBunch.mADCs.clear();
397 }
398 if (isLGFilled) {
399 bunchLG.clear();
400 currentBunch.mADCs.clear();
401 for (int i = kNPHOSSAMPLES; i--;) {
402 if (samples[i] > zs * hglgratio) {
403 currentBunch.mADCs.emplace_back(std::min(o2::phos::PHOSSimParams::Instance().mMCOverflow, short(samples[i] / hglgratio)));
404 } else { // end of sample?
405 if (currentBunch.mADCs.size()) {
406 currentBunch.mStarttime = i + 1;
407 bunchLG.push_back(currentBunch);
408 currentBunch.mADCs.clear();
409 }
410 }
411 }
412 if (currentBunch.mADCs.size()) {
413 bunchLG.push_back(currentBunch);
414 }
415 }
416}
417
418void RawWriter::fillGamma2(float amp, float time, short* samples)
419{
420 // Simulate Gamma2 signal added to current sample in PHOS
422 amp += 0.5; // rounding err
423 for (int i = 0; i < kNPHOSSAMPLES; i++) {
424 if (i < time) {
425 continue;
426 }
427 float x = alpha * (i - time);
428 float y = 0.25 * amp * x * x * std::exp(2. - x); // 0.25*exp(-2) normalization to unity
429 samples[i] += short(y);
430 }
431}
432
433std::vector<uint32_t> RawWriter::encodeBunchData(const std::vector<uint32_t>& data)
434{
435 std::vector<uint32_t> encoded;
436 CaloBunchWord currentword;
437 currentword.mDataWord = 0;
438 int wordnumber = 0;
439 for (auto adc : data) {
440 switch (wordnumber) {
441 case 0:
442 currentword.mWord0 = adc;
443 break;
444 case 1:
445 currentword.mWord1 = adc;
446 break;
447 case 2:
448 currentword.mWord2 = adc;
449 break;
450 };
451 wordnumber++;
452 if (wordnumber == 3) {
453 // start new word;
454 encoded.push_back(currentword.mDataWord);
455 currentword.mDataWord = 0;
456 wordnumber = 0;
457 }
458 }
459 if (wordnumber) {
460 encoded.push_back(currentword.mDataWord);
461 }
462 return encoded;
463}
464
465std::vector<char> RawWriter::createRCUTrailer(int payloadsize, int feca, int fecb, double timesample, double l1phase)
466{
467 RCUTrailer trailer;
468 trailer.setActiveFECsA(feca);
469 trailer.setActiveFECsB(fecb);
470 trailer.setPayloadSize(payloadsize);
471 trailer.setL1Phase(l1phase);
472 trailer.setTimeSample(timesample);
473 auto trailerwords = trailer.encode();
474 std::vector<char> encoded(trailerwords.size() * sizeof(uint32_t));
475 memcpy(encoded.data(), trailerwords.data(), trailerwords.size() * sizeof(uint32_t));
476 return encoded;
477}
478
479int RawWriter::carryOverMethod(const header::RDHAny* rdh, const gsl::span<char> data,
480 const char* ptr, int maxSize, int splitID,
481 std::vector<char>& trailer, std::vector<char>& header) const
482{
483
484 constexpr int phosTrailerSize = 36;
485 int offs = ptr - &data[0]; // offset wrt the head of the payload
486 assert(offs >= 0 && size_t(offs + maxSize) <= data.size()); // make sure ptr and end of the suggested block are within the payload
487 int leftBefore = data.size() - offs; // payload left before this splitting
488 int leftAfter = leftBefore - maxSize; // what would be left after the suggested splitting
489 int actualSize = maxSize;
490 if (leftAfter && leftAfter <= phosTrailerSize) { // avoid splitting the trailer or writing only it.
491 actualSize -= (phosTrailerSize - leftAfter) + 4; // (as we work with int, not char in decoding)
492 }
493 return actualSize;
494}
int16_t time
Definition RawEventData.h:4
int32_t i
Definition of the Names Generator class.
TBranch * ptr
static std::string getCCDBServer()
Definition NameConf.cxx:110
static BasicCCDBManager & instance()
static constexpr short NDDL
Total number of DDLs.
Definition Mapping.h:45
static Mapping * Instance()
Definition Mapping.cxx:29
static constexpr short NTRUBranchReadoutChannels
Number of TRU readout channels per branch.
Definition Mapping.h:46
static void ddlToCrorcLink(short iddl, short &flp, short &crorc, short &link)
convert ddl number to crorc and link number
Definition Mapping.h:66
ErrorStatus absIdTohw(short absId, short caloFlag, short &ddl, short &hwAddr) const
convert absId and caloflag to hardware address and ddl
Definition Mapping.cxx:89
Information stored in the RCU trailer.
Definition RCUTrailer.h:56
void setTimeSample(double timesample)
set time sample
void setActiveFECsA(unsigned short value)
Definition RCUTrailer.h:170
void setActiveFECsB(unsigned short value)
Definition RCUTrailer.h:171
void setPayloadSize(unsigned int size)
Definition RCUTrailer.h:175
std::vector< uint32_t > encode() const
void setL1Phase(double l1phase)
Set the L1 phase.
void createTRUBunches(short truId, const std::vector< o2::phos::Digit * > &channelDigits, std::vector< o2::phos::AltroBunch > &bunchs)
void createRawBunches(short absId, const std::vector< o2::phos::Digit * > &digits, std::vector< o2::phos::AltroBunch > &bunchHG, std::vector< o2::phos::AltroBunch > &bunchLG, bool &isLGFilled)
std::vector< char > createRCUTrailer(int payloadsize, int feca, int fecb, double timesample, double l1phase)
void fillGamma2(float amp, float time, short *samples)
void digitsToRaw(gsl::span< o2::phos::Digit > digits, gsl::span< o2::phos::TriggerRecord > triggers)
Definition RawWriter.cxx:67
std::vector< uint32_t > encodeBunchData(const std::vector< uint32_t > &data)
bool processTrigger(const gsl::span< o2::phos::Digit > digitsbranch, const o2::phos::TriggerRecord &trg)
Definition RawWriter.cxx:91
int carryOverMethod(const header::RDHAny *rdh, const gsl::span< char > data, const char *ptr, int maxSize, int splitID, std::vector< char > &trailer, std::vector< char > &header) const
Header for data corresponding to the same hardware trigger adapted from DataFormatsEMCAL/TriggerRecor...
int getNumberOfObjects() const
const BCData & getBCData() const
GLfloat GLfloat GLfloat alpha
Definition glcorearb.h:279
GLint GLenum GLint x
Definition glcorearb.h:403
GLsizei samples
Definition glcorearb.h:1309
GLboolean * data
Definition glcorearb.h:298
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
constexpr o2::header::DataOrigin gDataOriginPHS
Definition DataHeader.h:574
std::vector< int > mADCs
Definition RawWriter.h:45
float mSampleDecayTime
Time parameter in Gamma2 function (1/tau, 100.e-9/2.1e-6)
short mMCOverflow
Overflow level for MC simulations: 1023-(pedestal~50)
float mTimeTick
ns to PHOS digitization step conversion
short mZSthreshold
Zero Suppression threshold.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
ArrayADC adc
uint32_t mWord1
Bits 10 - 19 : Word 1.
Definition RCUTrailer.h:42
uint32_t mWord2
Bits 0 - 9 : Word 2.
Definition RCUTrailer.h:41
uint32_t mWord0
Bits 20 - 29 : Word 0.
Definition RCUTrailer.h:43
uint32_t mMark
Bits 30 - 30: Mark header.
Definition RCUTrailer.h:34
uint32_t mHardwareAddress
Bits 0 - 15: Hardware address.
Definition RCUTrailer.h:30
uint32_t mPayloadSize
Bits 16 - 25: Payload size.
Definition RCUTrailer.h:31