CMS 3D CMS Logo

L1TUtmObject.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_L1TUtmObject_hh
11 #define tmEventSetup_L1TUtmObject_hh
12 
15 
16 #include "tmEventSetup/esObject.hh"
17 
18 #include <limits>
19 #include <string>
20 #include <vector>
21 
25 class L1TUtmObject {
26 public:
28  : name_(),
29  type_(),
31  bx_offset_(),
32  threshold_(),
34  ext_channel_id_(std::numeric_limits<unsigned int>::max()),
35  cuts_(),
36  version(0){};
38  int type,
39  int comparison_operator,
40  int bx_offset,
41  double threshold,
42  std::string ext_signal_name,
43  unsigned int ext_channel_id,
44  std::vector<L1TUtmCut> cuts,
45  unsigned int vers)
46  : name_(name),
47  type_(type),
48  comparison_operator_(comparison_operator),
49  bx_offset_(bx_offset),
51  ext_signal_name_(ext_signal_name),
52  ext_channel_id_(ext_channel_id),
53  cuts_(cuts),
54  version(vers){};
55 
56  L1TUtmObject(const tmeventsetup::esObject& esObj)
57  : name_(esObj.getName()),
58  type_(esObj.getType()),
60  bx_offset_(esObj.getBxOffset()),
61  threshold_(esObj.getThreshold()),
64  version(0) {
65  cuts_.reserve(esObj.getCuts().size());
66  for (auto it = esObj.getCuts().begin(); it != esObj.getCuts().end(); ++it)
67  cuts_.emplace_back(L1TUtmCut(*it));
68  };
69 
70  virtual ~L1TUtmObject() = default;
71 
73  void setName(const std::string& x) { name_ = x; };
74 
76  void setType(const int x) { type_ = x; };
77 
80 
82  void setBxOffset(const int x) { bx_offset_ = x; };
83 
85  void setThreshold(double x) { threshold_ = x; };
86 
89 
91  void setExternalChannelId(const unsigned int x) { ext_channel_id_ = x; };
92 
94  void setCuts(const std::vector<L1TUtmCut>& x) { cuts_ = x; };
95 
97  const std::string& getName() const { return name_; };
98 
100  const int getType() const { return type_; };
101 
103  const int getComparisonOperator() const { return comparison_operator_; };
104 
106  const int getBxOffset() const { return bx_offset_; };
107 
109  const double getThreshold() const { return threshold_; };
110 
113 
115  const unsigned int getExternalChannelId() const { return ext_channel_id_; };
116 
118  const std::vector<L1TUtmCut>& getCuts() const { return cuts_; };
119 
120 protected:
122  int type_;
125  double threshold_;
127  unsigned int ext_channel_id_;
128  std::vector<L1TUtmCut> cuts_;
129  unsigned int version;
131 };
132 
133 #endif // tmEventSetup_L1TUtmObject_hh
const std::vector< L1TUtmCut > & getCuts() const
Definition: L1TUtmObject.h:118
void setComparisonOperator(const int x)
Definition: L1TUtmObject.h:79
void setBxOffset(const int x)
Definition: L1TUtmObject.h:82
std::vector< L1TUtmCut > cuts_
Definition: L1TUtmObject.h:128
void setType(const int x)
Definition: L1TUtmObject.h:76
void setCuts(const std::vector< L1TUtmCut > &x)
Definition: L1TUtmObject.h:94
const int getComparisonOperator() const
Definition: L1TUtmObject.h:103
const std::string & getName() const
Definition: L1TUtmObject.h:97
void setExternalChannelId(const unsigned int x)
Definition: L1TUtmObject.h:91
const unsigned int getExternalChannelId() const
Definition: L1TUtmObject.h:115
void setThreshold(double x)
Definition: L1TUtmObject.h:85
const int getBxOffset() const
Definition: L1TUtmObject.h:106
const int getType() const
Definition: L1TUtmObject.h:100
L1TUtmObject(std::string name, int type, int comparison_operator, int bx_offset, double threshold, std::string ext_signal_name, unsigned int ext_channel_id, std::vector< L1TUtmCut > cuts, unsigned int vers)
Definition: L1TUtmObject.h:37
const double getThreshold() const
Definition: L1TUtmObject.h:109
void setExternalSignalName(const std::string &x)
Definition: L1TUtmObject.h:88
int comparison_operator_
Definition: L1TUtmObject.h:123
L1TUtmObject(const tmeventsetup::esObject &esObj)
Definition: L1TUtmObject.h:56
void setName(const std::string &x)
Definition: L1TUtmObject.h:73
#define COND_SERIALIZABLE
Definition: Serializable.h:39
virtual ~L1TUtmObject()=default
std::string ext_signal_name_
Definition: L1TUtmObject.h:126
double threshold_
Definition: L1TUtmObject.h:125
unsigned int version
Definition: L1TUtmObject.h:129
std::string name_
Definition: L1TUtmObject.h:118
const std::string & getExternalSignalName() const
Definition: L1TUtmObject.h:112
unsigned int ext_channel_id_
Definition: L1TUtmObject.h:127