1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
#ifndef DTCCBConfig_H
#define DTCCBConfig_H
/** \class DTCCBConfig
*
* Description:
* Class to hold configuration identifier for chambers
*
* \author Paolo Ronchese INFN Padova
*
*/
//----------------------
// Base Class Headers --
//----------------------
//------------------------------------
// Collaborating Class Declarations --
//------------------------------------
#include "CondFormats/Serialization/interface/Serializable.h"
#include "DataFormats/MuonDetId/interface/DTChamberId.h"
#include "FWCore/Utilities/interface/ConstRespectingPtr.h"
//---------------
// C++ Headers --
//---------------
#include <string>
#include <vector>
#include <utility>
class DTBufferTreeUniquePtr;
// ---------------------
// -- Class Interface --
// ---------------------
class DTCCBId {
public:
DTCCBId();
~DTCCBId();
int wheelId;
int stationId;
int sectorId;
COND_SERIALIZABLE;
};
class DTConfigKey {
public:
DTConfigKey();
~DTConfigKey();
int confType;
int confKey;
COND_SERIALIZABLE;
};
class DTCCBConfig {
public:
DTCCBConfig();
DTCCBConfig(DTCCBConfig const&) = delete;
DTCCBConfig& operator=(DTCCBConfig const&) = delete;
DTCCBConfig(const std::string& version);
virtual ~DTCCBConfig();
std::vector<DTConfigKey> fullKey() const;
int stamp() const;
int configKey(int wheelId, int stationId, int sectorId, std::vector<int>& confKey) const;
int configKey(const DTChamberId& id, std::vector<int>& confKey) const;
typedef std::vector<std::pair<DTCCBId, std::vector<int> > > ccb_config_map;
typedef ccb_config_map::const_iterator ccb_config_iterator;
ccb_config_map configKeyMap() const;
/// access version
const std::string& version() const;
std::string& version();
/// reset content
void clear();
void setFullKey(const std::vector<DTConfigKey>&);
void setStamp(int s);
int setConfigKey(int wheelId, int stationId, int sectorId, const std::vector<int>& confKey);
int setConfigKey(const DTChamberId& id, const std::vector<int>& confKey);
int appendConfigKey(int wheelId, int stationId, int sectorId, const std::vector<int>& confKey);
int appendConfigKey(const DTChamberId& id, const std::vector<int>& confKey);
/// Access methods to data
typedef std::vector<std::pair<DTCCBId, int> >::const_iterator const_iterator;
const_iterator begin() const;
const_iterator end() const;
void initialize();
private:
int timeStamp;
std::string dataVersion;
std::vector<DTConfigKey> fullConfigKey;
std::vector<std::pair<DTCCBId, int> > dataList;
edm::ConstRespectingPtr<DTBufferTreeUniquePtr> dBuf COND_TRANSIENT;
COND_SERIALIZABLE;
};
#endif // DTCCBConfig_H
|