Project
Loading...
Searching...
No Matches
PHOSBadMapCalibDevice.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_PHOSBADMAP_CALIBRATOR_H
13#define O2_CALIBRATION_PHOSBADMAP_CALIBRATOR_H
14
17
18#include "Framework/Task.h"
20#include "PHOSBase/Mapping.h"
22#include "TH1.h"
23
24using namespace o2::framework;
25
26namespace o2
27{
28namespace phos
29{
30
32{
33
34 public:
35 explicit PHOSBadMapCalibDevice(int mode) : mMode(mode){};
36
37 void init(o2::framework::InitContext& ic) final;
38
40
42
43 protected:
45 void calculateLimits(TH1F* h, float& mean, float& rms);
46 bool calculateBadMap();
47 void checkBadMap();
48
49 private:
50 int mMode = 0;
51 int mElowMin = 100;
52 int mElowMax = 1100;
53 int mEhighMin = 400;
54 int mEhighMax = 900;
55 int mStatistics = 100000;
56 static constexpr short kMinorChange = 10;
57 long mRunStartTime = 0;
58 long mValidityTime = 0;
59 std::unique_ptr<BadChannelsMap> mBadMap;
60 const BadChannelsMap* mOldBadMap = nullptr;
61 std::unique_ptr<TH1F> mMeanLow;
62 std::unique_ptr<TH1F> mMeanHigh;
63 std::unique_ptr<TH1F> mMeanTime;
64 std::unique_ptr<TH1F> mChi2;
65 std::unique_ptr<TH1F> mChi2norm;
66 std::unique_ptr<TH1F> mHGNorm;
67 std::unique_ptr<TH1F> mLGNorm;
68 std::unique_ptr<TH1F> mHGMean;
69 std::unique_ptr<TH1F> mLGMean;
70 std::unique_ptr<TH1F> mHGRMS;
71 std::unique_ptr<TH1F> mLGRMS;
72 std::array<short, o2::phos::Mapping::NCHANNELS + 1> mBadMapDiff;
73};
74
76} // namespace phos
77} // namespace o2
78
79#endif
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
Class for time synchronization of RawReader instances.
CCDB container for bad (masked) channels in PHOS.
void calculateLimits(TH1F *h, float &mean, float &rms)
void init(o2::framework::InitContext &ic) final
void sendOutput(DataAllocator &output)
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void run(o2::framework::ProcessingContext &pc) final
GLenum mode
Definition glcorearb.h:266
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
o2::framework::DataProcessorSpec getBadMapCalibSpec(int mode)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...