CMS 3D CMS Logo

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 // Collaborating Class Declarations --
19 //------------------------------------
21 
27 
28 //---------------
29 // C++ Headers --
30 //---------------
31 #include <string>
32 #include <vector>
33 #include <utility>
34 
35 template <class Key, class Content>
36 class DTBufferTree;
37 
38 // ---------------------
39 // -- Class Interface --
40 // ---------------------
41 
42 class DTMtimeId {
43 public:
44  DTMtimeId();
45  ~DTMtimeId();
46 
47  int wheelId;
48  int stationId;
49  int sectorId;
50  int slId;
51  int layerId;
52  int cellId;
53 
55 };
56 
57 class DTMtimeData {
58 public:
59  DTMtimeData();
60  ~DTMtimeData();
61 
62  float mTime;
63  float mTrms;
64 
66 };
67 
68 class DTMtime {
69 public:
72  DTMtime();
73  DTMtime(const std::string& version);
74 
77  ~DTMtime();
78 
81  int slMtime(
83  int wheelId, int stationId, int sectorId, int slId, float& mTime, float& mTrms, DTTimeUnits::type unit) const {
84  return get(wheelId, stationId, sectorId, slId, 0, 0, mTime, mTrms, unit);
85  };
86  int slMtime(int wheelId,
87  int stationId,
88  int sectorId,
89  int slId,
90  int layerId,
91  int cellId,
92  float& mTime,
93  float& mTrms,
94  DTTimeUnits::type unit) const {
95  return get(wheelId, stationId, sectorId, slId, layerId, cellId, mTime, mTrms, unit);
96  };
97  int slMtime(const DTSuperLayerId& id, float& mTime, float& mTrms, DTTimeUnits::type unit) const {
98  return get(id, mTime, mTrms, unit);
99  };
100  int slMtime(const DetId& id, float& mTime, float& mTrms, DTTimeUnits::type unit) const {
101  return get(id, mTime, mTrms, unit);
102  };
103  int get(int wheelId, int stationId, int sectorId, int slId, float& mTime, float& mTrms, DTTimeUnits::type unit) const;
104  int get(
105  int wheelId, int stationId, int sectorId, int slId, float& mTime, float& mTrms, DTVelocityUnits::type unit) const;
106  int get(int wheelId,
107  int stationId,
108  int sectorId,
109  int slId,
110  int layerId,
111  int cellId,
112  float& mTime,
113  float& mTrms,
114  DTTimeUnits::type unit) const;
115  int get(int wheelId,
116  int stationId,
117  int sectorId,
118  int slId,
119  int layerId,
120  int cellId,
121  float& mTime,
122  float& mTrms,
124  int get(const DTSuperLayerId& id, float& mTime, float& mTrms, DTTimeUnits::type unit) const;
125  int get(const DTSuperLayerId& id, float& mTime, float& mTrms, DTVelocityUnits::type unit) const;
126  int get(const DetId& id, float& mTime, float& mTrms, DTTimeUnits::type unit) const;
127  int get(const DetId& id, float& mTime, float& mTrms, DTVelocityUnits::type unit) const;
128  float unit() const;
129 
131  const std::string& version() const;
132  std::string& version();
133 
135  void clear();
136 
137  int setSLMtime(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit) {
138  return set(wheelId, stationId, sectorId, slId, 0, 0, mTime, mTrms, unit);
139  };
140  int setSLMtime(int wheelId,
141  int stationId,
142  int sectorId,
143  int slId,
144  int layerId,
145  int cellId,
146  float mTime,
147  float mTrms,
149  return set(wheelId, stationId, sectorId, slId, layerId, cellId, mTime, mTrms, unit);
150  };
151  int setSLMtime(const DTSuperLayerId& id, float mTime, float mTrms, DTTimeUnits::type unit) {
152  return set(id, mTime, mTrms, unit);
153  };
154  int setSLMtime(const DetId& id, float mTime, float mTrms, DTTimeUnits::type unit) {
155  return set(id, mTime, mTrms, unit);
156  };
157  int set(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit);
158  int set(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTVelocityUnits::type unit);
159  int set(int wheelId,
160  int stationId,
161  int sectorId,
162  int slId,
163  int layerId,
164  int cellId,
165  float mTime,
166  float mTrms,
168  int set(int wheelId,
169  int stationId,
170  int sectorId,
171  int slId,
172  int layerId,
173  int cellId,
174  float mTime,
175  float mTrms,
177  int set(const DTSuperLayerId& id, float mTime, float mTrms, DTTimeUnits::type unit);
178  int set(const DTSuperLayerId& id, float mTime, float mTrms, DTVelocityUnits::type unit);
179  int set(const DetId& id, float mTime, float mTrms, DTTimeUnits::type unit);
180  int set(const DetId& id, float mTime, float mTrms, DTVelocityUnits::type unit);
181  void setUnit(float unit);
182 
184  typedef std::vector<std::pair<DTMtimeId, DTMtimeData> >::const_iterator const_iterator;
185  const_iterator begin() const;
186  const_iterator end() const;
187 
188  void initialize();
189 
190 private:
191  DTMtime(DTMtime const&) = delete;
192  DTMtime& operator=(DTMtime const&) = delete;
193 
195  float nsPerCount;
196 
197  std::vector<std::pair<DTMtimeId, DTMtimeData> > dataList;
198 
200 
202  std::string mapName() const;
203 
205 };
206 #endif // DTMtime_H
DTVelocityUnits.h
ConstRespectingPtr.h
DTSuperLayerId
Definition: DTSuperLayerId.h:12
DTMtimeData::~DTMtimeData
~DTMtimeData()
Definition: DTMtime.cc:51
DTMtime::mapName
std::string mapName() const
read and store full content
Definition: DTMtime.cc:288
DTMtime::~DTMtime
~DTMtime()
Definition: DTMtime.cc:47
DTMtime::initialize
void initialize()
Definition: DTMtime.cc:294
DTMtime::slMtime
int slMtime(const DetId &id, float &mTime, float &mTrms, DTTimeUnits::type unit) const
Definition: DTMtime.h:100
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
COND_TRANSIENT
#define COND_TRANSIENT
Definition: Serializable.h:63
DTMtime::DTMtime
DTMtime()
Definition: DTMtime.cc:31
DTMtime::setSLMtime
int setSLMtime(const DTSuperLayerId &id, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.h:151
DTMtime
Definition: DTMtime.h:68
DTMtime::set
int set(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.cc:168
DTMtimeId::wheelId
int wheelId
Definition: DTMtime.h:47
DTVelocityUnits::type
type
Definition: DTVelocityUnits.h:32
DTMtime::end
const_iterator end() const
Definition: DTMtime.cc:286
DetId
Definition: DetId.h:17
DTMtime::slMtime
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:86
DTMtimeId::DTMtimeId
DTMtimeId()
Definition: DTMtime.cc:40
DTMtime::operator=
DTMtime & operator=(DTMtime const &)=delete
DTMtime::clear
void clear()
reset content
Definition: DTMtime.cc:162
DTMtimeData
Definition: DTMtime.h:57
DTMtime::setUnit
void setUnit(float unit)
Definition: DTMtime.cc:282
DTMtime::dataList
std::vector< std::pair< DTMtimeId, DTMtimeData > > dataList
Definition: DTMtime.h:197
DTMtimeId::stationId
int stationId
Definition: DTMtime.h:48
DTMtimeId::layerId
int layerId
Definition: DTMtime.h:51
DTMtimeId::cellId
int cellId
Definition: DTMtime.h:52
DTTimeUnits::type
type
Definition: DTTimeUnits.h:32
DTMtime::nsPerCount
float nsPerCount
Definition: DTMtime.h:195
DTMtime::slMtime
int slMtime(const DTSuperLayerId &id, float &mTime, float &mTrms, DTTimeUnits::type unit) const
Definition: DTMtime.h:97
DTMtimeData::DTMtimeData
DTMtimeData()
Definition: DTMtime.cc:42
DTMtime::setSLMtime
int setSLMtime(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.h:140
DTMtime::version
const std::string & version() const
access version
Definition: DTMtime.cc:158
Serializable.h
DTBufferTree
Definition: DTBufferTree.h:42
DTMtime::begin
const_iterator begin() const
Definition: DTMtime.cc:284
DTMtimeId::slId
int slId
Definition: DTMtime.h:50
DTMtime::slMtime
int slMtime(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
get content
Definition: DTMtime.h:82
DTMtimeId::sectorId
int sectorId
Definition: DTMtime.h:49
DTMtime::setSLMtime
int setSLMtime(const DetId &id, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.h:154
edm::ConstRespectingPtr
Definition: ConstRespectingPtr.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTMtime::setSLMtime
int setSLMtime(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.h:137
DTMtimeData::mTrms
float mTrms
Definition: DTMtime.h:63
DTMtime::dataVersion
std::string dataVersion
Definition: DTMtime.h:194
DTTimeUnits.h
DTWireId.h
DTMtimeId::~DTMtimeId
~DTMtimeId()
Definition: DTMtime.cc:49
DTMtime::const_iterator
std::vector< std::pair< DTMtimeId, DTMtimeData > >::const_iterator const_iterator
Access methods to data.
Definition: DTMtime.h:184
DTMtimeData::mTime
float mTime
Definition: DTMtime.h:62
DTMtime::unit
float unit() const
Definition: DTMtime.cc:156
DTMtimeId
Definition: DTMtime.h:42
DTSuperLayerId.h
DTMtime::dBuf
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTMtime.h:199
DTMtime::get
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
Definition: DTMtime.cc:56