CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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();
71  DTDeadFlag(DTDeadFlag const&) = delete;
72  DTDeadFlag& operator=(DTDeadFlag const&) = delete;
74 
77  ~DTDeadFlag();
78 
81  int cellStatus(int wheelId,
83  int stationId,
84  int sectorId,
85  int slId,
86  int layerId,
87  int cellId,
88  bool& dead_HV,
89  bool& dead_TP,
90  bool& dead_RO,
91  bool& discCat) const {
92  return get(wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat);
93  };
94  int cellStatus(const DTWireId& id, bool& dead_HV, bool& dead_TP, bool& dead_RO, bool& discCat) const {
95  return get(id, dead_HV, dead_TP, dead_RO, discCat);
96  };
97  int get(int wheelId,
98  int stationId,
99  int sectorId,
100  int slId,
101  int layerId,
102  int cellId,
103  bool& dead_HV,
104  bool& dead_TP,
105  bool& dead_RO,
106  bool& discCat) const;
107  int get(const DTWireId& id, bool& dead_HV, bool& dead_TP, bool& dead_RO, bool& discCat) const;
108 
109  bool getCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const;
110  bool getCellDead_HV(const DTWireId& id) const;
111 
112  bool getCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const;
113  bool getCellDead_TP(const DTWireId& id) const;
114 
115  bool getCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const;
116  bool getCellDead_RO(const DTWireId& id) const;
117 
118  bool getCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const;
119  bool getCellDiscCat(const DTWireId& id) const;
120 
122  const std::string& version() const;
123  std::string& version();
124 
126  void clear();
127 
128  int setCellStatus(int wheelId,
129  int stationId,
130  int sectorId,
131  int slId,
132  int layerId,
133  int cellId,
134  bool dead_HV,
135  bool dead_TP,
136  bool dead_RO,
137  bool discCat) {
138  return set(wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat);
139  };
140  int setCellStatus(const DTWireId& id, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat) {
141  return set(id, dead_HV, dead_TP, dead_RO, discCat);
142  };
143 
144  int set(int wheelId,
145  int stationId,
146  int sectorId,
147  int slId,
148  int layerId,
149  int cellId,
150  bool dead_HV,
151  bool dead_TP,
152  bool dead_RO,
153  bool discCat);
154  int set(const DTWireId& id, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat);
155 
156  int setCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
157  int setCellDead_HV(const DTWireId& id, bool flag);
158 
159  int setCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
160  int setCellDead_TP(const DTWireId& id, bool flag);
161 
162  int setCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
163  int setCellDead_RO(const DTWireId& id, bool flag);
164 
165  int setCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
166  int setCellDiscCat(const DTWireId& id, bool flag);
167 
169  typedef std::vector<std::pair<DTDeadFlagId, DTDeadFlagData> >::const_iterator const_iterator;
170  const_iterator begin() const;
171  const_iterator end() const;
172 
173  void initialize();
174 
175 private:
177 
178  std::vector<std::pair<DTDeadFlagId, DTDeadFlagData> > dataList;
179 
181 
183  std::string mapName() const;
184 
186 };
187 
188 #endif // DTDeadFlag_H
std::vector< std::pair< DTDeadFlagId, DTDeadFlagData > > dataList
Definition: DTDeadFlag.h:178
bool getCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:126
int setCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:204
uint16_t *__restrict__ id
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
DTDeadFlag & operator=(DTDeadFlag const &)=delete
const_iterator begin() const
Definition: DTDeadFlag.cc:260
bool getCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:100
std::vector< std::pair< DTDeadFlagId, DTDeadFlagData > >::const_iterator const_iterator
Access methods to data.
Definition: DTDeadFlag.h:169
int setCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:232
const_iterator end() const
Definition: DTDeadFlag.cc:262
std::string mapName() const
read and store full content
Definition: DTDeadFlag.cc:264
int setCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:246
const std::string & version() const
access version
Definition: DTDeadFlag.cc:139
bool getCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:87
int setCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:218
std::string dataVersion
Definition: DTDeadFlag.h:176
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTDeadFlag.h:180
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:128
#define COND_TRANSIENT
Definition: Serializable.h:63
int setCellStatus(const DTWireId &id, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat)
Definition: DTDeadFlag.h:140
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:82
int cellStatus(const DTWireId &id, bool &dead_HV, bool &dead_TP, bool &dead_RO, bool &discCat) const
Definition: DTDeadFlag.h:94
#define COND_SERIALIZABLE
Definition: Serializable.h:39
void initialize()
Definition: DTDeadFlag.cc:270
bool getCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:113
void clear()
reset content
Definition: DTDeadFlag.cc:143