Project
Loading...
Searching...
No Matches
NoiseParam.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
12#include <TH1.h>
13#include <TFile.h>
14#include <TDirectory.h>
15#include "Framework/Logger.h"
17
18using namespace o2::zdc;
19
20void NoiseParam::setCalib(uint32_t ich, float val)
21{
22 if (ich >= NChannels) {
23 LOG(fatal) << __func__ << " channel " << ich << " not in allowed range";
24 return;
25 }
26 noise[ich] = val;
27}
28
29float NoiseParam::getCalib(uint32_t ich) const
30{
31 if (ich < NChannels) {
32 return noise[ich];
33 } else {
34 LOG(fatal) << __func__ << " channel " << ich << " not in allowed range";
35 return 0;
36 }
37}
38
40{
41 for (Int_t ich = 0; ich < NChannels; ich++) {
42 LOG(info) << ChannelNames[ich] << " Noise = " << noise[ich];
43 }
44}
Noise calibration data.
GLuint GLfloat * val
Definition glcorearb.h:1582
constexpr int NChannels
Definition Constants.h:65
constexpr std::string_view ChannelNames[]
Definition Constants.h:147
float getCalib(uint32_t ich) const
float noise[NChannels]
Definition NoiseParam.h:30
void setCalib(uint32_t ich, float val)
void print() const
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"