13#include <fairlogger/Logger.h>
19Pedestals::Pedestals(
int )
29 LOG(error) <<
"no input histogam";
33 if (
h->GetNbinsX() != NCHANNELS) {
34 LOG(error) <<
"Wrong dimentions of input histogram:" <<
h->GetNbinsX() <<
" instead of " << NCHANNELS;
38 for (
short i = 1;
i <= NCHANNELS;
i++) {
39 if (
h->GetBinContent(
i) > 511) {
40 LOG(error) <<
"setPedestals : pedestal value = " <<
h->GetBinContent(
i)
41 <<
" in channel " <<
i
42 <<
" exceeds max possible value 511 (limited by CPV electronics)";
45 mPedestals[
i - 1] =
short(
h->GetBinContent(
i));
53 LOG(error) <<
"no input histogam";
57 if (
h->GetNbinsX() != NCHANNELS) {
58 LOG(error) <<
"Wrong dimentions of input histogram:" <<
h->GetNbinsX() <<
" instead of " << NCHANNELS;
62 for (
short i = 1;
i <= NCHANNELS;
i++) {
63 if (
h->GetBinContent(
i) < 0) {
64 LOG(error) <<
"pedestal sigma = " <<
h->GetBinContent(
i)
65 <<
" in channel " <<
i
66 <<
" cannot be less than 0";
69 mPedSigmas[
i - 1] = float(
h->GetBinContent(
i));
Class for time synchronization of RawReader instances.
bool setPedestals(TH1 *h)
Set pedestals from 1D histogram with cell absId in x axis.
bool setPedSigmas(TH1F *h)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"