Project
Loading...
Searching...
No Matches
CPVGainCalibDevice.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_CPVGAINS_CALIBRATOR_H
13#define O2_CALIBRATION_CPVGAINS_CALIBRATOR_H
14
17
18#include "Framework/Task.h"
21#include "CPVBase/Geometry.h"
22#include "TH2.h"
23#include <string>
24
25using namespace o2::framework;
26
27namespace o2
28{
29namespace cpv
30{
31
33{
34
35 public:
36 explicit CPVGainCalibDevice(bool useCCDB, bool forceUpdate, std::string path) : mUseCCDB(useCCDB), mForceUpdate(forceUpdate), mPath(path) {}
37 void init(o2::framework::InitContext& ic) final;
38
40
42
43 protected:
45 void calculateGains();
46 void checkGains();
47
48 private:
49 static constexpr int kMinimalStatistics = 150;
50
51 bool mUseCCDB = false;
52 bool mForceUpdate = false;
53 bool mUpdateCCDB = true;
54
55 std::string mPath{"./"};
56 std::unique_ptr<CalibParams> mCalibParams;
57 std::unique_ptr<TH2F> mMean;
58 std::array<short, o2::cpv::Geometry::kNCHANNELS> mGainRatio;
59};
60
61o2::framework::DataProcessorSpec getGainCalibSpec(bool useCCDB, bool forceUpdate, std::string path);
62
63} // namespace cpv
64} // namespace o2
65
66#endif
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void sendOutput(DataAllocator &output)
CPVGainCalibDevice(bool useCCDB, bool forceUpdate, std::string path)
void run(o2::framework::ProcessingContext &pc) final
void init(o2::framework::InitContext &ic) final
GLsizei const GLchar *const * path
Definition glcorearb.h:3591
o2::framework::DataProcessorSpec getGainCalibSpec(bool useCCDB, bool forceUpdate, std::string path)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...