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 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
34 #include <atomic>
35 #endif
36 
37 // ---------------------
38 // -- Class Interface --
39 // ---------------------
40 
41 class DTTtrigId {
42 
43  public:
44 
45  DTTtrigId();
46  ~DTTtrigId();
47 
48  int wheelId;
49  int stationId;
50  int sectorId;
51  int slId;
52  int layerId;
53  int cellId;
54 
55 };
56 
57 
58 class DTTtrigData {
59 
60  public:
61 
62  DTTtrigData();
63  ~DTTtrigData();
64 
65  float tTrig;
66  float tTrms;
67  float kFact;
68 
69 };
70 
71 
72 class DTTtrig {
73 
74  public:
75 
78  DTTtrig();
79  DTTtrig( const std::string& version );
80 
83  ~DTTtrig();
84 
87  int get( int wheelId,
89  int stationId,
90  int sectorId,
91  int slId,
92  float& tTrig,
93  float& tTrms,
94  float& kFact,
95  DTTimeUnits::type unit ) const;
96  int get( int wheelId,
97  int stationId,
98  int sectorId,
99  int slId,
100  int layerId,
101  int cellId,
102  float& tTrig,
103  float& tTrms,
104  float& kFact,
105  DTTimeUnits::type unit ) const;
106  int get( const DTSuperLayerId& id,
107  float& tTrig,
108  float& tTrms,
109  float& kFact,
110  DTTimeUnits::type unit ) const;
111  int get( const DetId& id,
112  float& tTrig,
113  float& tTrms,
114  float& kFact,
115  DTTimeUnits::type unit ) const;
116  int get( int wheelId,
117  int stationId,
118  int sectorId,
119  int slId,
120  float& tTrig,
121  DTTimeUnits::type unit ) const;
122  int get( int wheelId,
123  int stationId,
124  int sectorId,
125  int slId,
126  int layerId,
127  int cellId,
128  float& tTrig,
129  DTTimeUnits::type unit ) const;
130  int get( const DTSuperLayerId& id,
131  float& tTrig,
132  DTTimeUnits::type unit ) const;
133  int get( const DetId& id,
134  float& tTrig,
135  DTTimeUnits::type unit ) const;
136  float unit() const;
137 
139  const
140  std::string& version() const;
141  std::string& version();
142 
144  void clear();
145 
146  int set( int wheelId,
147  int stationId,
148  int sectorId,
149  int slId,
150  float tTrig,
151  float tTrms,
152  float kFact,
153  DTTimeUnits::type unit );
154  int set( int wheelId,
155  int stationId,
156  int sectorId,
157  int slId,
158  int layerId,
159  int cellId,
160  float tTrig,
161  float tTrms,
162  float kFact,
163  DTTimeUnits::type unit );
164  int set( const DTSuperLayerId& id,
165  float tTrig,
166  float tTrms,
167  float kFact,
168  DTTimeUnits::type unit );
169  int set( const DetId& id,
170  float tTrig,
171  float tTrms,
172  float kFact,
173  DTTimeUnits::type unit );
174  void setUnit( float unit );
175 
177  typedef std::vector< std::pair<DTTtrigId,
180  const_iterator begin() const;
181  const_iterator end() const;
182 
183  private:
184 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
185  // copy-ctor
186  DTTtrig(const DTTtrig& src) = delete;
187  // copy assignment operator
188  DTTtrig& operator=(const DTTtrig& rhs) = delete;
189 #else
190  // copy-ctor
191  DTTtrig(const DTTtrig& src);
192  // copy assignment operator
193  DTTtrig& operator=(const DTTtrig& rhs);
194 #endif
195 
197  float nsPerCount;
198 
199  std::vector< std::pair<DTTtrigId,DTTtrigData> > dataList;
200 
201 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
202  mutable std::atomic<DTBufferTree<int,int>*> dBuf;
203 #else
204  mutable DTBufferTree<int,int>* dBuf;
205 #endif
206 
208  void cacheMap() const;
209  std::string mapName() const;
210 
211 };
212 
213 
214 #endif // DTTtrig_H
215 
~DTTtrigId()
Definition: DTTtrig.cc:76
int wheelId
Definition: DTTtrig.h:48
int set(int wheelId, int stationId, int sectorId, int slId, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit)
Definition: DTTtrig.cc:261
DTTtrigId()
Definition: DTTtrig.cc:50
DTTtrig()
Definition: DTTtrig.cc:34
~DTTtrig()
Definition: DTTtrig.cc:70
~DTTtrigData()
Definition: DTTtrig.cc:80
DTTtrig & operator=(const DTTtrig &rhs)=delete
float nsPerCount
Definition: DTTtrig.h:197
float tTrms
Definition: DTTtrig.h:66
void setUnit(float unit)
Definition: DTTtrig.cc:371
const std::string & version() const
access version
Definition: DTTtrig.cc:242
int stationId
Definition: DTTtrig.h:49
std::atomic< DTBufferTree< int, int > * > dBuf
Definition: DTTtrig.h:202
std::vector< std::pair< DTTtrigId, DTTtrigData > > dataList
Definition: DTTtrig.h:199
DTTtrigData()
Definition: DTTtrig.cc:60
void clear()
reset content
Definition: DTTtrig.cc:252
std::vector< std::pair< DTTtrigId, DTTtrigData > >::const_iterator const_iterator
Access methods to data.
Definition: DTTtrig.h:179
int sectorId
Definition: DTTtrig.h:50
int cellId
Definition: DTTtrig.h:53
std::string mapName() const
Definition: DTTtrig.cc:386
float unit() const
Definition: DTTtrig.cc:236
void cacheMap() const
read and store full content
Definition: DTTtrig.cc:393
float kFact
Definition: DTTtrig.h:67
Definition: DetId.h:18
std::string dataVersion
Definition: DTTtrig.h:196
float tTrig
Definition: DTTtrig.h:65
int slId
Definition: DTTtrig.h:51
int layerId
Definition: DTTtrig.h:52
const_iterator begin() const
Definition: DTTtrig.cc:376
const_iterator end() const
Definition: DTTtrig.cc:381