Project
Loading...
Searching...
No Matches
DeadChannelMap.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_FIT_DEADCHANNELMAP_H
18#define O2_FIT_DEADCHANNELMAP_H
19
20#include <cstdint>
21#include <unordered_map>
22
23namespace o2
24{
25namespace fit
26{
27
30 std::unordered_map<uint8_t, bool> map;
31
32 void setChannelAlive(const uint8_t& chId, const bool isAlive)
33 {
34 map[chId] = isAlive;
35 }
36
37 const bool isChannelAlive(const uint8_t& chId) const
38 {
39 return map.at(chId);
40 }
41
42 void clear()
43 {
44 map.clear();
45 }
46
48};
49
50} // namespace fit
51} // namespace o2
52
53#endif // O2_FIT_DEADCHANNELMAP_H
TFitResultPtr fit(const size_t nBins, const T *arr, const T xMin, const T xMax, TF1 &func, std::string_view option="")
Definition fit.h:59
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::unordered_map< uint8_t, bool > map
Dead channel map as 'channel id - state' pairs. true = alive, false = dead.
const bool isChannelAlive(const uint8_t &chId) const
ClassDefNV(DeadChannelMap, 1)
void setChannelAlive(const uint8_t &chId, const bool isAlive)