test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTMtime.h
Go to the documentation of this file.
1 #ifndef DTMtime_H
2 #define DTMtime_H
3 
13 //----------------------
14 // Base Class Headers --
15 //----------------------
16 
17 
18 //------------------------------------
19 // Collaborating Class Declarations --
20 //------------------------------------
22 
28 
29 //---------------
30 // C++ Headers --
31 //---------------
32 #include <string>
33 #include <vector>
34 #include <utility>
35 
36 template <class Key, class Content> class DTBufferTree;
37 
38 // ---------------------
39 // -- Class Interface --
40 // ---------------------
41 
42 class DTMtimeId {
43 
44  public:
45 
46  DTMtimeId();
47  ~DTMtimeId();
48 
49  int wheelId;
50  int stationId;
51  int sectorId;
52  int slId;
53  int layerId;
54  int cellId;
55 
56 
58 };
59 
60 
61 class DTMtimeData {
62 
63  public:
64 
65  DTMtimeData();
66  ~DTMtimeData();
67 
68  float mTime;
69  float mTrms;
70 
71 
73 };
74 
75 
76 class DTMtime {
77 
78  public:
79 
82  DTMtime();
83  DTMtime( const std::string& version );
84 
87  ~DTMtime();
88 
91  int slMtime( int wheelId,
93  int stationId,
94  int sectorId,
95  int slId,
96  float& mTime,
97  float& mTrms,
98  DTTimeUnits::type unit ) const
99  { return get( wheelId, stationId, sectorId, slId, 0, 0,
100  mTime, mTrms, unit ); };
101  int slMtime( int wheelId,
102  int stationId,
103  int sectorId,
104  int slId,
105  int layerId,
106  int cellId,
107  float& mTime,
108  float& mTrms,
109  DTTimeUnits::type unit ) const
110  { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
111  mTime, mTrms, unit ); };
112  int slMtime( const DTSuperLayerId& id,
113  float& mTime,
114  float& mTrms,
115  DTTimeUnits::type unit ) const
116  { return get( id, mTime, mTrms, unit ); };
117  int slMtime( const DetId& id,
118  float& mTime,
119  float& mTrms,
120  DTTimeUnits::type unit ) const
121  { return get( id, mTime, mTrms, unit ); };
122  int get( int wheelId,
123  int stationId,
124  int sectorId,
125  int slId,
126  float& mTime,
127  float& mTrms,
128  DTTimeUnits::type unit ) const;
129  int get( int wheelId,
130  int stationId,
131  int sectorId,
132  int slId,
133  float& mTime,
134  float& mTrms,
135  DTVelocityUnits::type unit ) const;
136  int get( int wheelId,
137  int stationId,
138  int sectorId,
139  int slId,
140  int layerId,
141  int cellId,
142  float& mTime,
143  float& mTrms,
144  DTTimeUnits::type unit ) const;
145  int get( int wheelId,
146  int stationId,
147  int sectorId,
148  int slId,
149  int layerId,
150  int cellId,
151  float& mTime,
152  float& mTrms,
153  DTVelocityUnits::type unit ) const;
154  int get( const DTSuperLayerId& id,
155  float& mTime,
156  float& mTrms,
157  DTTimeUnits::type unit ) const;
158  int get( const DTSuperLayerId& id,
159  float& mTime,
160  float& mTrms,
161  DTVelocityUnits::type unit ) const;
162  int get( const DetId& id,
163  float& mTime,
164  float& mTrms,
165  DTTimeUnits::type unit ) const;
166  int get( const DetId& id,
167  float& mTime,
168  float& mTrms,
169  DTVelocityUnits::type unit ) const;
170  float unit() const;
171 
173  const
174  std::string& version() const;
175  std::string& version();
176 
178  void clear();
179 
180  int setSLMtime( int wheelId,
181  int stationId,
182  int sectorId,
183  int slId,
184  float mTime,
185  float mTrms,
186  DTTimeUnits::type unit )
187  { return set( wheelId, stationId, sectorId, slId, 0, 0,
188  mTime, mTrms, unit ); };
189  int setSLMtime( int wheelId,
190  int stationId,
191  int sectorId,
192  int slId,
193  int layerId,
194  int cellId,
195  float mTime,
196  float mTrms,
197  DTTimeUnits::type unit )
198  { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
199  mTime, mTrms, unit ); };
200  int setSLMtime( const DTSuperLayerId& id,
201  float mTime,
202  float mTrms,
203  DTTimeUnits::type unit )
204  { return set( id, mTime, mTrms, unit ); };
205  int setSLMtime( const DetId& id,
206  float mTime,
207  float mTrms,
208  DTTimeUnits::type unit )
209  { return set( id, mTime, mTrms, unit ); };
210  int set( int wheelId,
211  int stationId,
212  int sectorId,
213  int slId,
214  float mTime,
215  float mTrms,
216  DTTimeUnits::type unit );
217  int set( int wheelId,
218  int stationId,
219  int sectorId,
220  int slId,
221  float mTime,
222  float mTrms,
223  DTVelocityUnits::type unit );
224  int set( int wheelId,
225  int stationId,
226  int sectorId,
227  int slId,
228  int layerId,
229  int cellId,
230  float mTime,
231  float mTrms,
232  DTTimeUnits::type unit );
233  int set( int wheelId,
234  int stationId,
235  int sectorId,
236  int slId,
237  int layerId,
238  int cellId,
239  float mTime,
240  float mTrms,
241  DTVelocityUnits::type unit );
242  int set( const DTSuperLayerId& id,
243  float mTime,
244  float mTrms,
245  DTTimeUnits::type unit );
246  int set( const DTSuperLayerId& id,
247  float mTime,
248  float mTrms,
249  DTVelocityUnits::type unit );
250  int set( const DetId& id,
251  float mTime,
252  float mTrms,
253  DTTimeUnits::type unit );
254  int set( const DetId& id,
255  float mTime,
256  float mTrms,
257  DTVelocityUnits::type unit );
258  void setUnit( float unit );
259 
261  typedef std::vector< std::pair<DTMtimeId,
264  const_iterator begin() const;
265  const_iterator end() const;
266 
267  void initialize();
268 
269  private:
270 
271  DTMtime(DTMtime const&);
272  DTMtime& operator=(DTMtime const&);
273 
275  float nsPerCount;
276 
277  std::vector< std::pair<DTMtimeId,DTMtimeData> > dataList;
278 
280 
282  std::string mapName() const;
283 
284 
286 };
287 #endif // DTMtime_H
int stationId
Definition: DTMtime.h:50
float nsPerCount
Definition: DTMtime.h:275
~DTMtimeData()
Definition: DTMtime.cc:75
int slMtime(const DetId &id, float &mTime, float &mTrms, DTTimeUnits::type unit) const
Definition: DTMtime.h:117
int set(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.cc:250
int setSLMtime(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.h:180
int wheelId
Definition: DTMtime.h:49
int setSLMtime(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.h:189
void setUnit(float unit)
Definition: DTMtime.cc:409
int setSLMtime(const DTSuperLayerId &id, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.h:200
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTMtime.h:279
int slMtime(const DTSuperLayerId &id, float &mTime, float &mTrms, DTTimeUnits::type unit) const
Definition: DTMtime.h:112
int cellId
Definition: DTMtime.h:54
void initialize()
Definition: DTMtime.cc:431
DTMtimeData()
Definition: DTMtime.cc:58
float mTrms
Definition: DTMtime.h:69
Definition: DetId.h:18
int slMtime(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
get content
Definition: DTMtime.h:92
std::vector< std::pair< DTMtimeId, DTMtimeData > > dataList
Definition: DTMtime.h:277
#define COND_TRANSIENT
Definition: Serializable.h:53
const_iterator begin() const
Definition: DTMtime.cc:414
std::vector< std::pair< DTMtimeId, DTMtimeData > >::const_iterator const_iterator
Access methods to data.
Definition: DTMtime.h:263
DTMtime & operator=(DTMtime const &)
std::string mapName() const
read and store full content
Definition: DTMtime.cc:424
DTMtime()
Definition: DTMtime.cc:32
int sectorId
Definition: DTMtime.h:51
int slId
Definition: DTMtime.h:52
float unit() const
Definition: DTMtime.cc:227
#define COND_SERIALIZABLE
Definition: Serializable.h:30
const std::string & version() const
access version
Definition: DTMtime.cc:233
~DTMtime()
Definition: DTMtime.cc:67
float mTime
Definition: DTMtime.h:68
DTMtimeId()
Definition: DTMtime.cc:48
const_iterator end() const
Definition: DTMtime.cc:419
int layerId
Definition: DTMtime.h:53
~DTMtimeId()
Definition: DTMtime.cc:71
std::string dataVersion
Definition: DTMtime.h:274
void clear()
reset content
Definition: DTMtime.cc:243
int slMtime(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
Definition: DTMtime.h:101
int setSLMtime(const DetId &id, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.h:205