CMS 3D CMS Logo

DTDeadFlag.h
Go to the documentation of this file.
1 #ifndef DTDeadFlag_H
2 #define DTDeadFlag_H
3 
12 //----------------------
13 // Base Class Headers --
14 //----------------------
15 
16 //------------------------------------
17 // Collaborating Class Declarations --
18 //------------------------------------
20 
23 
24 //---------------
25 // C++ Headers --
26 //---------------
27 #include <string>
28 #include <vector>
29 #include <utility>
30 
31 template <class Key, class Content>
32 class DTBufferTree;
33 
34 // ---------------------
35 // -- Class Interface --
36 // ---------------------
37 
38 class DTDeadFlagId {
39 public:
40  DTDeadFlagId();
41  ~DTDeadFlagId();
42 
43  int wheelId;
44  int stationId;
45  int sectorId;
46  int slId;
47  int layerId;
48  int cellId;
49 
51 };
52 
54 public:
57 
58  bool dead_HV;
59  bool dead_TP;
60  bool dead_RO;
61  bool discCat;
62 
64 };
65 
66 class DTDeadFlag {
67 public:
70  DTDeadFlag();
72 
75  ~DTDeadFlag();
76 
79  int cellStatus(int wheelId,
81  int stationId,
82  int sectorId,
83  int slId,
84  int layerId,
85  int cellId,
86  bool& dead_HV,
87  bool& dead_TP,
88  bool& dead_RO,
89  bool& discCat) const {
90  return get(wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat);
91  };
92  int cellStatus(const DTWireId& id, bool& dead_HV, bool& dead_TP, bool& dead_RO, bool& discCat) const {
93  return get(id, dead_HV, dead_TP, dead_RO, discCat);
94  };
95  int get(int wheelId,
96  int stationId,
97  int sectorId,
98  int slId,
99  int layerId,
100  int cellId,
101  bool& dead_HV,
102  bool& dead_TP,
103  bool& dead_RO,
104  bool& discCat) const;
105  int get(const DTWireId& id, bool& dead_HV, bool& dead_TP, bool& dead_RO, bool& discCat) const;
106 
107  bool getCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const;
108  bool getCellDead_HV(const DTWireId& id) const;
109 
110  bool getCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const;
111  bool getCellDead_TP(const DTWireId& id) const;
112 
113  bool getCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const;
114  bool getCellDead_RO(const DTWireId& id) const;
115 
116  bool getCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const;
117  bool getCellDiscCat(const DTWireId& id) const;
118 
120  const std::string& version() const;
121  std::string& version();
122 
124  void clear();
125 
126  int setCellStatus(int wheelId,
127  int stationId,
128  int sectorId,
129  int slId,
130  int layerId,
131  int cellId,
132  bool dead_HV,
133  bool dead_TP,
134  bool dead_RO,
135  bool discCat) {
136  return set(wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat);
137  };
138  int setCellStatus(const DTWireId& id, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat) {
139  return set(id, dead_HV, dead_TP, dead_RO, discCat);
140  };
141 
142  int set(int wheelId,
143  int stationId,
144  int sectorId,
145  int slId,
146  int layerId,
147  int cellId,
148  bool dead_HV,
149  bool dead_TP,
150  bool dead_RO,
151  bool discCat);
152  int set(const DTWireId& id, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat);
153 
154  int setCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
155  int setCellDead_HV(const DTWireId& id, bool flag);
156 
157  int setCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
158  int setCellDead_TP(const DTWireId& id, bool flag);
159 
160  int setCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
161  int setCellDead_RO(const DTWireId& id, bool flag);
162 
163  int setCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
164  int setCellDiscCat(const DTWireId& id, bool flag);
165 
167  typedef std::vector<std::pair<DTDeadFlagId, DTDeadFlagData> >::const_iterator const_iterator;
168  const_iterator begin() const;
169  const_iterator end() const;
170 
171  void initialize();
172 
173 private:
174  DTDeadFlag(DTDeadFlag const&) = delete;
175  DTDeadFlag& operator=(DTDeadFlag const&) = delete;
176 
178 
179  std::vector<std::pair<DTDeadFlagId, DTDeadFlagData> > dataList;
180 
182 
184  std::string mapName() const;
185 
187 };
188 
189 #endif // DTDeadFlag_H
DTDeadFlag::dataVersion
std::string dataVersion
Definition: DTDeadFlag.h:177
DTDeadFlag::get
int get(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool &dead_HV, bool &dead_TP, bool &dead_RO, bool &discCat) const
Definition: DTDeadFlag.cc:49
DTDeadFlag::getCellDead_TP
bool getCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:100
ConstRespectingPtr.h
DTDeadFlag
Definition: DTDeadFlag.h:66
DTDeadFlag::begin
const_iterator begin() const
Definition: DTDeadFlag.cc:260
DTDeadFlagData
Definition: DTDeadFlag.h:53
DTDeadFlagData::dead_TP
bool dead_TP
Definition: DTDeadFlag.h:59
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
COND_TRANSIENT
#define COND_TRANSIENT
Definition: Serializable.h:63
DTDeadFlagId::wheelId
int wheelId
Definition: DTDeadFlag.h:43
DTDeadFlagData::~DTDeadFlagData
~DTDeadFlagData()
Definition: DTDeadFlag.cc:44
DTDeadFlag::setCellDiscCat
int setCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:246
DTDeadFlag::clear
void clear()
reset content
Definition: DTDeadFlag.cc:143
DTDeadFlag::dBuf
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTDeadFlag.h:181
DTDeadFlagId::DTDeadFlagId
DTDeadFlagId()
Definition: DTDeadFlag.cc:33
DTDeadFlag::cellStatus
int cellStatus(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool &dead_HV, bool &dead_TP, bool &dead_RO, bool &discCat) const
get content
Definition: DTDeadFlag.h:80
DTDeadFlagId::stationId
int stationId
Definition: DTDeadFlag.h:44
DTDeadFlag::getCellDead_RO
bool getCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:113
DTDeadFlag::setCellDead_TP
int setCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:218
DTDeadFlag::set
int set(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat)
Definition: DTDeadFlag.cc:149
DTWireId
Definition: DTWireId.h:12
DTDeadFlagData::dead_HV
bool dead_HV
Definition: DTDeadFlag.h:58
DTDeadFlag::getCellDiscCat
bool getCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:126
DTDeadFlag::~DTDeadFlag
~DTDeadFlag()
Definition: DTDeadFlag.cc:40
DTDeadFlag::setCellDead_HV
int setCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:204
DTDeadFlag::cellStatus
int cellStatus(const DTWireId &id, bool &dead_HV, bool &dead_TP, bool &dead_RO, bool &discCat) const
Definition: DTDeadFlag.h:92
DTDeadFlagId
Definition: DTDeadFlag.h:38
DTDeadFlagId::slId
int slId
Definition: DTDeadFlag.h:46
DTDeadFlag::initialize
void initialize()
Definition: DTDeadFlag.cc:270
DTDeadFlag::end
const_iterator end() const
Definition: DTDeadFlag.cc:262
DTDeadFlag::operator=
DTDeadFlag & operator=(DTDeadFlag const &)=delete
DTDeadFlag::DTDeadFlag
DTDeadFlag()
Definition: DTDeadFlag.cc:27
Serializable.h
DTDeadFlagData::discCat
bool discCat
Definition: DTDeadFlag.h:61
DTDeadFlagId::~DTDeadFlagId
~DTDeadFlagId()
Definition: DTDeadFlag.cc:42
DTBufferTree
Definition: DTBufferTree.h:42
DTDeadFlag::getCellDead_HV
bool getCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:87
DTDeadFlag::const_iterator
std::vector< std::pair< DTDeadFlagId, DTDeadFlagData > >::const_iterator const_iterator
Access methods to data.
Definition: DTDeadFlag.h:167
edm::ConstRespectingPtr
Definition: ConstRespectingPtr.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTDeadFlag::dataList
std::vector< std::pair< DTDeadFlagId, DTDeadFlagData > > dataList
Definition: DTDeadFlag.h:179
DTWireId.h
DTDeadFlagData::DTDeadFlagData
DTDeadFlagData()
Definition: DTDeadFlag.cc:35
DTDeadFlagId::sectorId
int sectorId
Definition: DTDeadFlag.h:45
DTDeadFlag::version
const std::string & version() const
access version
Definition: DTDeadFlag.cc:139
DTDeadFlagId::layerId
int layerId
Definition: DTDeadFlag.h:47
DTDeadFlagData::dead_RO
bool dead_RO
Definition: DTDeadFlag.h:60
DTDeadFlag::setCellStatus
int setCellStatus(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat)
Definition: DTDeadFlag.h:126
DTDeadFlag::setCellStatus
int setCellStatus(const DTWireId &id, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat)
Definition: DTDeadFlag.h:138
DTDeadFlag::mapName
std::string mapName() const
read and store full content
Definition: DTDeadFlag.cc:264
DTDeadFlagId::cellId
int cellId
Definition: DTDeadFlag.h:48
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
DTDeadFlag::setCellDead_RO
int setCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:232