Project
Loading...
Searching...
No Matches
CompressedDigit.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
13#include <iostream>
14
15namespace o2::trd
16{
17
18using namespace constants;
19
20CompressedDigit::CompressedDigit(const int det, const int rob, const int mcm, const int channel, const std::array<uint16_t, constants::TIMEBINS>& adc)
21{
22 setDetector(det);
23 setROB(rob);
24 setMCM(mcm);
25 setChannel(channel);
26 setADC(adc);
27}
28
29CompressedDigit::CompressedDigit(const int det, const int rob, const int mcm, const int channel) // add adc data in a seperate step
30{
31 setDetector(det);
32 setROB(rob);
33 setMCM(mcm);
34 setChannel(channel);
35}
36
38{
39 if (getChannel() == 0 || getChannel() == 1 || getChannel() == NADCMCM - 1) {
40 return 1;
41 } else {
42 return 0;
43 }
44}
45
46std::ostream& operator<<(std::ostream& stream, CompressedDigit& d)
47{
48 stream << "CompressedDigit Det: " << d.getDetector() << " ROB: " << d.getROB() << " MCM: " << d.getMCM() << " Channel: " << d.getChannel() << " ADCs:";
49 for (unsigned int i = 0; i < constants::TIMEBINS; i++) {
50 stream << "[" << d[i] << "]";
51 }
52 return stream;
53}
54
55} // namespace o2::trd
uint16_t mcm
uint16_t rob
int32_t i
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events d
void setADC(std::array< uint16_t, constants::TIMEBINS > const &adcs)
void setChannel(int channel)
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &stream, const Digit &d)
Definition Digit.cxx:85
ArrayADC adc