CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DataFormats/PatCandidates/interface/LookupTableRecord.h

Go to the documentation of this file.
00001 #ifndef DataFormats_PatCandidates_interface_LookupTableRecord_h
00002 #define DataFormats_PatCandidates_interface_LookupTableRecord_h
00003 
00016 #include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1DFloat.h"
00017 #include <boost/cstdint.hpp>
00018 
00019 namespace pat {
00020     class LookupTableRecord {
00021         public:
00022             LookupTableRecord() : value_(0), error_(0), bin_(0) {}
00023             LookupTableRecord(float value, float error, uint16_t bin=0) :
00024                 value_(value), error_(error), bin_(bin) {}
00025             LookupTableRecord(float value, uint16_t bin=0) :
00026                 value_(value), error_(0), bin_(bin) {}
00027             LookupTableRecord(const Measurement1DFloat &meas, uint16_t bin=0) :
00028                 value_(meas.value()), error_(meas.error()), bin_(bin) {}
00029 
00030             // Get the stored value
00031             float    value() const { return value_; }
00032             // Get the uncertainty on the stored value (note: it CAN be ZERO)
00033             float    error() const { return error_; }
00034             // Get the bin of the table used to compute this value (if available, otherwise 0)
00035             uint16_t bin()   const { return bin_; }
00036         private:
00037             float    value_, error_;
00038             uint16_t bin_;
00039     };
00040 }
00041 
00042 #endif