CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTStatusFlag.h
Go to the documentation of this file.
1 #ifndef DTStatusFlag_H
2 #define DTStatusFlag_H
3 
15 //----------------------
16 // Base Class Headers --
17 //----------------------
18 
19 
20 //------------------------------------
21 // Collaborating Class Declarations --
22 //------------------------------------
25 
26 //---------------
27 // C++ Headers --
28 //---------------
29 #include <string>
30 #include <vector>
31 
32 // ---------------------
33 // -- Class Interface --
34 // ---------------------
35 
37 
38  public:
39 
42 
43  int wheelId;
44  int stationId;
45  int sectorId;
46  int slId;
47  int layerId;
48  int cellId;
49 
50 };
51 
52 
54 
55  public:
56 
59 
60  bool noiseFlag;
61  bool feMask;
62  bool tdcMask;
63  bool trigMask;
64  bool deadFlag;
65  bool nohvFlag;
66 
67 };
68 
69 
71  public:
72  bool operator()( const DTStatusFlagId& idl,
73  const DTStatusFlagId& idr ) const;
74 };
75 
76 
77 class DTStatusFlag {
78 
79  public:
80 
83  DTStatusFlag();
85 
88  ~DTStatusFlag();
89 
92  int cellStatus( int wheelId,
94  int stationId,
95  int sectorId,
96  int slId,
97  int layerId,
98  int cellId,
99  bool& noiseFlag,
100  bool& feMask,
101  bool& tdcMask,
102  bool& trigMask,
103  bool& deadFlag,
104  bool& nohvFlag ) const
105  { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
106  noiseFlag, feMask, tdcMask, trigMask,
107  deadFlag, nohvFlag); };
108  int cellStatus( const DTWireId& id,
109  bool& noiseFlag,
110  bool& feMask,
111  bool& tdcMask,
112  bool& trigMask,
113  bool& deadFlag,
114  bool& nohvFlag ) const
115  { return get( id,
116  noiseFlag, feMask, tdcMask, trigMask,
117  deadFlag, nohvFlag ); };
118  int get( int wheelId,
119  int stationId,
120  int sectorId,
121  int slId,
122  int layerId,
123  int cellId,
124  bool& noiseFlag,
125  bool& feMask,
126  bool& tdcMask,
127  bool& trigMask,
128  bool& deadFlag,
129  bool& nohvFlag ) const;
130  int get( const DTWireId& id,
131  bool& noiseFlag,
132  bool& feMask,
133  bool& tdcMask,
134  bool& trigMask,
135  bool& deadFlag,
136  bool& nohvFlag ) const;
137 
139  const
140  std::string& version() const;
141  std::string& version();
142 
144  void clear();
145 
146  int setCellStatus( int wheelId,
147  int stationId,
148  int sectorId,
149  int slId,
150  int layerId,
151  int cellId,
152  bool noiseFlag,
153  bool feMask,
154  bool tdcMask,
155  bool trigMask,
156  bool deadFlag,
157  bool nohvFlag )
158  { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
159  noiseFlag, feMask, tdcMask, trigMask,
160  deadFlag, nohvFlag); };
161  int setCellStatus( const DTWireId& id,
162  bool noiseFlag,
163  bool feMask,
164  bool tdcMask,
165  bool trigMask,
166  bool deadFlag,
167  bool nohvFlag )
168  { return set( id,
169  noiseFlag, feMask, tdcMask, trigMask,
170  deadFlag, nohvFlag ); };
171 
172  int set( int wheelId,
173  int stationId,
174  int sectorId,
175  int slId,
176  int layerId,
177  int cellId,
178  bool noiseFlag,
179  bool feMask,
180  bool tdcMask,
181  bool trigMask,
182  bool deadFlag,
183  bool nohvFlag );
184  int set( const DTWireId& id,
185  bool noiseFlag,
186  bool feMask,
187  bool tdcMask,
188  bool trigMask,
189  bool deadFlag,
190  bool nohvFlag );
191 
192  int setCellNoise( int wheelId,
193  int stationId,
194  int sectorId,
195  int slId,
196  int layerId,
197  int cellId,
198  bool flag );
199  int setCellNoise( const DTWireId& id,
200  bool flag );
201 
202  int setCellFEMask( int wheelId,
203  int stationId,
204  int sectorId,
205  int slId,
206  int layerId,
207  int cellId,
208  bool mask );
209  int setCellFEMask( const DTWireId& id,
210  bool mask );
211 
212  int setCellTDCMask( int wheelId,
213  int stationId,
214  int sectorId,
215  int slId,
216  int layerId,
217  int cellId,
218  bool mask );
219  int setCellTDCMask( const DTWireId& id,
220  bool mask );
221 
222  int setCellTrigMask( int wheelId,
223  int stationId,
224  int sectorId,
225  int slId,
226  int layerId,
227  int cellId,
228  bool mask );
229  int setCellTrigMask( const DTWireId& id,
230  bool mask );
231 
232  int setCellDead( int wheelId,
233  int stationId,
234  int sectorId,
235  int slId,
236  int layerId,
237  int cellId,
238  bool flag );
239  int setCellDead( const DTWireId& id,
240  bool flag );
241 
242  int setCellNoHV( int wheelId,
243  int stationId,
244  int sectorId,
245  int slId,
246  int layerId,
247  int cellId,
248  bool flag );
249  int setCellNoHV( const DTWireId& id,
250  bool flag );
251 
253  typedef std::vector< std::pair<DTStatusFlagId,
256  const_iterator begin() const;
257  const_iterator end() const;
258 
259  private:
260 
262 
263  std::vector< std::pair<DTStatusFlagId,DTStatusFlagData> > dataList;
264 
266 
268  void cacheMap() const;
269  std::string mapName() const;
270 
271 };
272 
273 
274 #endif // DTStatusFlag_H
275 
int set(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag)
const_iterator end() const
int setCellDead(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
int setCellStatus(const DTWireId &id, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag)
Definition: DTStatusFlag.h:161
int setCellTrigMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask)
std::vector< std::pair< DTStatusFlagId, DTStatusFlagData > > dataList
Definition: DTStatusFlag.h:263
int setCellNoise(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
std::string dataVersion
Definition: DTStatusFlag.h:261
std::vector< std::pair< DTStatusFlagId, DTStatusFlagData > >::const_iterator const_iterator
Access methods to data.
Definition: DTStatusFlag.h:255
int cellStatus(const DTWireId &id, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const
Definition: DTStatusFlag.h:108
void cacheMap() const
read and store full content
bool operator()(const DTStatusFlagId &idl, const DTStatusFlagId &idr) const
const std::string & version() const
access version
int cellStatus(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const
get content
Definition: DTStatusFlag.h:93
void clear()
reset content
int setCellNoHV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
std::string mapName() const
DTBufferTree< int, int > * dBuf
Definition: DTStatusFlag.h:265
int setCellTDCMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask)
int setCellFEMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask)
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:146
const_iterator begin() const