CMS 3D CMS Logo

Public Member Functions | Private Attributes

ConfigurableAxis Class Reference

#include <ConfigurableHisto.h>

List of all members.

Public Member Functions

 ConfigurableAxis ()
 ConfigurableAxis (edm::ParameterSet par)
const std::string & Label ()
double Max ()
double Min ()
unsigned int nBin ()
bool variableSize ()
const double * xBins ()

Private Attributes

std::string Label_
double Max_
double Min_
unsigned int nBin_
std::vector< double > vBins_

Detailed Description

Definition at line 17 of file ConfigurableHisto.h.


Constructor & Destructor Documentation

ConfigurableAxis::ConfigurableAxis ( ) [inline]

Definition at line 19 of file ConfigurableHisto.h.

{}
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_.

                                        :
    nBin_(0),Min_(0),Max_(0),Label_(""){
    Label_=par.getParameter<std::string>("Label");

    if (par.exists("nBins")){
      nBin_=par.getParameter<unsigned int>("nBins");
      Min_=par.getParameter<double>("Min");
      Max_=par.getParameter<double>("Max");
    }else{
      if (par.exists("vBins"))
        vBins_=par.getParameter<std::vector<double> >("vBins");
      else{
        Min_=par.getParameter<double>("Min");
        Max_=par.getParameter<double>("Max");
      }
    }
  }

Member Function Documentation

const std::string& ConfigurableAxis::Label ( ) [inline]

Definition at line 41 of file ConfigurableHisto.h.

References Label_.

{ return Label_;}
double ConfigurableAxis::Max ( ) [inline]

Definition at line 40 of file ConfigurableHisto.h.

References Max_, variableSize(), and vBins_.

Referenced by ConfigurableHisto::book().

{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().

{if (variableSize()) return vBins_.front(); else return Min_;}
unsigned int ConfigurableAxis::nBin ( ) [inline]

Definition at line 38 of file ConfigurableHisto.h.

References nBin_, variableSize(), and vBins_.

Referenced by ConfigurableHisto::book().

{if (variableSize()) return vBins_.size()-1;else return nBin_;}
bool ConfigurableAxis::variableSize ( ) [inline]

Definition at line 37 of file ConfigurableHisto.h.

References vBins_.

Referenced by Max(), Min(), and nBin().

{return vBins_.size()!=0;}
const double* ConfigurableAxis::xBins ( ) [inline]

Definition at line 42 of file ConfigurableHisto.h.

References vBins_.

Referenced by ConfigurableHisto::book().

{ if (vBins_.size()!=0) return &(vBins_.front()); else return 0;}

Member Data Documentation

std::string ConfigurableAxis::Label_ [private]

Definition at line 49 of file ConfigurableHisto.h.

Referenced by ConfigurableAxis(), and Label().

double ConfigurableAxis::Max_ [private]

Definition at line 48 of file ConfigurableHisto.h.

Referenced by ConfigurableAxis(), and Max().

double ConfigurableAxis::Min_ [private]

Definition at line 47 of file ConfigurableHisto.h.

Referenced by ConfigurableAxis(), and Min().

unsigned int ConfigurableAxis::nBin_ [private]

Definition at line 46 of file ConfigurableHisto.h.

Referenced by ConfigurableAxis(), and nBin().

std::vector<double> ConfigurableAxis::vBins_ [private]

Definition at line 45 of file ConfigurableHisto.h.

Referenced by ConfigurableAxis(), Max(), Min(), nBin(), variableSize(), and xBins().