ATLAS Offline Software
Loading...
Searching...
No Matches
LArBadChannelCont.h
Go to the documentation of this file.
1//Dear emacs, this is -*-c++-*-
2/*
3 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4*/
5
6#ifndef LARRECCONDITIONS_LARBADCHANNELCONT_H
7#define LARRECCONDITIONS_LARBADCHANNELCONT_H
8
9
13#include <vector>
14#include <algorithm>
15#include <cstdint> //for uint32_t
27
28template<class LArBC_t>
30 public:
31 typedef uint32_t ChanId_t;
32 typedef std::pair<ChanId_t,LArBC_t> BadChanEntry;
33 typedef std::vector<BadChanEntry> BadChanVec;
34 typedef typename BadChanVec::const_iterator const_iterator;
35 typedef typename BadChanVec::size_type size_type;
36
37public:
38
40
42
45
50 void add(const HWIdentifier channel, const LArBC_t stat);
51
57 void sort();
58
64 LArBC_t status(const HWIdentifier channel) const;
65
71 LArBC_t offlineStatus(const Identifier id) const;
72
74 const_iterator begin() const {return m_cont.begin();}
75
77 const_iterator end() const {return m_cont.end();}
78
80 size_type size() const {return m_cont.size();}
81
83 void clear() {m_cont.clear(); m_oflCont.clear();}
84
85 const BadChanVec& fullCont() const {return m_cont;}
86
87 //Add offline vector
88 void setOflVec(BadChanVec& input);
89
90private:
92 struct ChannelLess {
93 bool operator()(const BadChanEntry& a, const BadChanEntry& b) const {
94 return a.first < b.first;
95 }
96 };
97
98 //The vector storing bad-channels
99 BadChanVec m_cont; //with their online id
100 BadChanVec m_oflCont; //with their offline id (only for channels, not FEBs)
101};
102
104
105
106
107//Template instantiation for LArBadChannel
109#include "AthenaKernel/CLASS_DEF.h"
111#include "AthenaKernel/CondCont.h"
113
114//Template instantiation for LArBadFeb
116CLASS_DEF(LArBadFebCont,60500160,1)
117CLASS_DEF(CondCont<LArBadFebCont>,18499682, 1)
118
119
120#endif
std::vector< size_t > vec
#define CONDCONT_MIXED_DEF(...)
Definition CondCont.h:1446
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
LArBadXCont< LArBadFeb > LArBadFebCont
LArBadXCont< LArBadChannel > LArBadChannelCont
static Double_t a
Hold mapping of ranges to condition objects.
Definition CondCont.h:889
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
const_iterator end() const
Access to the end iterator of the underlying vector.
void add(const HWIdentifier channel, const LArBC_t stat)
Add a channel/FEB to the list of bad channels.
size_type size() const
Number of known bad channels.
BadChanVec::size_type size_type
LArBC_t offlineStatus(const Identifier id) const
Query the status of a particular channel by offline ID This is the main client access method.
const_iterator begin() const
Access to the begin iterator of the underlying vector.
std::vector< BadChanEntry > BadChanVec
BadChanVec::const_iterator const_iterator
LArBadXCont()
Default Constructor.
void clear()
Deletes the contents and sets size to 0 (same as stl::vector<T>::clear())
const BadChanVec & fullCont() const
std::pair< ChanId_t, LArBC_t > BadChanEntry
LArBadXCont(const BadChanVec &vec)
Constructor with payload.
void setOflVec(BadChanVec &input)
void sort()
Sort and purge the list of bad channels The list of bad channels get sorted by channel-ID For channel...
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
Comparison functor for sorting and searching.
bool operator()(const BadChanEntry &a, const BadChanEntry &b) const