ATLAS Offline Software
LArBadChanContainerHashed.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LArBadChanContainerHashed_H
6 #define LArBadChanContainerHashed_H
7 
12 
14 public:
15 
16  typedef std::pair<HWIdentifier,LArBadChannel> BadChanEntry;
17  typedef std::pair<HWIdentifier,LArBadFeb> BadFebEntry;
18  typedef std::vector<BadChanEntry> BadChanVec;
19  typedef BadChanVec::const_iterator const_iterator;
20  typedef BadChanVec::size_type size_type;
21 
22 public:
23 
25 
27 
29 
30  LArBadChannel status( const HWIdentifier& channelID) const {
31  return m_febVec.at( m_hasher.febHashByChan( channelID)).status( m_hasher.channelInFeb( channelID));
32  }
33 
34  LArBadChannel status( const HWIdentifier& feb, int ch) const {
35  return m_febVec.at( m_hasher.hashFEB( feb)).status( ch);
36  }
37 
38  bool febBad( HWIdentifier febId) const {
39  return m_febVec.at( m_hasher.hashFEB( febId)).bad();
40  }
41 
42  bool febAllGood( HWIdentifier febId) const {
43  return m_febVec.at( m_hasher.hashFEB( febId)).empty();
44  }
45 
47  return m_febVec.at( m_hasher.hashFEB( febId)).febStatus();
48  }
49 
50  const_iterator begin() const {return m_bcv.begin();}
51  const_iterator end() const {return m_bcv.end();}
52  size_type size() const {return m_bcv.size();}
53 
54  void set( const BadChanVec& cont);
55 
56  void setBadFEBs( const std::vector<BadFebEntry>& badFebs);
57 
58  void setHasher( const LArBadChanFEBHasher& hasher) { m_hasher = hasher;}
59 
60 private:
61 
62  typedef unsigned int HashType;
63 
64  std::vector<LArBadChanFebState> m_febVec;
67 
68  void init();
69 
70 };
71 
72 #endif
LArBadChanContainerHashed::LArBadChanContainerHashed
LArBadChanContainerHashed()
Definition: LArBadChanContainerHashed.h:24
LArBadChanContainerHashed::febBad
bool febBad(HWIdentifier febId) const
Definition: LArBadChanContainerHashed.h:38
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
LArBadChanContainerHashed::LArBadChanContainerHashed
LArBadChanContainerHashed(const LArBadChanFEBHasher &h)
Definition: LArBadChanContainerHashed.h:26
LArBadChanContainerHashed::init
void init()
Definition: LArBadChanContainerHashed.cxx:22
LArBadChanContainerHashed::status
LArBadChannel status(const HWIdentifier &channelID) const
Definition: LArBadChanContainerHashed.h:30
LArBadChanFEBHasher
Definition: LArBadChanFEBHasher.h:10
LArBadChanContainerHashed::end
const_iterator end() const
Definition: LArBadChanContainerHashed.h:51
LArBadChannel.h
LArBadChanContainerHashed::febStatus
LArBadFeb febStatus(HWIdentifier febId) const
Definition: LArBadChanContainerHashed.h:46
LArBadChanContainerHashed::begin
const_iterator begin() const
Definition: LArBadChanContainerHashed.h:50
LArBadChanContainerHashed::size
size_type size() const
Definition: LArBadChanContainerHashed.h:52
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
HWIdentifier
Definition: HWIdentifier.h:13
LArBadChanContainerHashed::febAllGood
bool febAllGood(HWIdentifier febId) const
Definition: LArBadChanContainerHashed.h:42
LArBadChanContainerHashed::status
LArBadChannel status(const HWIdentifier &feb, int ch) const
Definition: LArBadChanContainerHashed.h:34
LArBadChanContainerHashed::LArBadChanContainerHashed
LArBadChanContainerHashed(const BadChanVec &vec)
Definition: LArBadChanContainerHashed.h:28
LArBadFeb.h
LArBadChanContainerHashed::setHasher
void setHasher(const LArBadChanFEBHasher &hasher)
Definition: LArBadChanContainerHashed.h:58
LArBadChannel
Definition: LArBadChannel.h:10
LArBadChanContainerHashed::size_type
BadChanVec::size_type size_type
Definition: LArBadChanContainerHashed.h:20
LArBadChanContainerHashed::HashType
unsigned int HashType
Definition: LArBadChanContainerHashed.h:62
LArBadChanContainerHashed::m_febVec
std::vector< LArBadChanFebState > m_febVec
Definition: LArBadChanContainerHashed.h:64
LArBadChanContainerHashed::const_iterator
BadChanVec::const_iterator const_iterator
Definition: LArBadChanContainerHashed.h:19
LArBadChanContainerHashed::set
void set(const BadChanVec &cont)
Definition: LArBadChanContainerHashed.cxx:7
LArBadFeb
Definition: LArBadFeb.h:10
LArBadChanFEBHasher.h
LArBadChanFEBHasher::hashFEB
unsigned int hashFEB(const HWIdentifier &FEBid) const
Definition: LArBadChanFEBHasher.h:41
LArBadChanContainerHashed::m_hasher
LArBadChanFEBHasher m_hasher
Definition: LArBadChanContainerHashed.h:65
h
LArBadChanContainerHashed::BadChanEntry
std::pair< HWIdentifier, LArBadChannel > BadChanEntry
Definition: LArBadChanContainerHashed.h:16
LArBadChanContainerHashed::BadFebEntry
std::pair< HWIdentifier, LArBadFeb > BadFebEntry
Definition: LArBadChanContainerHashed.h:17
LArBadChanContainerHashed::setBadFEBs
void setBadFEBs(const std::vector< BadFebEntry > &badFebs)
Definition: LArBadChanContainerHashed.cxx:30
LArBadChanFebState.h
LArBadChanContainerHashed::m_bcv
BadChanVec m_bcv
Definition: LArBadChanContainerHashed.h:66
LArBadChanFEBHasher::channelInFeb
unsigned int channelInFeb(const HWIdentifier &chanID) const
Definition: LArBadChanFEBHasher.h:49
LArBadChanContainerHashed::BadChanVec
std::vector< BadChanEntry > BadChanVec
Definition: LArBadChanContainerHashed.h:18
LArBadChanContainerHashed
Definition: LArBadChanContainerHashed.h:13
LArBadChanFEBHasher::febHashByChan
unsigned int febHashByChan(const HWIdentifier &chanID) const
Definition: LArBadChanFEBHasher.h:45