Project
Loading...
Searching...
No Matches
PHOSPedestalCalibDevice.h
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#ifndef O2_CALIBRATION_PHOSPEDESTALS_CALIBRATOR_H
13#define O2_CALIBRATION_PHOSPEDESTALS_CALIBRATOR_H
14
17
18#include "Framework/Task.h"
20#include "PHOSBase/Mapping.h"
22#include "TH2.h"
23
24using namespace o2::framework;
25
26namespace o2
27{
28namespace phos
29{
30
32{
33
34 public:
35 explicit PHOSPedestalCalibDevice(bool useCCDB, bool forceUpdate) : mUseCCDB(useCCDB), mForceUpdate(forceUpdate) {}
36
37 void init(o2::framework::InitContext& ic) final;
38
40
42
43 protected:
45 // void evaluateMeans
46 void calculatePedestals();
47 void checkPedestals();
48
49 private:
50 bool mUseCCDB = false;
51 bool mForceUpdate = false;
52 bool mUpdateCCDB = true;
53 static constexpr short kMinorChange = 10;
54 long mRunStartTime = 0;
55 int mStatistics = 1000;
56 std::unique_ptr<Pedestals> mPedestals;
57 std::unique_ptr<const Pedestals> mOldPed;
58 std::unique_ptr<TH2F> mMeanHG;
59 std::unique_ptr<TH2F> mMeanLG;
60 std::unique_ptr<TH2F> mRMSHG;
61 std::unique_ptr<TH2F> mRMSLG;
62 std::array<short, 2 * o2::phos::Mapping::NCHANNELS + 1> mPedDiff;
63};
64
65o2::framework::DataProcessorSpec getPedestalCalibSpec(bool useCCDB, bool forceUpdate);
66} // namespace phos
67} // namespace o2
68
69#endif
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
void run(o2::framework::ProcessingContext &pc) final
PHOSPedestalCalibDevice(bool useCCDB, bool forceUpdate)
void init(o2::framework::InitContext &ic) final
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
o2::framework::DataProcessorSpec getPedestalCalibSpec(bool useCCDB, bool forceUpdate)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...