ATLAS Offline Software
LArBadFebBitPacking.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 LArBadFebBitPacking_H
6 #define LArBadFebBitPacking_H
7 
10 #include <string>
11 #include <vector>
12 #include <map>
13 
14 class LArBadFeb;
15 
17  public:
18 
19  typedef std::vector<PosType> PosContainer;
20 
22 
23  const std::string& stringName( ProblemType pb) const;
24 
25  std::pair<bool, ProblemType> enumName( const std::string& str) const;
26 
28 
29  PosType wordSize() const {return sizeof(BitWord);}
30 
31  void setBit( ProblemType pb, BitWord& word, bool value=true) const;
32  void setBit( ProblemType pb, LArBadFeb& word, bool value=true) const;
33 
34  bool setBit( const std::string& name, BitWord& word, bool value=true) const;
35  bool setBit( const std::string& name, LArBadFeb& word, bool value=true) const;
36 
37  std::string stringStatus( const LArBadFeb& bc) const;
38 
39  int numberOfProblemTypes() const { return m_nameVec.size();}
40 
41  private:
42 
43  std::vector<int> m_index;
44 
45  std::vector< ProblemType> m_enumVec;
46  std::vector<std::string> m_nameVec;
47  std::map<std::string, ProblemType> m_nameMap;
48 
49  void addBit( ProblemType pb, const std::string& name);
50  int index( ProblemType pb) const {return m_index[pb];}
51 
52 };
53 
54 #endif
55 
LArBadFebEnum
Definition: LArBadFebEnum.h:8
LArBadFebEnum::PosType
unsigned int PosType
Definition: LArBadFebEnum.h:12
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
LArBadFebBitPacking::m_index
std::vector< int > m_index
Definition: LArBadFebBitPacking.h:43
LArBadFebBitPacking::m_nameVec
std::vector< std::string > m_nameVec
Definition: LArBadFebBitPacking.h:46
LArBadFebBitPacking::bitPosition
PosType bitPosition(ProblemType pb) const
Definition: LArBadFebBitPacking.h:27
LArBadFebBitPacking::addBit
void addBit(ProblemType pb, const std::string &name)
Definition: LArBadFebBitPacking.cxx:36
LArBadFebBitPacking::m_enumVec
std::vector< ProblemType > m_enumVec
Definition: LArBadFebBitPacking.h:45
athena.value
value
Definition: athena.py:124
LArBadFebEnum::BitWord
unsigned int BitWord
Definition: LArBadFebEnum.h:13
LArBadFebBitPacking::wordSize
PosType wordSize() const
Definition: LArBadFebBitPacking.h:29
LArBadFeb.h
LArBadFebBitPacking::stringName
const std::string & stringName(ProblemType pb) const
Definition: LArBadFebBitPacking.cxx:44
LArBadFebBitPacking::setBit
void setBit(ProblemType pb, BitWord &word, bool value=true) const
Definition: LArBadFebBitPacking.cxx:58
LArBadFebBitPacking::LArBadFebBitPacking
LArBadFebBitPacking()
Definition: LArBadFebBitPacking.cxx:8
LArBadFebBitPacking::enumName
std::pair< bool, ProblemType > enumName(const std::string &str) const
Definition: LArBadFebBitPacking.cxx:50
LArBadFebBitPacking::m_nameMap
std::map< std::string, ProblemType > m_nameMap
Definition: LArBadFebBitPacking.h:47
LArBadFeb::bitPosition
static PosType bitPosition(ProblemType pb)
Definition: LArBadFeb.h:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LArBadFeb
Definition: LArBadFeb.h:10
LArBadFebEnum::ProblemType
ProblemType
Definition: LArBadFebEnum.h:15
LArBadFebBitPacking
Definition: LArBadFebBitPacking.h:16
LArBadFebBitPacking::numberOfProblemTypes
int numberOfProblemTypes() const
Definition: LArBadFebBitPacking.h:39
LArBadFebBitPacking::PosContainer
std::vector< PosType > PosContainer
Definition: LArBadFebBitPacking.h:19
LArBadFebBitPacking::stringStatus
std::string stringStatus(const LArBadFeb &bc) const
Definition: LArBadFebBitPacking.cxx:86
str
Definition: BTagTrackIpAccessor.cxx:11
LArBadFebEnum.h
LArBadFebBitPacking::index
int index(ProblemType pb) const
Definition: LArBadFebBitPacking.h:50