CMS 3D CMS Logo

DTTtrig.h
Go to the documentation of this file.
1 #ifndef DTTtrig_H
2 #define DTTtrig_H
3 
13 //----------------------
14 // Base Class Headers --
15 //----------------------
16 
17 //------------------------------------
18 // Collaborating Class Declarations --
19 //------------------------------------
21 
26 
27 //---------------
28 // C++ Headers --
29 //---------------
30 #include <string>
31 #include <vector>
32 #include <utility>
33 
34 template <class Key, class Content>
35 class DTBufferTree;
36 
37 // ---------------------
38 // -- Class Interface --
39 // ---------------------
40 
41 class DTTtrigId {
42 public:
43  DTTtrigId();
44  ~DTTtrigId();
45 
46  int wheelId;
47  int stationId;
48  int sectorId;
49  int slId;
50  int layerId;
51  int cellId;
52 
54 };
55 
56 class DTTtrigData {
57 public:
58  DTTtrigData();
59  ~DTTtrigData();
60 
61  float tTrig;
62  float tTrms;
63  float kFact;
64 
66 };
67 
68 class DTTtrig {
69 public:
72  DTTtrig();
73  DTTtrig(const std::string& version);
74 
77  ~DTTtrig();
78 
81  int get(int wheelId,
83  int stationId,
84  int sectorId,
85  int slId,
86  float& tTrig,
87  float& tTrms,
88  float& kFact,
89  DTTimeUnits::type unit) const;
90  int get(int wheelId,
91  int stationId,
92  int sectorId,
93  int slId,
94  int layerId,
95  int cellId,
96  float& tTrig,
97  float& tTrms,
98  float& kFact,
99  DTTimeUnits::type unit) const;
100  int get(const DTSuperLayerId& id, float& tTrig, float& tTrms, float& kFact, DTTimeUnits::type unit) const;
101  int get(const DetId& id, float& tTrig, float& tTrms, float& kFact, DTTimeUnits::type unit) const;
102  int get(int wheelId, int stationId, int sectorId, int slId, float& tTrig, DTTimeUnits::type unit) const;
103  int get(int wheelId,
104  int stationId,
105  int sectorId,
106  int slId,
107  int layerId,
108  int cellId,
109  float& tTrig,
110  DTTimeUnits::type unit) const;
111  int get(const DTSuperLayerId& id, float& tTrig, DTTimeUnits::type unit) const;
112  int get(const DetId& id, float& tTrig, DTTimeUnits::type unit) const;
113  float unit() const;
114 
116  const std::string& version() const;
117  std::string& version();
118 
120  void clear();
121 
122  int set(
123  int wheelId, int stationId, int sectorId, int slId, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit);
124  int set(int wheelId,
125  int stationId,
126  int sectorId,
127  int slId,
128  int layerId,
129  int cellId,
130  float tTrig,
131  float tTrms,
132  float kFact,
134  int set(const DTSuperLayerId& id, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit);
135  int set(const DetId& id, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit);
136  void setUnit(float unit);
137 
139  typedef std::vector<std::pair<DTTtrigId, DTTtrigData> >::const_iterator const_iterator;
140  const_iterator begin() const;
141  const_iterator end() const;
142 
143  void initialize();
144 
145 private:
146  DTTtrig(DTTtrig const&) = delete;
147  DTTtrig& operator=(DTTtrig const&) = delete;
148 
150  float nsPerCount;
151 
152  std::vector<std::pair<DTTtrigId, DTTtrigData> > dataList;
153 
155 
156  std::string mapName() const;
157 
159 };
160 #endif // DTTtrig_H
~DTTtrigId()
Definition: DTTtrig.cc:52
static AlgebraicMatrix initialize()
int wheelId
Definition: DTTtrig.h:46
std::vector< std::pair< DTTtrigId, DTTtrigData > >::const_iterator const_iterator
Access methods to data.
Definition: DTTtrig.h:139
DTTtrigId()
Definition: DTTtrig.cc:43
float nsPerCount
Definition: DTTtrig.h:150
float tTrms
Definition: DTTtrig.h:62
int stationId
Definition: DTTtrig.h:47
int sectorId
Definition: DTTtrig.h:48
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:151
int cellId
Definition: DTTtrig.h:51
std::vector< std::pair< DTTtrigId, DTTtrigData > > dataList
Definition: DTTtrig.h:152
#define end
Definition: vmac.h:39
float kFact
Definition: DTTtrig.h:63
Definition: DetId.h:17
std::string dataVersion
Definition: DTTtrig.h:149
#define COND_TRANSIENT
Definition: Serializable.h:62
float tTrig
Definition: DTTtrig.h:61
int slId
Definition: DTTtrig.h:49
#define COND_SERIALIZABLE
Definition: Serializable.h:38
#define begin
Definition: vmac.h:32
int layerId
Definition: DTTtrig.h:50
Basic3DVector unit() const