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();
80 
83  ~DTStatusFlag();
84 
87  int cellStatus(int wheelId,
89  int stationId,
90  int sectorId,
91  int slId,
92  int layerId,
93  int cellId,
94  bool& noiseFlag,
95  bool& feMask,
96  bool& tdcMask,
97  bool& trigMask,
98  bool& deadFlag,
99  bool& nohvFlag) const {
100  return get(
101  wheelId, stationId, sectorId, slId, layerId, cellId, noiseFlag, feMask, tdcMask, trigMask, deadFlag, nohvFlag);
102  };
103  int cellStatus(const DTWireId& id,
104  bool& noiseFlag,
105  bool& feMask,
106  bool& tdcMask,
107  bool& trigMask,
108  bool& deadFlag,
109  bool& nohvFlag) const {
110  return get(id, noiseFlag, feMask, tdcMask, trigMask, deadFlag, nohvFlag);
111  };
112  int get(int wheelId,
113  int stationId,
114  int sectorId,
115  int slId,
116  int layerId,
117  int cellId,
118  bool& noiseFlag,
119  bool& feMask,
120  bool& tdcMask,
121  bool& trigMask,
122  bool& deadFlag,
123  bool& nohvFlag) const;
124  int get(const DTWireId& id,
125  bool& noiseFlag,
126  bool& feMask,
127  bool& tdcMask,
128  bool& trigMask,
129  bool& deadFlag,
130  bool& nohvFlag) const;
131 
133  const std::string& version() const;
134  std::string& version();
135 
137  void clear();
138 
139  int setCellStatus(int wheelId,
140  int stationId,
141  int sectorId,
142  int slId,
143  int layerId,
144  int cellId,
145  bool noiseFlag,
146  bool feMask,
147  bool tdcMask,
148  bool trigMask,
149  bool deadFlag,
150  bool nohvFlag) {
151  return set(
152  wheelId, stationId, sectorId, slId, layerId, cellId, noiseFlag, feMask, tdcMask, trigMask, deadFlag, nohvFlag);
153  };
155  const DTWireId& id, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag) {
156  return set(id, noiseFlag, feMask, tdcMask, trigMask, deadFlag, nohvFlag);
157  };
158 
159  int set(int wheelId,
160  int stationId,
161  int sectorId,
162  int slId,
163  int layerId,
164  int cellId,
165  bool noiseFlag,
166  bool feMask,
167  bool tdcMask,
168  bool trigMask,
169  bool deadFlag,
170  bool nohvFlag);
171  int set(const DTWireId& id, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag);
172 
173  int setCellNoise(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
174  int setCellNoise(const DTWireId& id, bool flag);
175 
176  int setCellFEMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask);
177  int setCellFEMask(const DTWireId& id, bool mask);
178 
179  int setCellTDCMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask);
180  int setCellTDCMask(const DTWireId& id, bool mask);
181 
182  int setCellTrigMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask);
183  int setCellTrigMask(const DTWireId& id, bool mask);
184 
185  int setCellDead(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
186  int setCellDead(const DTWireId& id, bool flag);
187 
188  int setCellNoHV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag);
189  int setCellNoHV(const DTWireId& id, bool flag);
190 
192  typedef std::vector<std::pair<DTStatusFlagId, DTStatusFlagData> >::const_iterator const_iterator;
193  const_iterator begin() const;
194  const_iterator end() const;
195 
196  void initialize();
197 
198 private:
199  DTStatusFlag(DTStatusFlag const&) = delete;
200  DTStatusFlag& operator=(DTStatusFlag const&) = delete;
201 
203 
204  std::vector<std::pair<DTStatusFlagId, DTStatusFlagData> > dataList;
205 
207 
208  std::string mapName() const;
209 
211 };
212 #endif // DTStatusFlag_H
ConstRespectingPtr.h
DTStatusFlagData::feMask
bool feMask
Definition: DTStatusFlag.h:60
DTStatusFlag::setCellStatus
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:139
DTStatusFlagData::nohvFlag
bool nohvFlag
Definition: DTStatusFlag.h:64
DTStatusFlag::cellStatus
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:88
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
DTStatusFlag::initialize
void initialize()
Definition: DTStatusFlag.cc:304
COND_TRANSIENT
#define COND_TRANSIENT
Definition: Serializable.h:63
DTStatusFlagId::slId
int slId
Definition: DTStatusFlag.h:47
DTStatusFlagId::sectorId
int sectorId
Definition: DTStatusFlag.h:46
DTStatusFlag::DTStatusFlag
DTStatusFlag()
Definition: DTStatusFlag.cc:27
DTStatusFlag::setCellFEMask
int setCellFEMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask)
Definition: DTStatusFlag.cc:207
DTStatusFlagData::~DTStatusFlagData
~DTStatusFlagData()
Definition: DTStatusFlag.cc:45
DTStatusFlag::begin
const_iterator begin() const
Definition: DTStatusFlag.cc:294
DTStatusFlag::clear
void clear()
reset content
Definition: DTStatusFlag.cc:112
DTStatusFlag::cellStatus
int cellStatus(const DTWireId &id, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const
Definition: DTStatusFlag.h:103
DTStatusFlag::dataList
std::vector< std::pair< DTStatusFlagId, DTStatusFlagData > > dataList
Definition: DTStatusFlag.h:204
DTStatusFlag::mapName
std::string mapName() const
Definition: DTStatusFlag.cc:298
DTStatusFlagId::wheelId
int wheelId
Definition: DTStatusFlag.h:44
DTStatusFlag::~DTStatusFlag
~DTStatusFlag()
Definition: DTStatusFlag.cc:41
DTStatusFlagCompare
Definition: DTStatusFlag.h:69
DTStatusFlag::setCellTDCMask
int setCellTDCMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask)
Definition: DTStatusFlag.cc:224
DTStatusFlag::operator=
DTStatusFlag & operator=(DTStatusFlag const &)=delete
DTWireId
Definition: DTWireId.h:12
DTStatusFlagData::DTStatusFlagData
DTStatusFlagData()
Definition: DTStatusFlag.cc:35
DTStatusFlag::const_iterator
std::vector< std::pair< DTStatusFlagId, DTStatusFlagData > >::const_iterator const_iterator
Access methods to data.
Definition: DTStatusFlag.h:192
DTStatusFlagId::stationId
int stationId
Definition: DTStatusFlag.h:45
DTStatusFlagData::deadFlag
bool deadFlag
Definition: DTStatusFlag.h:63
DTStatusFlag::setCellTrigMask
int setCellTrigMask(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask)
Definition: DTStatusFlag.cc:242
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTStatusFlag::dBuf
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTStatusFlag.h:206
DTStatusFlagData
Definition: DTStatusFlag.h:54
DTStatusFlag::set
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)
Definition: DTStatusFlag.cc:118
DTStatusFlagCompare::operator()
bool operator()(const DTStatusFlagId &idl, const DTStatusFlagId &idr) const
DTStatusFlag::setCellDead
int setCellDead(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTStatusFlag.cc:260
DTStatusFlagId::cellId
int cellId
Definition: DTStatusFlag.h:49
DTStatusFlag::get
int get(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
Definition: DTStatusFlag.cc:50
Serializable.h
DTStatusFlagData::tdcMask
bool tdcMask
Definition: DTStatusFlag.h:61
DTStatusFlag::dataVersion
std::string dataVersion
Definition: DTStatusFlag.h:202
DTBufferTree
Definition: DTBufferTree.h:42
DTStatusFlag::setCellNoise
int setCellNoise(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTStatusFlag.cc:190
DTStatusFlagId
Definition: DTStatusFlag.h:39
DTStatusFlag::end
const_iterator end() const
Definition: DTStatusFlag.cc:296
edm::ConstRespectingPtr
Definition: ConstRespectingPtr.h:27
DTStatusFlagData::trigMask
bool trigMask
Definition: DTStatusFlag.h:62
DTWireId.h
DTStatusFlagId::layerId
int layerId
Definition: DTStatusFlag.h:48
DTStatusFlag::setCellStatus
int setCellStatus(const DTWireId &id, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag)
Definition: DTStatusFlag.h:154
DTStatusFlagId::~DTStatusFlagId
~DTStatusFlagId()
Definition: DTStatusFlag.cc:43
DTStatusFlag::version
const std::string & version() const
access version
Definition: DTStatusFlag.cc:108
DTStatusFlagData::noiseFlag
bool noiseFlag
Definition: DTStatusFlag.h:59
DTStatusFlagId::DTStatusFlagId
DTStatusFlagId()
Definition: DTStatusFlag.cc:33
DTStatusFlag::setCellNoHV
int setCellNoHV(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag)
Definition: DTStatusFlag.cc:277
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
DTStatusFlag
Definition: DTStatusFlag.h:74