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(DTTtrig const&) = delete;
74  DTTtrig& operator=(DTTtrig const&) = delete;
75  DTTtrig(const std::string& version);
76 
79  ~DTTtrig();
80 
83  int get(int wheelId,
85  int stationId,
86  int sectorId,
87  int slId,
88  float& tTrig,
89  float& tTrms,
90  float& kFact,
91  DTTimeUnits::type unit) const;
92  int get(int wheelId,
93  int stationId,
94  int sectorId,
95  int slId,
96  int layerId,
97  int cellId,
98  float& tTrig,
99  float& tTrms,
100  float& kFact,
101  DTTimeUnits::type unit) const;
102  int get(const DTSuperLayerId& id, float& tTrig, float& tTrms, float& kFact, DTTimeUnits::type unit) const;
103  int get(const DetId& id, float& tTrig, float& tTrms, float& kFact, DTTimeUnits::type unit) const;
104  int get(int wheelId, int stationId, int sectorId, int slId, float& tTrig, DTTimeUnits::type unit) const;
105  int get(int wheelId,
106  int stationId,
107  int sectorId,
108  int slId,
109  int layerId,
110  int cellId,
111  float& tTrig,
112  DTTimeUnits::type unit) const;
113  int get(const DTSuperLayerId& id, float& tTrig, DTTimeUnits::type unit) const;
114  int get(const DetId& id, float& tTrig, DTTimeUnits::type unit) const;
115  float unit() const;
116 
118  const std::string& version() const;
119  std::string& version();
120 
122  void clear();
123 
124  int set(
125  int wheelId, int stationId, int sectorId, int slId, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit);
126  int set(int wheelId,
127  int stationId,
128  int sectorId,
129  int slId,
130  int layerId,
131  int cellId,
132  float tTrig,
133  float tTrms,
134  float kFact,
136  int set(const DTSuperLayerId& id, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit);
137  int set(const DetId& id, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit);
138  void setUnit(float unit);
139 
141  typedef std::vector<std::pair<DTTtrigId, DTTtrigData> >::const_iterator const_iterator;
142  const_iterator begin() const;
143  const_iterator end() const;
144 
145  void initialize();
146 
147 private:
149  float nsPerCount;
150 
151  std::vector<std::pair<DTTtrigId, DTTtrigData> > dataList;
152 
154 
155  std::string mapName() const;
156 
158 };
159 #endif // DTTtrig_H
~DTTtrigId()
Definition: DTTtrig.cc:52
void initialize()
Definition: DTTtrig.cc:260
int wheelId
Definition: DTTtrig.h:46
std::vector< std::pair< DTTtrigId, DTTtrigData > >::const_iterator const_iterator
Access methods to data.
Definition: DTTtrig.h:141
DTTtrigId()
Definition: DTTtrig.cc:43
DTTtrig()
Definition: DTTtrig.cc:34
~DTTtrig()
Definition: DTTtrig.cc:50
~DTTtrigData()
Definition: DTTtrig.cc:54
float nsPerCount
Definition: DTTtrig.h:149
float tTrms
Definition: DTTtrig.h:62
void setUnit(float unit)
Definition: DTTtrig.cc:248
const std::string & version() const
access version
Definition: DTTtrig.cc:162
int stationId
Definition: DTTtrig.h:47
DTTtrigData()
Definition: DTTtrig.cc:45
void clear()
reset content
Definition: DTTtrig.cc:166
int sectorId
Definition: DTTtrig.h:48
float unit() const
Definition: DTTtrig.cc:160
int cellId
Definition: DTTtrig.h:51
const_iterator begin() const
Definition: DTTtrig.cc:250
std::vector< std::pair< DTTtrigId, DTTtrigData > > dataList
Definition: DTTtrig.h:151
float kFact
Definition: DTTtrig.h:63
Definition: DetId.h:17
std::string dataVersion
Definition: DTTtrig.h:148
#define COND_TRANSIENT
Definition: Serializable.h:63
float tTrig
Definition: DTTtrig.h:61
int slId
Definition: DTTtrig.h:49
#define COND_SERIALIZABLE
Definition: Serializable.h:39
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTTtrig.h:153
int layerId
Definition: DTTtrig.h:50
DTTtrig & operator=(DTTtrig const &)=delete
const_iterator end() const
Definition: DTTtrig.cc:252
std::string mapName() const
Definition: DTTtrig.cc:254