CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTRangeT0.h
Go to the documentation of this file.
1 #ifndef DTRangeT0_H
2 #define DTRangeT0_H
3 
15 //----------------------
16 // Base Class Headers --
17 //----------------------
18 
19 
20 //------------------------------------
21 // Collaborating Class Declarations --
22 //------------------------------------
25 
26 //---------------
27 // C++ Headers --
28 //---------------
29 #include <string>
30 #include <vector>
31 
32 // ---------------------
33 // -- Class Interface --
34 // ---------------------
35 
36 class DTRangeT0Id {
37 
38  public:
39 
40  DTRangeT0Id();
41  ~DTRangeT0Id();
42 
43  int wheelId;
44  int stationId;
45  int sectorId;
46  int slId;
47 
48 };
49 
50 
52 
53  public:
54 
55  DTRangeT0Data();
57 
58  int t0min;
59  int t0max;
60 
61 };
62 
63 
64 class DTRangeT0 {
65 
66  public:
67 
70  DTRangeT0();
71  DTRangeT0( const std::string& version );
72 
75  ~DTRangeT0();
76 
79  int slRangeT0( int wheelId,
81  int stationId,
82  int sectorId,
83  int slId,
84  int& t0min,
85  int& t0max ) const
86  { return get( wheelId, stationId, sectorId, slId,
87  t0min, t0max ); };
88  int slRangeT0( const DTSuperLayerId& id,
89  int& t0min,
90  int& t0max ) const
91  { return get( id, t0min, t0max ); };
92  int get( int wheelId,
93  int stationId,
94  int sectorId,
95  int slId,
96  int& t0min,
97  int& t0max ) const;
98  int get( const DTSuperLayerId& id,
99  int& t0min,
100  int& t0max ) const;
101 
103  const
104  std::string& version() const;
105  std::string& version();
106 
108  void clear();
109 
110  int setSLRangeT0( int wheelId,
111  int stationId,
112  int sectorId,
113  int slId,
114  int t0min,
115  int t0max )
116  { return set( wheelId, stationId, sectorId, slId, t0min, t0max ); };
117  int setSLRangeT0( const DTSuperLayerId& id,
118  int t0min,
119  int t0max )
120  { return set( id, t0min, t0max ); };
121  int set( int wheelId,
122  int stationId,
123  int sectorId,
124  int slId,
125  int t0min,
126  int t0max );
127  int set( const DTSuperLayerId& id,
128  int t0min,
129  int t0max );
130 
132  typedef std::vector< std::pair<DTRangeT0Id,
135  const_iterator begin() const;
136  const_iterator end() const;
137 
138  private:
139 
140  std::string dataVersion;
141 
142  std::vector< std::pair<DTRangeT0Id,DTRangeT0Data> > dataList;
143 
145 
147  void cacheMap() const;
148  std::string mapName() const;
149 
150 };
151 
152 
153 #endif // DTRangeT0_H
154 
int slRangeT0(int wheelId, int stationId, int sectorId, int slId, int &t0min, int &t0max) const
get content
Definition: DTRangeT0.h:80
std::string mapName() const
Definition: DTRangeT0.cc:224
int wheelId
Definition: DTRangeT0.h:43
const_iterator end() const
Definition: DTRangeT0.cc:219
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > >::const_iterator const_iterator
Access methods to data.
Definition: DTRangeT0.h:134
std::string dataVersion
Definition: DTRangeT0.h:140
const std::string & version() const
access version
Definition: DTRangeT0.cc:133
int setSLRangeT0(int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max)
Definition: DTRangeT0.h:110
int setSLRangeT0(const DTSuperLayerId &id, int t0min, int t0max)
Definition: DTRangeT0.h:117
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:142
~DTRangeT0()
Definition: DTRangeT0.cc:65
void clear()
reset content
Definition: DTRangeT0.cc:143
int slRangeT0(const DTSuperLayerId &id, int &t0min, int &t0max) const
Definition: DTRangeT0.h:88
int sectorId
Definition: DTRangeT0.h:45
void cacheMap() const
read and store full content
Definition: DTRangeT0.cc:231
const_iterator begin() const
Definition: DTRangeT0.cc:214
int set(int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max)
Definition: DTRangeT0.cc:152
int stationId
Definition: DTRangeT0.h:44
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:144