CMS 3D CMS Logo

DTCCBConfig.h
Go to the documentation of this file.
1 #ifndef DTCCBConfig_H
2 #define DTCCBConfig_H
3 
12 //----------------------
13 // Base Class Headers --
14 //----------------------
15 
16 //------------------------------------
17 // Collaborating Class Declarations --
18 //------------------------------------
20 
23 
24 //---------------
25 // C++ Headers --
26 //---------------
27 #include <string>
28 #include <vector>
29 #include <utility>
30 
32 
33 // ---------------------
34 // -- Class Interface --
35 // ---------------------
36 
37 class DTCCBId {
38 public:
39  DTCCBId();
40  ~DTCCBId();
41 
42  int wheelId;
43  int stationId;
44  int sectorId;
45 
47 };
48 
49 class DTConfigKey {
50 public:
51  DTConfigKey();
52  ~DTConfigKey();
53 
54  int confType;
55  int confKey;
56 
58 };
59 
60 class DTCCBConfig {
61 public:
62  DTCCBConfig();
63  DTCCBConfig(DTCCBConfig const&) = delete;
64  DTCCBConfig& operator=(DTCCBConfig const&) = delete;
66 
67  virtual ~DTCCBConfig();
68 
69  std::vector<DTConfigKey> fullKey() const;
70  int stamp() const;
71  int configKey(int wheelId, int stationId, int sectorId, std::vector<int>& confKey) const;
72  int configKey(const DTChamberId& id, std::vector<int>& confKey) const;
73  typedef std::vector<std::pair<DTCCBId, std::vector<int> > > ccb_config_map;
74  typedef ccb_config_map::const_iterator ccb_config_iterator;
76 
78  const std::string& version() const;
80 
82  void clear();
83 
84  void setFullKey(const std::vector<DTConfigKey>&);
85  void setStamp(int s);
86 
87  int setConfigKey(int wheelId, int stationId, int sectorId, const std::vector<int>& confKey);
88  int setConfigKey(const DTChamberId& id, const std::vector<int>& confKey);
89 
90  int appendConfigKey(int wheelId, int stationId, int sectorId, const std::vector<int>& confKey);
91  int appendConfigKey(const DTChamberId& id, const std::vector<int>& confKey);
92 
94  typedef std::vector<std::pair<DTCCBId, int> >::const_iterator const_iterator;
95  const_iterator begin() const;
96  const_iterator end() const;
97 
98  void initialize();
99 
100 private:
103  std::vector<DTConfigKey> fullConfigKey;
104  std::vector<std::pair<DTCCBId, int> > dataList;
105 
107 
109 };
110 #endif // DTCCBConfig_H
std::vector< std::pair< DTCCBId, std::vector< int > > > ccb_config_map
Definition: DTCCBConfig.h:73
ccb_config_map::const_iterator ccb_config_iterator
Definition: DTCCBConfig.h:74
int wheelId
Definition: DTCCBConfig.h:42
std::vector< std::pair< DTCCBId, int > > dataList
Definition: DTCCBConfig.h:104
const std::string & version() const
access version
Definition: DTCCBConfig.cc:109
void setStamp(int s)
Definition: DTCCBConfig.cc:121
DTCCBConfig & operator=(DTCCBConfig const &)=delete
std::vector< DTConfigKey > fullConfigKey
Definition: DTCCBConfig.h:103
int sectorId
Definition: DTCCBConfig.h:44
std::vector< std::pair< DTCCBId, int > >::const_iterator const_iterator
Access methods to data.
Definition: DTCCBConfig.h:94
int stationId
Definition: DTCCBConfig.h:43
int stamp() const
Definition: DTCCBConfig.cc:56
std::string dataVersion
Definition: DTCCBConfig.h:102
#define COND_TRANSIENT
Definition: Serializable.h:63
virtual ~DTCCBConfig()
Definition: DTCCBConfig.cc:45
ccb_config_map configKeyMap() const
Definition: DTCCBConfig.cc:74
#define COND_SERIALIZABLE
Definition: Serializable.h:39
void initialize()
Definition: DTCCBConfig.cc:209
int configKey(int wheelId, int stationId, int sectorId, std::vector< int > &confKey) const
Definition: DTCCBConfig.cc:58
void clear()
reset content
Definition: DTCCBConfig.cc:113
edm::ConstRespectingPtr< DTBufferTreeUniquePtr > dBuf
Definition: DTCCBConfig.h:106
std::vector< DTConfigKey > fullKey() const
Definition: DTCCBConfig.cc:54
const_iterator end() const
Definition: DTCCBConfig.cc:207
const_iterator begin() const
Definition: DTCCBConfig.cc:205
int setConfigKey(int wheelId, int stationId, int sectorId, const std::vector< int > &confKey)
Definition: DTCCBConfig.cc:123
void setFullKey(const std::vector< DTConfigKey > &)
Definition: DTCCBConfig.cc:119
int appendConfigKey(int wheelId, int stationId, int sectorId, const std::vector< int > &confKey)
Definition: DTCCBConfig.cc:168