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();
64 
65  virtual ~DTCCBConfig();
66 
67  std::vector<DTConfigKey> fullKey() const;
68  int stamp() const;
69  int configKey(int wheelId, int stationId, int sectorId, std::vector<int>& confKey) const;
70  int configKey(const DTChamberId& id, std::vector<int>& confKey) const;
71  typedef std::vector<std::pair<DTCCBId, std::vector<int> > > ccb_config_map;
72  typedef ccb_config_map::const_iterator ccb_config_iterator;
73  ccb_config_map configKeyMap() const;
74 
76  const std::string& version() const;
78 
80  void clear();
81 
82  void setFullKey(const std::vector<DTConfigKey>&);
83  void setStamp(int s);
84 
85  int setConfigKey(int wheelId, int stationId, int sectorId, const std::vector<int>& confKey);
86  int setConfigKey(const DTChamberId& id, const std::vector<int>& confKey);
87 
88  int appendConfigKey(int wheelId, int stationId, int sectorId, const std::vector<int>& confKey);
89  int appendConfigKey(const DTChamberId& id, const std::vector<int>& confKey);
90 
92  typedef std::vector<std::pair<DTCCBId, int> >::const_iterator const_iterator;
93  const_iterator begin() const;
94  const_iterator end() const;
95 
96  void initialize();
97 
98 private:
99  DTCCBConfig(DTCCBConfig const&) = delete;
100  DTCCBConfig& operator=(DTCCBConfig const&) = delete;
101 
104  std::vector<DTConfigKey> fullConfigKey;
105  std::vector<std::pair<DTCCBId, int> > dataList;
106 
108 
110 };
111 #endif // DTCCBConfig_H
static AlgebraicMatrix initialize()
std::vector< std::pair< DTCCBId, std::vector< int > > > ccb_config_map
Definition: DTCCBConfig.h:71
ccb_config_map::const_iterator ccb_config_iterator
Definition: DTCCBConfig.h:72
int wheelId
Definition: DTCCBConfig.h:42
std::vector< std::pair< DTCCBId, int > > dataList
Definition: DTCCBConfig.h:105
std::vector< DTConfigKey > fullConfigKey
Definition: DTCCBConfig.h:104
int sectorId
Definition: DTCCBConfig.h:44
std::vector< std::pair< DTCCBId, int > >::const_iterator const_iterator
Access methods to data.
Definition: DTCCBConfig.h:92
int stationId
Definition: DTCCBConfig.h:43
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:151
#define end
Definition: vmac.h:39
std::string dataVersion
Definition: DTCCBConfig.h:103
#define COND_TRANSIENT
Definition: Serializable.h:62
#define COND_SERIALIZABLE
Definition: Serializable.h:38
#define begin
Definition: vmac.h:32