16#include <fairlogger/Logger.h>
29 if (cellID >= mPedestalValuesHG.size()) {
34 mPedestalValuesLEDMONLG[cellID] = pedestal;
36 mPedestalValuesLEDMONHG[cellID] = pedestal;
40 mPedestalValuesLG[cellID] = pedestal;
42 mPedestalValuesHG[cellID] = pedestal;
49 if (cellID >= mPedestalValuesHG.size()) {
54 return mPedestalValuesLEDMONLG[cellID];
56 return mPedestalValuesLEDMONHG[cellID];
60 return mPedestalValuesLG[cellID];
62 return mPedestalValuesHG[cellID];
69 gsl::span<const short>
data;
70 std::string histname, histtitle;
73 histname =
"PedestalLG_LEDMON";
74 histtitle =
"LEDMON Pedestal values Params low Gain";
75 data = gsl::span<const short>(mPedestalValuesLEDMONLG);
77 histname =
"PedestalHG_LEDMON";
78 histtitle =
"LEDMON Pedestal values Params high Gain";
79 data = gsl::span<const short>(mPedestalValuesLEDMONHG);
83 histname =
"PedestalLG";
84 histtitle =
"Pedestal values Params low Gain";
85 data = gsl::span<const short>(mPedestalValuesLG);
87 histname =
"PedestalHG";
88 histtitle =
"Pedestal values Params high Gain";
89 data = gsl::span<const short>(mPedestalValuesHG);
93 auto hist =
new TH1S(histname.data(), histtitle.data(),
data.size(), -0.5,
data.size() - 0.5);
94 hist->SetDirectory(
nullptr);
95 for (std::size_t icell{0}; icell <
data.size(); ++icell) {
96 hist->SetBinContent(icell + 1,
data[icell]);
103 gsl::span<const short>
data;
104 std::string histname, histtitle;
107 histname =
"PedestalLG_LEDMON";
108 histtitle =
"LEDMON Pedestal values Params low Gain";
109 data = gsl::span<const short>(mPedestalValuesLEDMONLG);
111 histname =
"PedestalHG_LEDMON";
112 histtitle =
"LEDMON Pedestal values Params high Gain";
113 data = gsl::span<const short>(mPedestalValuesLEDMONHG);
117 histname =
"PedestalLG";
118 histtitle =
"Pedestal values Params low Gain";
119 data = gsl::span<const short>(mPedestalValuesLG);
121 histname =
"PedestalHG";
122 histtitle =
"Pedestal values Params high Gain";
123 data = gsl::span<const short>(mPedestalValuesHG);
127 const int MAXROWS = isLEDMON ? 10 : 208,
128 MAXCOLS = isLEDMON ? 48 : 96;
130 auto hist =
new TH2S(histname.data(), histtitle.data(), MAXCOLS, -0.5,
double(MAXCOLS) - 0.5, MAXROWS, -0.5,
double(MAXROWS) - 0.5);
131 hist->SetDirectory(
nullptr);
134 for (
size_t ichan = 0; ichan <
data.size(); ichan++) {
136 int col = ichan % 48,
140 auto position = geo->GlobalRowColFromIndex(ichan);
145 LOG(
error) <<
"Geometry needs to be initialized";
152 return mPedestalValuesHG ==
other.mPedestalValuesHG && mPedestalValuesLG ==
other.mPedestalValuesLG && mPedestalValuesLEDMONHG ==
other.mPedestalValuesLEDMONHG && mPedestalValuesLEDMONLG ==
other.mPedestalValuesLEDMONLG;
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 e
char error[CURL_ERROR_SIZE]
Error handling for invalid index in calibration request.
Error handling access to non-initialized geometry.
static Geometry * GetInstance()
Get geometry instance. It should have been set before.
CCDB container for pedestal values.
short getPedestalValue(unsigned short cellID, bool isLowGain, bool isLEDMON) const
Get the time calibration coefficient for a certain cell.
bool operator==(const Pedestal &other) const
Comparison of two pedestal containers.
void addPedestalValue(unsigned short cellID, short pedestal, bool isLowGain, bool isLEDMON)
Add pedestal to the container.
TH1 * getHistogramRepresentation(bool isLowGain, bool isLEDMON) const
Convert the pedestal container to a histogram.
TH2 * getHistogramRepresentation2D(bool isLowGain, bool isLEDMON) const
Convert the pedestal container to a 2D histogram.
VectorOfTObjectPtrs other
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"