CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LookupTableRecord.h
Go to the documentation of this file.
1 #ifndef DataFormats_PatCandidates_interface_LookupTableRecord_h
2 #define DataFormats_PatCandidates_interface_LookupTableRecord_h
3 
16 #include <boost/cstdint.hpp>
17 
18 namespace pat {
20  public:
21  LookupTableRecord() : value_(0), error_(0), bin_(0) {}
22  LookupTableRecord(float value, float error, uint16_t bin=0) :
23  value_(value), error_(error), bin_(bin) {}
24  LookupTableRecord(float value, uint16_t bin=0) :
25  value_(value), error_(0), bin_(bin) {}
26  LookupTableRecord(const Measurement1DFloat &meas, uint16_t bin=0) :
27  value_(meas.value()), error_(meas.error()), bin_(bin) {}
28 
29  // Get the stored value
30  float value() const { return value_; }
31  // Get the uncertainty on the stored value (note: it CAN be ZERO)
32  float error() const { return error_; }
33  // Get the bin of the table used to compute this value (if available, otherwise 0)
34  uint16_t bin() const { return bin_; }
35  private:
36  float value_, error_;
37  uint16_t bin_;
38  };
39 }
40 
41 #endif
Class to store the result of a lookup table fetch, e.g. for efficiencies.
LookupTableRecord(const Measurement1DFloat &meas, uint16_t bin=0)
uint16_t bin() const
LookupTableRecord(float value, float error, uint16_t bin=0)
LookupTableRecord(float value, uint16_t bin=0)