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 
14 //----------------------
15 // Base Class Headers --
16 //----------------------
17 
18 
19 //------------------------------------
20 // Collaborating Class Declarations --
21 //------------------------------------
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 #include <string>
29 #include <vector>
30 
31 // ---------------------
32 // -- Class Interface --
33 // ---------------------
34 
35 class DTDeadFlagId {
36 
37  public:
38 
39  DTDeadFlagId();
40  ~DTDeadFlagId();
41 
42  int wheelId;
43  int stationId;
44  int sectorId;
45  int slId;
46  int layerId;
47  int cellId;
48 
49 };
50 
51 
53 
54  public:
55 
58 
59  bool dead_HV;
60  bool dead_TP;
61  bool dead_RO;
62  bool discCat;
63 
64 };
65 
66 
67 class DTDeadFlag {
68 
69  public:
70 
73  DTDeadFlag();
74  DTDeadFlag( const std::string& version );
75 
78  ~DTDeadFlag();
79 
82  int cellStatus( int wheelId,
84  int stationId,
85  int sectorId,
86  int slId,
87  int layerId,
88  int cellId,
89  bool& dead_HV,
90  bool& dead_TP,
91  bool& dead_RO,
92  bool& discCat ) const
93  { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
94  dead_HV, dead_TP, dead_RO, discCat ); };
95  int cellStatus( const DTWireId& id,
96  bool& dead_HV,
97  bool& dead_TP,
98  bool& dead_RO,
99  bool& discCat ) const
100  { return get( id, dead_HV, dead_TP, dead_RO, discCat ); };
101  int get( int wheelId,
102  int stationId,
103  int sectorId,
104  int slId,
105  int layerId,
106  int cellId,
107  bool& dead_HV,
108  bool& dead_TP,
109  bool& dead_RO,
110  bool& discCat ) const;
111  int get( const DTWireId& id,
112  bool& dead_HV,
113  bool& dead_TP,
114  bool& dead_RO,
115  bool& discCat ) const;
116 
117  bool getCellDead_HV( int wheelId,
118  int stationId,
119  int sectorId,
120  int slId,
121  int layerId,
122  int cellId ) const;
123  bool getCellDead_HV( const DTWireId& id ) const;
124 
125  bool getCellDead_TP( int wheelId,
126  int stationId,
127  int sectorId,
128  int slId,
129  int layerId,
130  int cellId ) const;
131  bool getCellDead_TP( const DTWireId& id ) const;
132 
133  bool getCellDead_RO( int wheelId,
134  int stationId,
135  int sectorId,
136  int slId,
137  int layerId,
138  int cellId ) const;
139  bool getCellDead_RO( const DTWireId& id ) const;
140 
141  bool getCellDiscCat( int wheelId,
142  int stationId,
143  int sectorId,
144  int slId,
145  int layerId,
146  int cellId ) const;
147  bool getCellDiscCat( const DTWireId& id ) const;
148 
150  const
151  std::string& version() const;
152  std::string& version();
153 
155  void clear();
156 
157  int setCellStatus( int wheelId,
158  int stationId,
159  int sectorId,
160  int slId,
161  int layerId,
162  int cellId,
163  bool dead_HV,
164  bool dead_TP,
165  bool dead_RO,
166  bool discCat )
167  { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
168  dead_HV, dead_TP, dead_RO, discCat ); };
169  int setCellStatus( const DTWireId& id,
170  bool dead_HV,
171  bool dead_TP,
172  bool dead_RO,
173  bool discCat )
174  { return set( id, dead_HV, dead_TP, dead_RO, discCat ); };
175 
176  int set( int wheelId,
177  int stationId,
178  int sectorId,
179  int slId,
180  int layerId,
181  int cellId,
182  bool dead_HV,
183  bool dead_TP,
184  bool dead_RO,
185  bool discCat ) ;
186  int set( const DTWireId& id,
187  bool dead_HV,
188  bool dead_TP,
189  bool dead_RO,
190  bool discCat );
191 
192  int setCellDead_HV( int wheelId,
193  int stationId,
194  int sectorId,
195  int slId,
196  int layerId,
197  int cellId,
198  bool flag );
199  int setCellDead_HV( const DTWireId& id,
200  bool flag );
201 
202  int setCellDead_TP( int wheelId,
203  int stationId,
204  int sectorId,
205  int slId,
206  int layerId,
207  int cellId,
208  bool flag );
209  int setCellDead_TP( const DTWireId& id,
210  bool flag );
211 
212  int setCellDead_RO( int wheelId,
213  int stationId,
214  int sectorId,
215  int slId,
216  int layerId,
217  int cellId,
218  bool flag );
219  int setCellDead_RO( const DTWireId& id,
220  bool flag );
221 
222  int setCellDiscCat( int wheelId,
223  int stationId,
224  int sectorId,
225  int slId,
226  int layerId,
227  int cellId,
228  bool flag );
229  int setCellDiscCat( const DTWireId& id,
230  bool flag );
231 
233  typedef std::vector< std::pair<DTDeadFlagId,
236  const_iterator begin() const;
237  const_iterator end() const;
238 
239  private:
240 
242 
243  std::vector< std::pair<DTDeadFlagId,DTDeadFlagData> > dataList;
244 
246 
248  void cacheMap() const;
249  std::string mapName() const;
250 
251 };
252 
253 
254 #endif // DTDeadFlag_H
255 
DTBufferTree< int, int > * dBuf
Definition: DTDeadFlag.h:245
long int flag
Definition: mlp_lapack.h:47
bool getCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:243
int setCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:375
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:296
const_iterator begin() const
Definition: DTDeadFlag.cc:547
bool getCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:177
std::vector< std::pair< DTDeadFlagId, DTDeadFlagData > > dataList
Definition: DTDeadFlag.h:243
int setCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:461
const_iterator end() const
Definition: DTDeadFlag.cc:552
std::string mapName() const
Definition: DTDeadFlag.cc:557
std::vector< std::pair< DTDeadFlagId, DTDeadFlagData > >::const_iterator const_iterator
Access methods to data.
Definition: DTDeadFlag.h:235
int setCellDiscCat(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:504
const std::string & version() const
access version
Definition: DTDeadFlag.cc:277
bool getCellDead_HV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:144
int setCellDead_TP(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTDeadFlag.cc:418
std::string dataVersion
Definition: DTDeadFlag.h:241
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:157
void cacheMap() const
read and store full content
Definition: DTDeadFlag.cc:564
int setCellStatus(const DTWireId &id, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat)
Definition: DTDeadFlag.h:169
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:83
int cellStatus(const DTWireId &id, bool &dead_HV, bool &dead_TP, bool &dead_RO, bool &discCat) const
Definition: DTDeadFlag.h:95
bool getCellDead_RO(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const
Definition: DTDeadFlag.cc:210
void clear()
reset content
Definition: DTDeadFlag.cc:287