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 // 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>
33 class DTBufferTree;
34 
35 // ---------------------
36 // -- Class Interface --
37 // ---------------------
38 
40 public:
43 
44  int wheelId;
45  int stationId;
46  int sectorId;
47  int slId;
48  int layerId;
49  int cellId;
50 
52 };
53 
55 public:
58 
59  bool noiseFlag;
60  bool feMask;
61  bool tdcMask;
62  bool trigMask;
63  bool deadFlag;
64  bool nohvFlag;
65 
67 };
68 
70 public:
71  bool operator()(const DTStatusFlagId& idl, const DTStatusFlagId& idr) const;
72 };
73 
74 class DTStatusFlag {
75 public:
78  DTStatusFlag();
79  DTStatusFlag(DTStatusFlag const&) = delete;
80  DTStatusFlag& operator=(DTStatusFlag const&) = delete;
82 
85  ~DTStatusFlag();
86 
89  int cellStatus(int wheelId,
91  int stationId,
92  int sectorId,
93  int slId,
94  int layerId,
95  int cellId,
96  bool& noiseFlag,
97  bool& feMask,
98  bool& tdcMask,
99  bool& trigMask,
100  bool& deadFlag,
101  bool& nohvFlag) const {
102  return get(
103  wheelId, stationId, sectorId, slId, layerId, cellId, noiseFlag, feMask, tdcMask, trigMask, deadFlag, nohvFlag);
104  };
105  int cellStatus(const DTWireId& id,
106  bool& noiseFlag,
107  bool& feMask,
108  bool& tdcMask,
109  bool& trigMask,
110  bool& deadFlag,
111  bool& nohvFlag) const {
112  return get(id, noiseFlag, feMask, tdcMask, trigMask, deadFlag, nohvFlag);
113  };
114  int get(int wheelId,
115  int stationId,
116  int sectorId,
117  int slId,
118  int layerId,
119  int cellId,
120  bool& noiseFlag,
121  bool& feMask,
122  bool& tdcMask,
123  bool& trigMask,
124  bool& deadFlag,
125  bool& nohvFlag) const;
126  int get(const DTWireId& id,
127  bool& noiseFlag,
128  bool& feMask,
129  bool& tdcMask,
130  bool& trigMask,
131  bool& deadFlag,
132  bool& nohvFlag) const;
133 
135  const std::string& version() const;
136  std::string& version();
137 
139  void clear();
140 
141  int setCellStatus(int wheelId,
142  int stationId,
143  int sectorId,
144  int slId,
145  int layerId,
146  int cellId,
147  bool noiseFlag,
148  bool feMask,
149  bool tdcMask,
150  bool trigMask,
151  bool deadFlag,
152  bool nohvFlag) {
153  return set(
154  wheelId, stationId, sectorId, slId, layerId, cellId, noiseFlag, feMask, tdcMask, trigMask, deadFlag, nohvFlag);
155  };
157  const DTWireId& id, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag) {
158  return set(id, noiseFlag, feMask, tdcMask, trigMask, deadFlag, nohvFlag);
159  };
160 
161  int set(int wheelId,
162  int stationId,
163  int sectorId,
164  int slId,
165  int layerId,
166  int cellId,
167  bool noiseFlag,
168  bool feMask,
169  bool tdcMask,
170  bool trigMask,
171  bool deadFlag,
172  bool nohvFlag);
173  int set(const DTWireId& id, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag);
174 
175  int setCellNoise(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
176  int setCellNoise(const DTWireId& id, bool flag);
177 
178  int setCellFEMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask);
179  int setCellFEMask(const DTWireId& id, bool mask);
180 
181  int setCellTDCMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask);
182  int setCellTDCMask(const DTWireId& id, bool mask);
183 
184  int setCellTrigMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask);
185  int setCellTrigMask(const DTWireId& id, bool mask);
186 
187  int setCellDead(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
188  int setCellDead(const DTWireId& id, bool flag);
189 
190  int setCellNoHV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
191  int setCellNoHV(const DTWireId& id, bool flag);
192 
194  typedef std::vector<std::pair<DTStatusFlagId, DTStatusFlagData> >::const_iterator const_iterator;
195  const_iterator begin() const;
196  const_iterator end() const;
197 
198  void initialize();
199 
200 private:
202 
203  std::vector<std::pair<DTStatusFlagId, DTStatusFlagData> > dataList;
204 
206 
207  std::string mapName() const;
208 
210 };
211 #endif // DTStatusFlag_H
int setCellDead(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
const_iterator begin() const
int cellStatus(const DTWireId &id, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const
Definition: DTStatusFlag.h:105
int setCellStatus(const DTWireId &id, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag)
Definition: DTStatusFlag.h:156
int setCellTrigMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask)
bool operator()(const DTStatusFlagId &idl, const DTStatusFlagId &idr) const
void initialize()
int setCellNoise(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
std::string dataVersion
Definition: DTStatusFlag.h:201
std::vector< std::pair< DTStatusFlagId, DTStatusFlagData > >::const_iterator const_iterator
Access methods to data.
Definition: DTStatusFlag.h:194
#define COND_TRANSIENT
Definition: Serializable.h:63
#define COND_SERIALIZABLE
Definition: Serializable.h:39
void clear()
reset content
std::vector< std::pair< DTStatusFlagId, DTStatusFlagData > > dataList
Definition: DTStatusFlag.h:203
int setCellNoHV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
const_iterator end() const
std::string mapName() const
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:141
DTStatusFlag & operator=(DTStatusFlag const &)=delete
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:90
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTStatusFlag.h:205
const std::string & version() const
access version