CMS 3D CMS Logo

DTHVStatus.h
Go to the documentation of this file.
1 #ifndef DTHVStatus_H
2 #define DTHVStatus_H
3 
13 //----------------------
14 // Base Class Headers --
15 //----------------------
16 
17 //------------------------------------
18 // Collaborating Class Declarations --
19 //------------------------------------
22 
23 class DTWireId;
24 class DTLayerId;
25 class DTChamberId;
26 
27 //---------------
28 // C++ Headers --
29 //---------------
30 #include <string>
31 #include <vector>
32 #include <utility>
33 
34 template <class Key, class Content>
35 class DTBufferTree;
36 
37 // ---------------------
38 // -- Class Interface --
39 // ---------------------
40 
41 class DTHVStatusId {
42 public:
43  DTHVStatusId();
44  ~DTHVStatusId();
45 
46  int wheelId;
47  int stationId;
48  int sectorId;
49  int slId;
50  int layerId;
51  int partId;
52 
54 };
55 
57 public:
60 
61  int fCell;
62  int lCell;
63  int flagA;
64  int flagC;
65  int flagS;
66 
68 };
69 
70 class DTHVStatus {
71 public:
74  DTHVStatus();
75  DTHVStatus(DTHVStatus const&) = delete;
76  DTHVStatus& operator=(DTHVStatus const&) = delete;
78 
81  ~DTHVStatus();
82 
85  int get(int wheelId,
87  int stationId,
88  int sectorId,
89  int slId,
90  int layerId,
91  int partId,
92  int& fCell,
93  int& lCell,
94  int& flagA,
95  int& flagC,
96  int& flagS) const;
97  int get(const DTLayerId& id, int partId, int& fCell, int& lCell, int& flagA, int& flagC, int& flagS) const;
98  int get(const DTWireId& id, int& flagA, int& flagC, int& flagS) const;
99  int offChannelsNumber() const;
100  int offChannelsNumber(const DTChamberId& id) const;
101  int badChannelsNumber() const;
102  int badChannelsNumber(const DTChamberId& id) const;
104  const std::string& version() const;
105  std::string& version();
106 
108  void clear();
109 
110  int set(int wheelId,
111  int stationId,
112  int sectorId,
113  int slId,
114  int layerId,
115  int partId,
116  int fCell,
117  int lCell,
118  int flagA,
119  int flagC,
120  int flagS);
121  int set(const DTLayerId& id, int partId, int fCell, int lCell, int flagA, int flagC, int flagS);
122  int setFlagA(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int flag);
123  int setFlagA(const DTLayerId& id, int partId, int flag);
124  int setFlagC(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int flag);
125  int setFlagC(const DTLayerId& id, int partId, int flag);
126  int setFlagS(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int flag);
127  int setFlagS(const DTLayerId& id, int partId, int flag);
128 
130  typedef std::vector<std::pair<DTHVStatusId, DTHVStatusData> >::const_iterator const_iterator;
131  const_iterator begin() const;
132  const_iterator end() const;
133 
134  void initialize();
135 
136 private:
138 
139  std::vector<std::pair<DTHVStatusId, DTHVStatusData> > dataList;
140 
142 
144  std::string mapName() const;
145 
147 };
148 #endif // DTHVStatus_H
const std::string & version() const
access version
Definition: DTHVStatus.cc:187
int setFlagS(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int flag)
Definition: DTHVStatus.cc:284
void clear()
reset content
Definition: DTHVStatus.cc:191
int badChannelsNumber() const
Definition: DTHVStatus.cc:153
int setFlagC(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int flag)
Definition: DTHVStatus.cc:270
int setFlagA(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int flag)
Definition: DTHVStatus.cc:256
std::string mapName() const
read and store full content
Definition: DTHVStatus.cc:302
std::vector< std::pair< DTHVStatusId, DTHVStatusData > > dataList
Definition: DTHVStatus.h:139
#define COND_TRANSIENT
Definition: Serializable.h:63
std::vector< std::pair< DTHVStatusId, DTHVStatusData > >::const_iterator const_iterator
Access methods to data.
Definition: DTHVStatus.h:130
void initialize()
Definition: DTHVStatus.cc:308
#define COND_SERIALIZABLE
Definition: Serializable.h:39
DTHVStatus & operator=(DTHVStatus const &)=delete
std::string dataVersion
Definition: DTHVStatus.h:137
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTHVStatus.h:141
const_iterator begin() const
Definition: DTHVStatus.cc:298
int offChannelsNumber() const
Definition: DTHVStatus.cc:113
const_iterator end() const
Definition: DTHVStatus.cc:300