#include <PhysicsTools/UtilAlgos/interface/ConfigurableHisto.h>
Public Member Functions | |
ConfigurableAxis (edm::ParameterSet par) | |
ConfigurableAxis () | |
const std::string & | Label () |
double | Max () |
double | Min () |
uint | nBin () |
bool | variableSize () |
const double * | xBins () |
Private Attributes | |
std::string | Label_ |
double | Max_ |
double | Min_ |
uint | nBin_ |
std::vector< double > | vBins_ |
Definition at line 17 of file ConfigurableHisto.h.
ConfigurableAxis::ConfigurableAxis | ( | ) | [inline] |
ConfigurableAxis::ConfigurableAxis | ( | edm::ParameterSet | par | ) | [inline] |
Definition at line 20 of file ConfigurableHisto.h.
References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), Label_, Max_, Min_, nBin_, and vBins_.
00020 : 00021 nBin_(0),Min_(0),Max_(0),Label_(""){ 00022 Label_=par.getParameter<std::string>("Label"); 00023 00024 if (par.exists("nBins")){ 00025 nBin_=par.getParameter<uint>("nBins"); 00026 Min_=par.getParameter<double>("Min"); 00027 Max_=par.getParameter<double>("Max"); 00028 }else{ 00029 if (par.exists("vBins")) 00030 vBins_=par.getParameter<std::vector<double> >("vBins"); 00031 else{ 00032 Min_=par.getParameter<double>("Min"); 00033 Max_=par.getParameter<double>("Max"); 00034 } 00035 } 00036 } bool variableSize(){return vBins_.size()!=0;}
const std::string& ConfigurableAxis::Label | ( | ) | [inline] |
double ConfigurableAxis::Max | ( | ) | [inline] |
Definition at line 40 of file ConfigurableHisto.h.
References Max_, variableSize(), and vBins_.
Referenced by ConfigurableHisto::book().
00040 {if (variableSize()) return vBins_.back(); else return Max_;}
double ConfigurableAxis::Min | ( | ) | [inline] |
Definition at line 39 of file ConfigurableHisto.h.
References Min_, variableSize(), and vBins_.
Referenced by ConfigurableHisto::book().
00039 {if (variableSize()) return vBins_.front(); else return Min_;}
uint ConfigurableAxis::nBin | ( | ) | [inline] |
Definition at line 38 of file ConfigurableHisto.h.
References nBin_, variableSize(), and vBins_.
Referenced by ConfigurableHisto::book().
00038 {if (variableSize()) return vBins_.size()-1;else return nBin_;}
bool ConfigurableAxis::variableSize | ( | ) | [inline] |
const double* ConfigurableAxis::xBins | ( | ) | [inline] |
Definition at line 42 of file ConfigurableHisto.h.
References vBins_.
Referenced by ConfigurableHisto::book().
std::string ConfigurableAxis::Label_ [private] |
double ConfigurableAxis::Max_ [private] |
double ConfigurableAxis::Min_ [private] |
uint ConfigurableAxis::nBin_ [private] |
std::vector<double> ConfigurableAxis::vBins_ [private] |
Definition at line 45 of file ConfigurableHisto.h.
Referenced by ConfigurableAxis(), Max(), Min(), nBin(), variableSize(), and xBins().