16#ifndef ALICEO2_TPC_DigitContainer_H_
17#define ALICEO2_TPC_DigitContainer_H_
79 size_t size()
const {
return mTimeBins.size(); }
86 std::deque<DigitTime*> mTimeBins;
87 std::unique_ptr<DigitTime::PrevDigitInfoArray> mPrevDigArr;
90 void reportSettings();
98 mTmaxTriggered = detParam.TmaxTriggered;
101 mOffset =
static_cast<TimeBin>(detParam.TPCRecoWindowSim * detParam.TPClength / gasParam.DriftV / eleParam.ZbinWidth);
102 mTimeBins.resize(mOffset,
nullptr);
108 mEffectiveTimeBin = 0;
109 for (
auto&
time : mTimeBins) {
115 std::fill(mPrevDigArr->begin(), mPrevDigArr->end(),
PrevDigitInfo{});
121 const auto space = mOffset + eventTimeBin - mFirstTimeBin;
122 if (mTimeBins.size() < space) {
123 mTimeBins.resize(space);
130 mEffectiveTimeBin = timeBin - mFirstTimeBin;
131 if (mEffectiveTimeBin >= mTimeBins.size()) {
136 if (mTimeBins[mEffectiveTimeBin] ==
nullptr) {
137 mTimeBins[mEffectiveTimeBin] =
new DigitTime();
140 mTimeBins[mEffectiveTimeBin]->addDigit(
label, cru, globalPad, signal);
Definition of class for writing debug informations.
Definition of the Time Bin container.
Definition of the parameter class for the detector.
Definition of the parameter class for the detector electronics.
Definition of the parameter class for the detector gas.
static const ParameterDetector & Instance()
void setStartTime(TimeBin time)
size_t size() const
Get the size of the container for one event.
DigitContainer()
Default constructor.
void fillOutputContainer(std::vector< Digit > &output, dataformats::MCTruthContainer< MCCompLabel > &mcTruth, std::vector< CommonMode > &commonModeOutput, const Sector §or, TimeBin eventTimeBin=0, bool isContinuous=true, bool finalFlush=false)
void reset()
Reset the container.
~DigitContainer()=default
Destructor.
void addDigit(const MCCompLabel &label, const CRU &cru, TimeBin timeBin, GlobalPadNumber globalPad, float signal)
void reserve(TimeBin eventTimeBin)
Reserve space in the container for a given event.
class to enable streaming debug information to root files
GLuint GLsizei const GLchar * label
Global TPC definitions and constants.
unsigned short GlobalPadNumber
global pad number
unsigned int TimeBin
global time bin