CMS 3D CMS Logo

L1TUtmScale.h
Go to the documentation of this file.
1 //
2 // NOTE: This file was automatically generated from UTM library via import_utm.pl
3 // DIRECT EDITS MIGHT BE LOST.
4 //
10 #ifndef tmEventSetup_L1TUtmScale_hh
11 #define tmEventSetup_L1TUtmScale_hh
12 
15 
16 #include "tmEventSetup/esScale.hh"
17 
18 #include <map>
19 #include <string>
20 #include <vector>
21 
25 class L1TUtmScale {
26 public:
28 
30  int object,
31  int type,
32  double minimum,
33  double maximum,
34  double step,
35  unsigned int n_bits,
36  std::vector<L1TUtmBin> bins,
37  unsigned int vers)
38  : name_(name),
39  object_(object),
40  type_(type),
41  minimum_(minimum),
42  maximum_(maximum),
43  step_(step),
44  n_bits_(n_bits),
45  bins_(bins),
46  version(vers){};
47 
48  L1TUtmScale(const tmeventsetup::esScale& esSc)
49  : name_(esSc.getName()),
50  object_(esSc.getObjectType()),
51  type_(esSc.getScaleType()),
52  minimum_(esSc.getMinimum()),
53  maximum_(esSc.getMaximum()),
54  step_(esSc.getStep()),
55  n_bits_(esSc.getNbits()),
56  version(0) {
57  bins_.reserve(esSc.getBins().size());
58  for (auto it = esSc.getBins().begin(); it != esSc.getBins().end(); ++it)
59  bins_.emplace_back(L1TUtmBin(*it));
60  };
61 
62  virtual ~L1TUtmScale() = default;
63 
64  operator tmeventsetup::esScale() const {
65  std::vector<tmeventsetup::esBin> bins;
66  bins.reserve(getBins().size());
67  for (const auto& it : getBins())
68  bins.emplace_back(tmeventsetup::esBin(it.hw_index, it.minimum, it.maximum));
69  return tmeventsetup::esScale(
71  }
72 
74  const std::string& getName() const { return name_; };
75 
77  int getObjectType() const { return object_; };
78 
80  int getScaleType() const { return type_; };
81 
83  double getMinimum() const { return minimum_; };
84 
86  double getMaximum() const { return maximum_; };
87 
89  double getStep() const { return step_; };
90 
92  unsigned int getNbits() const { return n_bits_; };
93 
95  const std::vector<L1TUtmBin>& getBins() const { return bins_; };
96 
97 protected:
99  int object_;
100  int type_;
101  double minimum_;
102  double maximum_;
103  double step_;
104  unsigned int n_bits_;
105  std::vector<L1TUtmBin> bins_;
106  unsigned int version;
108 };
109 
110 #endif // tmEventSetup_L1TUtmScale_hh
double getMaximum() const
Definition: L1TUtmScale.h:86
size
Write out results.
double minimum_
Definition: L1TUtmScale.h:101
double maximum_
Definition: L1TUtmScale.h:102
L1TUtmScale(std::string name, int object, int type, double minimum, double maximum, double step, unsigned int n_bits, std::vector< L1TUtmBin > bins, unsigned int vers)
Definition: L1TUtmScale.h:29
std::vector< L1TUtmBin > bins_
Definition: L1TUtmScale.h:105
int getScaleType() const
Definition: L1TUtmScale.h:80
std::string name_
Definition: L1TUtmScale.h:95
unsigned int getNbits() const
Definition: L1TUtmScale.h:92
L1TUtmScale(const tmeventsetup::esScale &esSc)
Definition: L1TUtmScale.h:48
double getMinimum() const
Definition: L1TUtmScale.h:83
double getStep() const
Definition: L1TUtmScale.h:89
virtual ~L1TUtmScale()=default
unsigned int version
Definition: L1TUtmScale.h:106
double step_
Definition: L1TUtmScale.h:103
unsigned int n_bits_
Definition: L1TUtmScale.h:104
#define COND_SERIALIZABLE
Definition: Serializable.h:39
int getObjectType() const
Definition: L1TUtmScale.h:77
const std::string & getName() const
Definition: L1TUtmScale.h:74
step
Definition: StallMonitor.cc:83
const std::vector< L1TUtmBin > & getBins() const
Definition: L1TUtmScale.h:95