CMS 3D CMS Logo

L1TUtmCondition.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_L1TUtmCondition_hh
11 #define tmEventSetup_L1TUtmCondition_hh
12 
16 
17 #include "tmEventSetup/esCondition.hh"
18 
19 #include <string>
20 #include <vector>
21 
26 public:
27  L1TUtmCondition() : name_(), type_(-9999), objects_(), cuts_(), version(0) {}
29  std::string name, int type, std::vector<L1TUtmObject> objects, std::vector<L1TUtmCut> cuts, unsigned int vers)
30  : name_(name), type_(type), objects_(objects), cuts_(cuts), version(vers) {}
31 
32  L1TUtmCondition(const tmeventsetup::esCondition& esCond)
33  : name_(esCond.getName()), type_(esCond.getType()), version(0) {
34  objects_.reserve(esCond.getObjects().size());
35  for (auto it = esCond.getObjects().begin(); it != esCond.getObjects().end(); ++it)
36  objects_.emplace_back(L1TUtmObject(*it));
37  cuts_.reserve(esCond.getCuts().size());
38  for (auto it = esCond.getCuts().begin(); it != esCond.getCuts().end(); ++it)
39  cuts_.emplace_back(L1TUtmCut(*it));
40  };
41 
42  virtual ~L1TUtmCondition() = default;
43 
45  void setName(const std::string& x) { name_ = x; };
46 
48  void setType(const int x) { type_ = x; };
49 
51  const std::string& getName() const { return name_; };
52 
54  const int getType() const { return type_; };
55 
57  const std::vector<L1TUtmObject>& getObjects() const { return objects_; };
58 
60  const std::vector<L1TUtmCut>& getCuts() const { return cuts_; };
61 
62 protected:
64  int type_;
65  std::vector<L1TUtmObject> objects_;
66  std::vector<L1TUtmCut> cuts_;
67  unsigned int version;
69 };
70 
71 #endif // tmEventSetup_L1TUtmCondition_hh
const int getType() const
virtual ~L1TUtmCondition()=default
const std::vector< L1TUtmObject > & getObjects() const
std::string name_
void setName(const std::string &x)
std::vector< L1TUtmObject > objects_
unsigned int version
const std::string & getName() const
std::vector< L1TUtmCut > cuts_
const std::vector< L1TUtmCut > & getCuts() const
#define COND_SERIALIZABLE
Definition: Serializable.h:39
L1TUtmCondition(const tmeventsetup::esCondition &esCond)
L1TUtmCondition(std::string name, int type, std::vector< L1TUtmObject > objects, std::vector< L1TUtmCut > cuts, unsigned int vers)
void setType(const int x)