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-2018 CERN for the benefit of the ATLAS collaboration
4*/
5
6#ifndef LARRECCONDITIONS_LARBADCHANNELCONT_H
7#define LARRECCONDITIONS_LARBADCHANNELCONT_H
8
9#include <vector>
10#include <algorithm>
14
26
27template<class LArBC_t>
29 public:
30 typedef uint32_t ChanId_t;
31 typedef std::pair<ChanId_t,LArBC_t> BadChanEntry;
32 typedef std::vector<BadChanEntry> BadChanVec;
33 typedef typename BadChanVec::const_iterator const_iterator;
34 typedef typename BadChanVec::size_type size_type;
35
36public:
37
39
41
44
49 void add(const HWIdentifier channel, const LArBC_t stat);
50
56 void sort();
57
63 LArBC_t status(const HWIdentifier channel) const;
64
70 LArBC_t offlineStatus(const Identifier id) const;
71
73 const_iterator begin() const {return m_cont.begin();}
74
76 const_iterator end() const {return m_cont.end();}
77
79 size_type size() const {return m_cont.size();}
80
82 void clear() {m_cont.clear(); m_oflCont.clear();}
83
84 const BadChanVec& fullCont() const {return m_cont;}
85
86 //Add offline vector
87 void setOflVec(BadChanVec& input);
88
89private:
91 struct ChannelLess {
92 bool operator()(const BadChanEntry& a, const BadChanEntry& b) const {
93 return a.first < b.first;
94 }
95 };
96
97 //The vector storing bad-channels
98 BadChanVec m_cont; //with their online id
99 BadChanVec m_oflCont; //with their offline id (only for channels, not FEBs)
100};
101
103
104
105
106//Template instantiation for LArBadChannel
108#include "AthenaKernel/CLASS_DEF.h"
110#include "AthenaKernel/CondCont.h"
112
113//Template instantiation for LArBadFeb
115CLASS_DEF(LArBadFebCont,60500160,1)
116CLASS_DEF(CondCont<LArBadFebCont>,18499682, 1)
117
118
119#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