File indexing completed on 2024-09-12 04:16:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef tmEventSetup_L1TUtmCut_hh
0011 #define tmEventSetup_L1TUtmCut_hh
0012
0013 #include "CondFormats/L1TObjects/interface/L1TUtmCutValue.h"
0014 #include "CondFormats/Serialization/interface/Serializable.h"
0015
0016 #include "tmEventSetup/esCut.hh"
0017
0018 #include <string>
0019
0020
0021
0022
0023 class L1TUtmCut {
0024 public:
0025 L1TUtmCut() : name_(), object_type_(), cut_type_(), minimum_(), maximum_(), data_(), key_(), version(0) {}
0026 L1TUtmCut(std::string name,
0027 int object_type,
0028 int cut_type,
0029 L1TUtmCutValue minimum,
0030 L1TUtmCutValue maximum,
0031 std::string data,
0032 std::string key,
0033 unsigned int vers)
0034 : name_(name),
0035 object_type_(object_type),
0036 cut_type_(cut_type),
0037 minimum_(minimum),
0038 maximum_(maximum),
0039 data_(data),
0040 key_(key),
0041 version(vers) {}
0042
0043 L1TUtmCut(const tmeventsetup::esCut& esC)
0044 : L1TUtmCut(esC.getName(),
0045 esC.getObjectType(),
0046 esC.getCutType(),
0047 L1TUtmCutValue(esC.getMinimum()),
0048 L1TUtmCutValue(esC.getMaximum()),
0049 esC.getData(),
0050 esC.getKey(),
0051 0) {};
0052
0053 virtual ~L1TUtmCut() = default;
0054
0055
0056 void setName(const std::string& name) { name_ = name; };
0057
0058
0059 void setObjectType(const int type) { object_type_ = type; };
0060
0061
0062 void setCutType(const int type) { cut_type_ = type; };
0063
0064
0065 void setMinimumValue(const double value) { minimum_.value = value; };
0066
0067
0068 void setMinimumIndex(const unsigned int index) { minimum_.index = index; };
0069
0070
0071 void setMinimum(const L1TUtmCutValue& minimum) { minimum_ = minimum; };
0072
0073
0074 void setMaximumValue(const double value) { maximum_.value = value; };
0075
0076
0077 void setMaximumIndex(const unsigned int index) { maximum_.index = index; };
0078
0079
0080 void setMaximum(const L1TUtmCutValue& maximum) { maximum_ = maximum; };
0081
0082
0083 void setPrecision(const unsigned int precision) {
0084 setMaximumIndex(precision);
0085 setMinimumIndex(precision);
0086 };
0087
0088
0089 const std::string& getName() const { return name_; };
0090
0091
0092 const int getObjectType() const { return object_type_; };
0093
0094
0095 const int getCutType() const { return cut_type_; };
0096
0097
0098 const L1TUtmCutValue& getMinimum() const { return minimum_; };
0099
0100
0101 const L1TUtmCutValue& getMaximum() const { return maximum_; };
0102
0103
0104 const double getMinimumValue() const { return minimum_.value; };
0105
0106
0107 const double getMaximumValue() const { return maximum_.value; };
0108
0109
0110 const unsigned int getMinimumIndex() const { return minimum_.index; };
0111
0112
0113 const unsigned int getMaximumIndex() const { return maximum_.index; };
0114
0115
0116 const std::string& getData() const { return data_; };
0117
0118
0119 const std::string& getKey() const { return key_; };
0120
0121
0122 const unsigned int getPrecision() const { return getMinimumIndex(); };
0123
0124 protected:
0125 std::string name_;
0126 int object_type_;
0127 int cut_type_;
0128 L1TUtmCutValue minimum_;
0129 L1TUtmCutValue maximum_;
0130 std::string data_;
0131 std::string key_;
0132 unsigned int version;
0133 COND_SERIALIZABLE;
0134 };
0135
0136 #endif