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 
17 #include <boost/cstdint.hpp>
18 
19 namespace pat {
21  public:
22  LookupTableRecord() : value_(0), error_(0), bin_(0) {}
23  LookupTableRecord(float value, float error, uint16_t bin=0) :
24  value_(value), error_(error), bin_(bin) {}
25  LookupTableRecord(float value, uint16_t bin=0) :
26  value_(value), error_(0), bin_(bin) {}
27  LookupTableRecord(const Measurement1DFloat &meas, uint16_t bin=0) :
28  value_(meas.value()), error_(meas.error()), bin_(bin) {}
29 
30  // Get the stored value
31  float value() const { return value_; }
32  // Get the uncertainty on the stored value (note: it CAN be ZERO)
33  float error() const { return error_; }
34  // Get the bin of the table used to compute this value (if available, otherwise 0)
35  uint16_t bin() const { return bin_; }
36  private:
37  float value_, error_;
38  uint16_t bin_;
39  };
40 }
41 
42 #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)