CMS 3D CMS Logo

DTRangeT0.h
Go to the documentation of this file.
1 #ifndef DTRangeT0_H
2 #define DTRangeT0_H
3 
13 //----------------------
14 // Base Class Headers --
15 //----------------------
16 
17 //------------------------------------
18 // Collaborating Class Declarations --
19 //------------------------------------
21 
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 #include <string>
29 #include <vector>
30 #include <utility>
31 
32 template <class Key, class Content>
33 class DTBufferTree;
34 
35 // ---------------------
36 // -- Class Interface --
37 // ---------------------
38 
39 class DTRangeT0Id {
40 public:
41  DTRangeT0Id();
42  ~DTRangeT0Id();
43 
44  int wheelId;
45  int stationId;
46  int sectorId;
47  int slId;
48 
50 };
51 
53 public:
54  DTRangeT0Data();
56 
57  int t0min;
58  int t0max;
59 
61 };
62 
63 class DTRangeT0 {
64 public:
67  DTRangeT0();
68  DTRangeT0(DTRangeT0 const&) = delete;
69  DTRangeT0& operator=(DTRangeT0 const&) = delete;
71 
74  ~DTRangeT0();
75 
78  int slRangeT0(int wheelId, int stationId, int sectorId, int slId, int& t0min, int& t0max) const {
80  return get(wheelId, stationId, sectorId, slId, t0min, t0max);
81  };
82  int slRangeT0(const DTSuperLayerId& id, int& t0min, int& t0max) const { return get(id, t0min, t0max); };
83  int get(int wheelId, int stationId, int sectorId, int slId, int& t0min, int& t0max) const;
84  int get(const DTSuperLayerId& id, int& t0min, int& t0max) const;
85 
87  const std::string& version() const;
89 
91  void clear();
92 
93  int setSLRangeT0(int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max) {
94  return set(wheelId, stationId, sectorId, slId, t0min, t0max);
95  };
96  int setSLRangeT0(const DTSuperLayerId& id, int t0min, int t0max) { return set(id, t0min, t0max); };
97  int set(int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max);
98  int set(const DTSuperLayerId& id, int t0min, int t0max);
99 
101  typedef std::vector<std::pair<DTRangeT0Id, DTRangeT0Data> >::const_iterator const_iterator;
102  const_iterator begin() const;
103  const_iterator end() const;
104 
105  void initialize();
106 
107 private:
109 
110  std::vector<std::pair<DTRangeT0Id, DTRangeT0Data> > dataList;
111 
113 
115  std::string mapName() const;
116 
118 };
119 #endif // DTRangeT0_H
int wheelId
Definition: DTRangeT0.h:44
const_iterator begin() const
Definition: DTRangeT0.cc:126
DTRangeT0 & operator=(DTRangeT0 const &)=delete
std::string dataVersion
Definition: DTRangeT0.h:108
std::string mapName() const
read and store full content
Definition: DTRangeT0.cc:130
const std::string & version() const
access version
Definition: DTRangeT0.cc:79
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > >::const_iterator const_iterator
Access methods to data.
Definition: DTRangeT0.h:101
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:110
int setSLRangeT0(int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max)
Definition: DTRangeT0.h:93
void initialize()
Definition: DTRangeT0.cc:136
int setSLRangeT0(const DTSuperLayerId &id, int t0min, int t0max)
Definition: DTRangeT0.h:96
int slRangeT0(const DTSuperLayerId &id, int &t0min, int &t0max) const
Definition: DTRangeT0.h:82
~DTRangeT0()
Definition: DTRangeT0.cc:44
int slRangeT0(int wheelId, int stationId, int sectorId, int slId, int &t0min, int &t0max) const
get content
Definition: DTRangeT0.h:79
#define COND_TRANSIENT
Definition: Serializable.h:63
void clear()
reset content
Definition: DTRangeT0.cc:83
const_iterator end() const
Definition: DTRangeT0.cc:128
int sectorId
Definition: DTRangeT0.h:46
#define COND_SERIALIZABLE
Definition: Serializable.h:39
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:112
int stationId
Definition: DTRangeT0.h:45