CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTCCBConfig.h
Go to the documentation of this file.
1 #ifndef DTCCBConfig_H
2 #define DTCCBConfig_H
3 
14 //----------------------
15 // Base Class Headers --
16 //----------------------
17 
18 
19 //------------------------------------
20 // Collaborating Class Declarations --
21 //------------------------------------
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 #include <string>
29 #include <vector>
30 #include <map>
31 
32 // ---------------------
33 // -- Class Interface --
34 // ---------------------
35 
36 class DTCCBId {
37 
38  public:
39 
40  DTCCBId();
41  ~DTCCBId();
42 
43  int wheelId;
44  int stationId;
45  int sectorId;
46 
47 };
48 
49 
50 class DTConfigKey {
51 
52  public:
53 
54  DTConfigKey();
55  ~DTConfigKey();
56 
57  int confType;
58  int confKey;
59 
60 };
61 
62 
63 class DTCCBConfig {
64 
65  public:
66 
69  DTCCBConfig();
71 
74  virtual ~DTCCBConfig();
75 
78  std::vector<DTConfigKey> fullKey() const;
80  int stamp() const;
81  int configKey( int wheelId,
82  int stationId,
83  int sectorId,
84  std::vector<int>& confKey ) const;
85  int configKey( const DTChamberId& id,
86  std::vector<int>& confKey ) const;
87  typedef std::vector< std::pair< DTCCBId,std::vector<int> > > ccb_config_map;
88  typedef ccb_config_map::const_iterator ccb_config_iterator;
90 
92  const
93  std::string& version() const;
95 
97  void clear();
98 
99  void setFullKey( const std::vector<DTConfigKey>& );
100  void setStamp( int s );
101 
102  int setConfigKey( int wheelId,
103  int stationId,
104  int sectorId,
105  const std::vector<int>& confKey );
106  int setConfigKey( const DTChamberId& id,
107  const std::vector<int>& confKey );
108 
109  int appendConfigKey( int wheelId,
110  int stationId,
111  int sectorId,
112  const std::vector<int>& confKey );
113  int appendConfigKey( const DTChamberId& id,
114  const std::vector<int>& confKey );
115 
117  typedef std::vector< std::pair<DTCCBId,int> >::const_iterator
119  const_iterator begin() const;
120  const_iterator end() const;
121 
122  private:
123 
126  std::vector<DTConfigKey> fullConfigKey;
127  std::vector< std::pair<DTCCBId,int> > dataList;
128 
130 
132  void cacheMap() const;
133  void resetMap() const;
134 // std::string mapName() const;
135 
136 };
137 
138 
139 #endif // DTCCBConfig_H
140 
ccb_config_map::const_iterator ccb_config_iterator
Definition: DTCCBConfig.h:88
int wheelId
Definition: DTCCBConfig.h:43
void setStamp(int s)
Definition: DTCCBConfig.cc:197
std::vector< std::pair< DTCCBId, int > > dataList
Definition: DTCCBConfig.h:127
std::vector< DTConfigKey > fullConfigKey
Definition: DTCCBConfig.h:126
const std::string & version() const
access version
Definition: DTCCBConfig.cc:172
int configKey(int wheelId, int stationId, int sectorId, std::vector< int > &confKey) const
Definition: DTCCBConfig.cc:93
const_iterator end() const
Definition: DTCCBConfig.cc:345
void cacheMap() const
read and store full content
Definition: DTCCBConfig.cc:359
ccb_config_map configKeyMap() const
Definition: DTCCBConfig.cc:133
std::vector< std::pair< DTCCBId, int > >::const_iterator const_iterator
Access methods to data.
Definition: DTCCBConfig.h:118
int sectorId
Definition: DTCCBConfig.h:45
int stationId
Definition: DTCCBConfig.h:44
void resetMap() const
Definition: DTCCBConfig.cc:396
std::vector< std::pair< DTCCBId, std::vector< int > > > ccb_config_map
Definition: DTCCBConfig.h:87
std::vector< DTConfigKey > fullKey() const
get content
Definition: DTCCBConfig.cc:83
std::string dataVersion
Definition: DTCCBConfig.h:125
virtual ~DTCCBConfig()
Definition: DTCCBConfig.cc:65
int stamp() const
Definition: DTCCBConfig.cc:88
void clear()
reset content
Definition: DTCCBConfig.cc:182
int setConfigKey(int wheelId, int stationId, int sectorId, const std::vector< int > &confKey)
Definition: DTCCBConfig.cc:202
void setFullKey(const std::vector< DTConfigKey > &)
Definition: DTCCBConfig.cc:192
const_iterator begin() const
Definition: DTCCBConfig.cc:340
DTBufferTree< int, std::vector< int > * > * dBuf
Definition: DTCCBConfig.h:129
int appendConfigKey(int wheelId, int stationId, int sectorId, const std::vector< int > &confKey)
Definition: DTCCBConfig.cc:278