CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 //------------------------------------
18 // Collaborating Class Declarations --
19 //------------------------------------
21 
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 #include <string>
29 #include <vector>
30 #include <utility>
31 
32 template <class Key, class Content> class DTBufferTree;
33 
34 // ---------------------
35 // -- Class Interface --
36 // ---------------------
37 
38 class DTDeadFlagId {
39 
40  public:
41 
42  DTDeadFlagId();
43  ~DTDeadFlagId();
44 
45  int wheelId;
46  int stationId;
47  int sectorId;
48  int slId;
49  int layerId;
50  int cellId;
51 
52 
54 };
55 
56 
58 
59  public:
60 
63 
64  bool dead_HV;
65  bool dead_TP;
66  bool dead_RO;
67  bool discCat;
68 
69 
71 };
72 
73 
74 class DTDeadFlag {
75 
76  public:
77 
80  DTDeadFlag();
81  DTDeadFlag( const std::string& version );
82 
85  ~DTDeadFlag();
86 
89  int cellStatus( int wheelId,
91  int stationId,
92  int sectorId,
93  int slId,
94  int layerId,
95  int cellId,
96  bool& dead_HV,
97  bool& dead_TP,
98  bool& dead_RO,
99  bool& discCat ) const
100  { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
101  dead_HV, dead_TP, dead_RO, discCat ); };
102  int cellStatus( const DTWireId& id,
103  bool& dead_HV,
104  bool& dead_TP,
105  bool& dead_RO,
106  bool& discCat ) const
107  { return get( id, dead_HV, dead_TP, dead_RO, discCat ); };
108  int get( int wheelId,
109  int stationId,
110  int sectorId,
111  int slId,
112  int layerId,
113  int cellId,
114  bool& dead_HV,
115  bool& dead_TP,
116  bool& dead_RO,
117  bool& discCat ) const;
118  int get( const DTWireId& id,
119  bool& dead_HV,
120  bool& dead_TP,
121  bool& dead_RO,
122  bool& discCat ) const;
123 
124  bool getCellDead_HV( int wheelId,
125  int stationId,
126  int sectorId,
127  int slId,
128  int layerId,
129  int cellId ) const;
130  bool getCellDead_HV( const DTWireId& id ) const;
131 
132  bool getCellDead_TP( int wheelId,
133  int stationId,
134  int sectorId,
135  int slId,
136  int layerId,
137  int cellId ) const;
138  bool getCellDead_TP( const DTWireId& id ) const;
139 
140  bool getCellDead_RO( int wheelId,
141  int stationId,
142  int sectorId,
143  int slId,
144  int layerId,
145  int cellId ) const;
146  bool getCellDead_RO( const DTWireId& id ) const;
147 
148  bool getCellDiscCat( int wheelId,
149  int stationId,
150  int sectorId,
151  int slId,
152  int layerId,
153  int cellId ) const;
154  bool getCellDiscCat( const DTWireId& id ) const;
155 
157  const
158  std::string& version() const;
159  std::string& version();
160 
162  void clear();
163 
164  int setCellStatus( int wheelId,
165  int stationId,
166  int sectorId,
167  int slId,
168  int layerId,
169  int cellId,
170  bool dead_HV,
171  bool dead_TP,
172  bool dead_RO,
173  bool discCat )
174  { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
175  dead_HV, dead_TP, dead_RO, discCat ); };
176  int setCellStatus( const DTWireId& id,
177  bool dead_HV,
178  bool dead_TP,
179  bool dead_RO,
180  bool discCat )
181  { return set( id, dead_HV, dead_TP, dead_RO, discCat ); };
182 
183  int set( int wheelId,
184  int stationId,
185  int sectorId,
186  int slId,
187  int layerId,
188  int cellId,
189  bool dead_HV,
190  bool dead_TP,
191  bool dead_RO,
192  bool discCat ) ;
193  int set( const DTWireId& id,
194  bool dead_HV,
195  bool dead_TP,
196  bool dead_RO,
197  bool discCat );
198 
199  int setCellDead_HV( int wheelId,
200  int stationId,
201  int sectorId,
202  int slId,
203  int layerId,
204  int cellId,
205  bool flag );
206  int setCellDead_HV( const DTWireId& id,
207  bool flag );
208 
209  int setCellDead_TP( int wheelId,
210  int stationId,
211  int sectorId,
212  int slId,
213  int layerId,
214  int cellId,
215  bool flag );
216  int setCellDead_TP( const DTWireId& id,
217  bool flag );
218 
219  int setCellDead_RO( int wheelId,
220  int stationId,
221  int sectorId,
222  int slId,
223  int layerId,
224  int cellId,
225  bool flag );
226  int setCellDead_RO( const DTWireId& id,
227  bool flag );
228 
229  int setCellDiscCat( int wheelId,
230  int stationId,
231  int sectorId,
232  int slId,
233  int layerId,
234  int cellId,
235  bool flag );
236  int setCellDiscCat( const DTWireId& id,
237  bool flag );
238 
240  typedef std::vector< std::pair<DTDeadFlagId,
243  const_iterator begin() const;
244  const_iterator end() const;
245 
246  void initialize();
247 
248  private:
249 
250  DTDeadFlag(DTDeadFlag const&);
252 
254 
255  std::vector< std::pair<DTDeadFlagId,DTDeadFlagData> > dataList;
256 
258 
260  std::string mapName() const;
261 
262 
264 };
265 
266 #endif // DTDeadFlag_H
DTDeadFlag & operator=(DTDeadFlag const &)
bool getCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:230
int setCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:351
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:281
const_iterator begin() const
Definition: DTDeadFlag.cc:523
bool getCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:164
std::vector< std::pair< DTDeadFlagId, DTDeadFlagData > > dataList
Definition: DTDeadFlag.h:255
int setCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:437
const_iterator end() const
Definition: DTDeadFlag.cc:528
std::string mapName() const
read and store full content
Definition: DTDeadFlag.cc:533
std::vector< std::pair< DTDeadFlagId, DTDeadFlagData > >::const_iterator const_iterator
Access methods to data.
Definition: DTDeadFlag.h:242
int setCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:480
const std::string & version() const
access version
Definition: DTDeadFlag.cc:264
bool getCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:131
int setCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:394
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf COND_TRANSIENT
Definition: DTDeadFlag.h:257
std::string dataVersion
Definition: DTDeadFlag.h:253
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:164
int setCellStatus(const DTWireId &id, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat)
Definition: DTDeadFlag.h:176
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:90
int cellStatus(const DTWireId &id, bool &dead_HV, bool &dead_TP, bool &dead_RO, bool &discCat) const
Definition: DTDeadFlag.h:102
void initialize()
Definition: DTDeadFlag.cc:540
bool getCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:197
void clear()
reset content
Definition: DTDeadFlag.cc:274