CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTtrig.h
Go to the documentation of this file.
1 #ifndef DTTtrig_H
2 #define DTTtrig_H
3 
15 //----------------------
16 // Base Class Headers --
17 //----------------------
18 
19 
20 //------------------------------------
21 // Collaborating Class Declarations --
22 //------------------------------------
27 
28 //---------------
29 // C++ Headers --
30 //---------------
31 #include <string>
32 #include <vector>
33 
34 // ---------------------
35 // -- Class Interface --
36 // ---------------------
37 
38 class DTTtrigId {
39 
40  public:
41 
42  DTTtrigId();
43  ~DTTtrigId();
44 
45  int wheelId;
46  int stationId;
47  int sectorId;
48  int slId;
49  int layerId;
50  int cellId;
51 
52 };
53 
54 
55 class DTTtrigData {
56 
57  public:
58 
59  DTTtrigData();
60  ~DTTtrigData();
61 
62  float tTrig;
63  float tTrms;
64  float kFact;
65 
66 };
67 
68 
69 class DTTtrig {
70 
71  public:
72 
75  DTTtrig();
76  DTTtrig( const std::string& version );
77 
80  ~DTTtrig();
81 
84  int get( int wheelId,
86  int stationId,
87  int sectorId,
88  int slId,
89  float& tTrig,
90  float& tTrms,
91  float& kFact,
92  DTTimeUnits::type unit ) const;
93  int get( int wheelId,
94  int stationId,
95  int sectorId,
96  int slId,
97  int layerId,
98  int cellId,
99  float& tTrig,
100  float& tTrms,
101  float& kFact,
102  DTTimeUnits::type unit ) const;
103  int get( const DTSuperLayerId& id,
104  float& tTrig,
105  float& tTrms,
106  float& kFact,
107  DTTimeUnits::type unit ) const;
108  int get( const DetId& id,
109  float& tTrig,
110  float& tTrms,
111  float& kFact,
112  DTTimeUnits::type unit ) const;
113  int get( int wheelId,
114  int stationId,
115  int sectorId,
116  int slId,
117  float& tTrig,
118  DTTimeUnits::type unit ) const;
119  int get( int wheelId,
120  int stationId,
121  int sectorId,
122  int slId,
123  int layerId,
124  int cellId,
125  float& tTrig,
126  DTTimeUnits::type unit ) const;
127  int get( const DTSuperLayerId& id,
128  float& tTrig,
129  DTTimeUnits::type unit ) const;
130  int get( const DetId& id,
131  float& tTrig,
132  DTTimeUnits::type unit ) const;
133  float unit() const;
134 
136  const
137  std::string& version() const;
138  std::string& version();
139 
141  void clear();
142 
143  int set( int wheelId,
144  int stationId,
145  int sectorId,
146  int slId,
147  float tTrig,
148  float tTrms,
149  float kFact,
150  DTTimeUnits::type unit );
151  int set( int wheelId,
152  int stationId,
153  int sectorId,
154  int slId,
155  int layerId,
156  int cellId,
157  float tTrig,
158  float tTrms,
159  float kFact,
160  DTTimeUnits::type unit );
161  int set( const DTSuperLayerId& id,
162  float tTrig,
163  float tTrms,
164  float kFact,
165  DTTimeUnits::type unit );
166  int set( const DetId& id,
167  float tTrig,
168  float tTrms,
169  float kFact,
170  DTTimeUnits::type unit );
171  void setUnit( float unit );
172 
174  typedef std::vector< std::pair<DTTtrigId,
177  const_iterator begin() const;
178  const_iterator end() const;
179 
180  private:
181 
182  std::string dataVersion;
183  float nsPerCount;
184 
185  std::vector< std::pair<DTTtrigId,DTTtrigData> > dataList;
186 
188 
190  void cacheMap() const;
191  std::string mapName() const;
192 
193 };
194 
195 
196 #endif // DTTtrig_H
197 
~DTTtrigId()
Definition: DTTtrig.cc:76
int wheelId
Definition: DTTtrig.h:45
int set(int wheelId, int stationId, int sectorId, int slId, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit)
Definition: DTTtrig.cc:262
DTTtrigId()
Definition: DTTtrig.cc:50
DTTtrig()
Definition: DTTtrig.cc:34
~DTTtrig()
Definition: DTTtrig.cc:70
~DTTtrigData()
Definition: DTTtrig.cc:80
float nsPerCount
Definition: DTTtrig.h:183
float tTrms
Definition: DTTtrig.h:63
void setUnit(float unit)
Definition: DTTtrig.cc:372
const std::string & version() const
access version
Definition: DTTtrig.cc:243
int stationId
Definition: DTTtrig.h:46
std::vector< std::pair< DTTtrigId, DTTtrigData > > dataList
Definition: DTTtrig.h:185
DTTtrigData()
Definition: DTTtrig.cc:60
void clear()
reset content
Definition: DTTtrig.cc:253
std::vector< std::pair< DTTtrigId, DTTtrigData > >::const_iterator const_iterator
Access methods to data.
Definition: DTTtrig.h:176
int sectorId
Definition: DTTtrig.h:47
DTBufferTree< int, int > * dBuf
Definition: DTTtrig.h:187
int cellId
Definition: DTTtrig.h:50
std::string mapName() const
Definition: DTTtrig.cc:387
float unit() const
Definition: DTTtrig.cc:237
void cacheMap() const
read and store full content
Definition: DTTtrig.cc:394
float kFact
Definition: DTTtrig.h:64
Definition: DetId.h:20
std::string dataVersion
Definition: DTTtrig.h:182
float tTrig
Definition: DTTtrig.h:62
int slId
Definition: DTTtrig.h:48
int layerId
Definition: DTTtrig.h:49
const_iterator begin() const
Definition: DTTtrig.cc:377
const_iterator end() const
Definition: DTTtrig.cc:382