ATLAS Offline Software
Loading...
Searching...
No Matches
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
14class 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
std::map< std::string, ProblemType > m_nameMap
std::vector< int > m_index
std::vector< PosType > PosContainer
std::vector< std::string > m_nameVec
std::vector< ProblemType > m_enumVec
const std::string & stringName(ProblemType pb) const
PosType bitPosition(ProblemType pb) const
int index(ProblemType pb) const
std::pair< bool, ProblemType > enumName(const std::string &str) const
void setBit(ProblemType pb, BitWord &word, bool value=true) const
std::string stringStatus(const LArBadFeb &bc) const
void addBit(ProblemType pb, const std::string &name)
unsigned int PosType
unsigned int BitWord
static PosType bitPosition(ProblemType pb)
Definition LArBadFeb.h:43