CMS 3D CMS Logo

DTLVStatus.h
Go to the documentation of this file.
1 #ifndef DTLVStatus_H
2 #define DTLVStatus_H
3 
12 //----------------------
13 // Base Class Headers --
14 //----------------------
15 
16 //------------------------------------
17 // Collaborating Class Declarations --
18 //------------------------------------
21 
22 class DTChamberId;
23 
24 //---------------
25 // C++ Headers --
26 //---------------
27 #include <string>
28 #include <vector>
29 #include <utility>
30 
31 template <class Key, class Content>
32 class DTBufferTree;
33 
34 // ---------------------
35 // -- Class Interface --
36 // ---------------------
37 
38 class DTLVStatusId {
39 public:
40  DTLVStatusId();
41  ~DTLVStatusId();
42 
43  int wheelId;
44  int stationId;
45  int sectorId;
46 
48 };
49 
51 public:
54 
55  int flagCFE;
56  int flagDFE;
57  int flagCMC;
58  int flagDMC;
59 
61 };
62 
63 class DTLVStatus {
64 public:
67  DTLVStatus();
68  DTLVStatus(DTLVStatus const&) = delete;
69  DTLVStatus& operator=(DTLVStatus const&) = delete;
71 
74  ~DTLVStatus();
75 
78  int get(int wheelId, int stationId, int sectorId, int& flagCFE, int& flagDFE, int& flagCMC, int& flagDMC) const;
80  int get(const DTChamberId& id, int& flagCFE, int& flagDFE, int& flagCMC, int& flagDMC) const;
82  const std::string& version() const;
84 
86  void clear();
87 
88  int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC);
89  int set(const DTChamberId& id, int flagCFE, int flagDFE, int flagCMC, int flagDMC);
90  int setFlagCFE(int wheelId, int stationId, int sectorId, int flag);
91  int setFlagCFE(const DTChamberId& id, int flag);
92  int setFlagDFE(int wheelId, int stationId, int sectorId, int flag);
93  int setFlagDFE(const DTChamberId& id, int flag);
94  int setFlagCMC(int wheelId, int stationId, int sectorId, int flag);
95  int setFlagCMC(const DTChamberId& id, int flag);
96  int setFlagDMC(int wheelId, int stationId, int sectorId, int flag);
97  int setFlagDMC(const DTChamberId& id, int flag);
98 
100  typedef std::vector<std::pair<DTLVStatusId, DTLVStatusData> >::const_iterator const_iterator;
101  const_iterator begin() const;
102  const_iterator end() const;
103 
104  void initialize();
105 
106 private:
108 
109  std::vector<std::pair<DTLVStatusId, DTLVStatusData> > dataList;
110 
112 
114  std::string mapName() const;
115 
117 };
118 #endif // DTLVStatus_H
const_iterator begin() const
Definition: DTLVStatus.cc:184
std::string dataVersion
Definition: DTLVStatus.h:107
void clear()
reset content
Definition: DTLVStatus.cc:87
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:111
void initialize()
Definition: DTLVStatus.cc:194
int setFlagDMC(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:171
const std::string & version() const
access version
Definition: DTLVStatus.cc:83
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:109
std::string mapName() const
read and store full content
Definition: DTLVStatus.cc:188
int setFlagCFE(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:132
#define COND_TRANSIENT
Definition: Serializable.h:63
std::vector< std::pair< DTLVStatusId, DTLVStatusData > >::const_iterator const_iterator
Access methods to data.
Definition: DTLVStatus.h:100
#define COND_SERIALIZABLE
Definition: Serializable.h:39
const_iterator end() const
Definition: DTLVStatus.cc:186
int setFlagDFE(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:145
DTLVStatus & operator=(DTLVStatus const &)=delete
int setFlagCMC(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:158