Project
Loading...
Searching...
No Matches
ChannelCalibrator.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
16
17#ifndef O2_MID_CHANNELCALIBRATOR_H
18#define O2_MID_CHANNELCALIBRATOR_H
19
20#include <array>
21#include <string>
22#include <vector>
23#include <gsl/span>
26
28
29namespace o2
30{
31namespace mid
32{
33
35{
37
38 public:
41 void fill(const gsl::span<const ColumnData> data);
42
45 void merge(const CalibData* prev);
46
48 void print();
49
51 const ChannelScalers& getScalers() { return mChannelScalers; }
52
53 private:
54 ChannelScalers mChannelScalers;
55
56 ClassDefNV(CalibData, 1);
57};
58
60{
61 using TFType = o2::calibration::TFType;
63
64 public:
66 void initOutput() final;
67
71 bool hasEnoughData(const Slot& slot) const final;
72
75 void finalizeSlot(Slot& slot) final;
76
81 Slot& emplaceNewSlot(bool front, TFType tstart, TFType tend) final;
82
85 void addTimeOrTriggers(double timeOrTriggers) { mTimeOrTriggers += timeOrTriggers; }
86
88 const std::vector<ColumnData>& getBadChannels() const { return mBadChannels; }
89
92 void setThreshold(double threshold) { mThreshold = threshold; }
93
94 private:
95 std::vector<ColumnData> mBadChannels{};
96 double mThreshold = 0.9;
97 double mTimeOrTriggers = 0;
98
99 ClassDefOverride(ChannelCalibrator, 1);
100};
101} // namespace mid
102} // namespace o2
103
104#endif
MID channel scalers.
const ChannelScalers & getScalers()
Gets the channel scalers.
void fill(const gsl::span< const ColumnData > data)
void merge(const CalibData *prev)
void print()
Prints scalers.
Slot & emplaceNewSlot(bool front, TFType tstart, TFType tend) final
void initOutput() final
Initialize the output.
void finalizeSlot(Slot &slot) final
bool hasEnoughData(const Slot &slot) const final
void setThreshold(double threshold)
const std::vector< ColumnData > & getBadChannels() const
Returns the bad channels.
void addTimeOrTriggers(double timeOrTriggers)
GLboolean * data
Definition glcorearb.h:298
uint32_t TFType
Definition TimeSlot.h:29
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...