13#include <fairlogger/Logger.h>
18Pedestals::Pedestals(
int )
21 mHGPedestals.fill(40);
22 mLGPedestals.fill(35);
33 if (
h->GetNbinsX() != NCHANNELS + OFFSET) {
34 LOG(
error) <<
"Wrong dimentions of input histogram:" <<
h->GetNbinsX() <<
" instead of " << NCHANNELS + OFFSET;
38 for (
short i = 0;
i < NCHANNELS;
i++) {
39 if (
h->GetBinContent(
i + OFFSET) > 255) {
40 LOG(
error) <<
"pedestal value too large:" <<
h->GetBinContent(
i + OFFSET) <<
"can not be stored in char";
43 mHGPedestals[
i] =
static_cast<unsigned char>(
h->GetBinContent(
i + OFFSET));
55 if (
h->GetNbinsX() != NCHANNELS + OFFSET) {
56 LOG(
error) <<
"Wrong dimentions of input histogram:" <<
h->GetNbinsX() <<
" instead of " << NCHANNELS + OFFSET;
60 for (
short i = 0;
i < NCHANNELS;
i++) {
61 if (
h->GetBinContent(
i + OFFSET) > 255) {
62 LOG(
error) <<
"pedestal value too large:" <<
h->GetBinContent(
i + OFFSET) <<
"can not be stored in char";
65 mLGPedestals[
i] =
static_cast<unsigned char>(
h->GetBinContent(
i + OFFSET));
char error[CURL_ERROR_SIZE]
Class for time synchronization of RawReader instances.
bool setLGPedestals(TH1 *h)
Set pedestals from 1D histogram with cell absId in x axis.
bool setHGPedestals(TH1 *h)
Set pedestals from 1D histogram with cell absId in x axis.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"