CMS 3D CMS Logo

DTStatusFlag.h
Go to the documentation of this file.
1 #ifndef DTStatusFlag_H
2 #define DTStatusFlag_H
3 
13 //----------------------
14 // Base Class Headers --
15 //----------------------
16 
17 
18 //------------------------------------
19 // Collaborating Class Declarations --
20 //------------------------------------
22 
25 
26 //---------------
27 // C++ Headers --
28 //---------------
29 #include <string>
30 #include <vector>
31 #include <utility>
32 
33 template <class Key, class Content> class DTBufferTree;
34 
35 // ---------------------
36 // -- Class Interface --
37 // ---------------------
38 
40 
41  public:
42 
45 
46  int wheelId;
47  int stationId;
48  int sectorId;
49  int slId;
50  int layerId;
51  int cellId;
52 
53 
55 };
56 
57 
59 
60  public:
61 
64 
65  bool noiseFlag;
66  bool feMask;
67  bool tdcMask;
68  bool trigMask;
69  bool deadFlag;
70  bool nohvFlag;
71 
72 
74 };
75 
76 
78  public:
79  bool operator()( const DTStatusFlagId& idl,
80  const DTStatusFlagId& idr ) const;
81 };
82 
83 
84 class DTStatusFlag {
85 
86  public:
87 
90  DTStatusFlag();
92 
95  ~DTStatusFlag();
96 
99  int cellStatus( int wheelId,
101  int stationId,
102  int sectorId,
103  int slId,
104  int layerId,
105  int cellId,
106  bool& noiseFlag,
107  bool& feMask,
108  bool& tdcMask,
109  bool& trigMask,
110  bool& deadFlag,
111  bool& nohvFlag ) const
112  { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
113  noiseFlag, feMask, tdcMask, trigMask,
114  deadFlag, nohvFlag); };
115  int cellStatus( const DTWireId& id,
116  bool& noiseFlag,
117  bool& feMask,
118  bool& tdcMask,
119  bool& trigMask,
120  bool& deadFlag,
121  bool& nohvFlag ) const
122  { return get( id,
123  noiseFlag, feMask, tdcMask, trigMask,
124  deadFlag, nohvFlag ); };
125  int get( int wheelId,
126  int stationId,
127  int sectorId,
128  int slId,
129  int layerId,
130  int cellId,
131  bool& noiseFlag,
132  bool& feMask,
133  bool& tdcMask,
134  bool& trigMask,
135  bool& deadFlag,
136  bool& nohvFlag ) const;
137  int get( const DTWireId& id,
138  bool& noiseFlag,
139  bool& feMask,
140  bool& tdcMask,
141  bool& trigMask,
142  bool& deadFlag,
143  bool& nohvFlag ) const;
144 
146  const
147  std::string& version() const;
148  std::string& version();
149 
151  void clear();
152 
153  int setCellStatus( int wheelId,
154  int stationId,
155  int sectorId,
156  int slId,
157  int layerId,
158  int cellId,
159  bool noiseFlag,
160  bool feMask,
161  bool tdcMask,
162  bool trigMask,
163  bool deadFlag,
164  bool nohvFlag )
165  { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
166  noiseFlag, feMask, tdcMask, trigMask,
167  deadFlag, nohvFlag); };
168  int setCellStatus( const DTWireId& id,
169  bool noiseFlag,
170  bool feMask,
171  bool tdcMask,
172  bool trigMask,
173  bool deadFlag,
174  bool nohvFlag )
175  { return set( id,
176  noiseFlag, feMask, tdcMask, trigMask,
177  deadFlag, nohvFlag ); };
178 
179  int set( int wheelId,
180  int stationId,
181  int sectorId,
182  int slId,
183  int layerId,
184  int cellId,
185  bool noiseFlag,
186  bool feMask,
187  bool tdcMask,
188  bool trigMask,
189  bool deadFlag,
190  bool nohvFlag );
191  int set( const DTWireId& id,
192  bool noiseFlag,
193  bool feMask,
194  bool tdcMask,
195  bool trigMask,
196  bool deadFlag,
197  bool nohvFlag );
198 
199  int setCellNoise( int wheelId,
200  int stationId,
201  int sectorId,
202  int slId,
203  int layerId,
204  int cellId,
205  bool flag );
206  int setCellNoise( const DTWireId& id,
207  bool flag );
208 
209  int setCellFEMask( int wheelId,
210  int stationId,
211  int sectorId,
212  int slId,
213  int layerId,
214  int cellId,
215  bool mask );
216  int setCellFEMask( const DTWireId& id,
217  bool mask );
218 
219  int setCellTDCMask( int wheelId,
220  int stationId,
221  int sectorId,
222  int slId,
223  int layerId,
224  int cellId,
225  bool mask );
226  int setCellTDCMask( const DTWireId& id,
227  bool mask );
228 
229  int setCellTrigMask( int wheelId,
230  int stationId,
231  int sectorId,
232  int slId,
233  int layerId,
234  int cellId,
235  bool mask );
236  int setCellTrigMask( const DTWireId& id,
237  bool mask );
238 
239  int setCellDead( int wheelId,
240  int stationId,
241  int sectorId,
242  int slId,
243  int layerId,
244  int cellId,
245  bool flag );
246  int setCellDead( const DTWireId& id,
247  bool flag );
248 
249  int setCellNoHV( int wheelId,
250  int stationId,
251  int sectorId,
252  int slId,
253  int layerId,
254  int cellId,
255  bool flag );
256  int setCellNoHV( const DTWireId& id,
257  bool flag );
258 
260  typedef std::vector< std::pair<DTStatusFlagId,
263  const_iterator begin() const;
264  const_iterator end() const;
265 
266  void initialize();
267 
268  private:
269 
270  DTStatusFlag(DTStatusFlag const&) = delete;
271  DTStatusFlag& operator=(DTStatusFlag const&) = delete;
272 
274 
275  std::vector< std::pair<DTStatusFlagId,DTStatusFlagData> > dataList;
276 
278 
279  std::string mapName() const;
280 
281 
283 };
284 #endif // DTStatusFlag_H
static AlgebraicMatrix initialize()
int setCellStatus(const DTWireId &id, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag)
Definition: DTStatusFlag.h:168
std::vector< std::pair< DTStatusFlagId, DTStatusFlagData > > dataList
Definition: DTStatusFlag.h:275
std::string dataVersion
Definition: DTStatusFlag.h:273
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
std::vector< std::pair< DTStatusFlagId, DTStatusFlagData > >::const_iterator const_iterator
Access methods to data.
Definition: DTStatusFlag.h:262
#define end
Definition: vmac.h:39
int cellStatus(const DTWireId &id, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const
Definition: DTStatusFlag.h:115
#define COND_TRANSIENT
Definition: Serializable.h:61
#define COND_SERIALIZABLE
Definition: Serializable.h:38
#define begin
Definition: vmac.h:32
int setCellStatus(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag)
Definition: DTStatusFlag.h:153