CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
TauDQMHistPlotter::cfgEntryAxisX Struct Reference

Public Member Functions

void applyTo (TH1 *) const
 
 cfgEntryAxisX (const std::string &, const edm::ParameterSet &)
 
void print () const
 

Public Attributes

double maxX_
 
double minX_
 
std::string name_
 
std::string xAxisTitle_
 
double xAxisTitleOffset_
 
double xAxisTitleSize_
 

Detailed Description

Definition at line 43 of file DQMHistPlotter.h.

Constructor & Destructor Documentation

◆ cfgEntryAxisX()

TauDQMHistPlotter::cfgEntryAxisX::cfgEntryAxisX ( const std::string &  name,
const edm::ParameterSet cfg 
)
explicit

Definition at line 191 of file DQMHistPlotter.cc.

191  {
192  name_ = name;
193 
194  minX_ = (cfg.exists("minX")) ? cfg.getParameter<double>("minX") : defaultMinX;
195  maxX_ = (cfg.exists("maxX")) ? cfg.getParameter<double>("maxX") : defaultMaxX;
196  xAxisTitle_ = cfg.getParameter<std::string>("xAxisTitle");
198  (cfg.exists("xAxisTitleOffset")) ? cfg.getParameter<double>("xAxisTitleOffset") : defaultXaxisTitleOffset;
199  xAxisTitleSize_ = (cfg.exists("xAxisTitleSize")) ? cfg.getParameter<double>("xAxisTitleSize") : defaultXaxisTitleSize;
200 
201  if (verbosity)
202  print();
203 }

References looper::cfg, defaultMaxX, defaultMinX, defaultXaxisTitleOffset, defaultXaxisTitleSize, Skims_PA_cff::name, print(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Member Function Documentation

◆ applyTo()

void TauDQMHistPlotter::cfgEntryAxisX::applyTo ( TH1 *  histogram) const

Definition at line 215 of file DQMHistPlotter.cc.

215  {
216  if (histogram) {
217  double xMin = (minX_ != defaultMinX) ? minX_ : histogram->GetXaxis()->GetXmin();
218  double xMax = (maxX_ != defaultMaxX) ? maxX_ : histogram->GetXaxis()->GetXmax();
219  histogram->SetAxisRange(xMin, xMax, "X");
220  histogram->GetXaxis()->SetTitle(xAxisTitle_.data());
221  histogram->GetXaxis()->SetTitleOffset(xAxisTitleOffset_);
222  histogram->GetXaxis()->SetTitleSize(xAxisTitleSize_);
223  }
224 }

References defaultMaxX, defaultMinX, multiplicitycorr_cfi::xMax, and photonAnalyzer_cfi::xMin.

Referenced by TauDQMHistPlotter::endRun().

◆ print()

void TauDQMHistPlotter::cfgEntryAxisX::print ( void  ) const

Definition at line 205 of file DQMHistPlotter.cc.

205  {
206  std::cout << "<TauDQMHistPlotter::cfgEntryAxisX::print>:" << std::endl;
207  std::cout << " name = " << name_ << std::endl;
208  std::cout << " minX_ = " << minX_ << std::endl;
209  std::cout << " maxX_ = " << maxX_ << std::endl;
210  std::cout << " xAxisTitle = " << xAxisTitle_ << std::endl;
211  std::cout << " xAxisTitleOffset = " << xAxisTitleOffset_ << std::endl;
212  std::cout << " xAxisTitleSize = " << xAxisTitleSize_ << std::endl;
213 }

References gather_cfg::cout.

Member Data Documentation

◆ maxX_

double TauDQMHistPlotter::cfgEntryAxisX::maxX_

Definition at line 49 of file DQMHistPlotter.h.

◆ minX_

double TauDQMHistPlotter::cfgEntryAxisX::minX_

Definition at line 48 of file DQMHistPlotter.h.

◆ name_

std::string TauDQMHistPlotter::cfgEntryAxisX::name_

Definition at line 47 of file DQMHistPlotter.h.

◆ xAxisTitle_

std::string TauDQMHistPlotter::cfgEntryAxisX::xAxisTitle_

Definition at line 50 of file DQMHistPlotter.h.

◆ xAxisTitleOffset_

double TauDQMHistPlotter::cfgEntryAxisX::xAxisTitleOffset_

Definition at line 51 of file DQMHistPlotter.h.

◆ xAxisTitleSize_

double TauDQMHistPlotter::cfgEntryAxisX::xAxisTitleSize_

Definition at line 52 of file DQMHistPlotter.h.

TauDQMHistPlotter::cfgEntryAxisX::xAxisTitleSize_
double xAxisTitleSize_
Definition: DQMHistPlotter.h:52
gather_cfg.cout
cout
Definition: gather_cfg.py:144
verbosity
const int verbosity
Definition: DQMHistPlotter.cc:90
TauDQMHistPlotter::cfgEntryAxisX::maxX_
double maxX_
Definition: DQMHistPlotter.h:49
TauDQMHistPlotter::cfgEntryAxisX::xAxisTitleOffset_
double xAxisTitleOffset_
Definition: DQMHistPlotter.h:51
photonAnalyzer_cfi.xMin
xMin
Definition: photonAnalyzer_cfi.py:82
defaultXaxisTitleOffset
const double defaultXaxisTitleOffset
Definition: DQMHistPlotter.cc:31
defaultXaxisTitleSize
const double defaultXaxisTitleSize
Definition: DQMHistPlotter.cc:32
defaultMaxX
const double defaultMaxX
Definition: DQMHistPlotter.cc:30
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TauDQMHistPlotter::cfgEntryAxisX::name_
std::string name_
Definition: DQMHistPlotter.h:47
looper.cfg
cfg
Definition: looper.py:296
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
multiplicitycorr_cfi.xMax
xMax
Definition: multiplicitycorr_cfi.py:5
TauDQMHistPlotter::cfgEntryAxisX::xAxisTitle_
std::string xAxisTitle_
Definition: DQMHistPlotter.h:50
defaultMinX
const double defaultMinX
Definition: DQMHistPlotter.cc:29
TauDQMHistPlotter::cfgEntryAxisX::minX_
double minX_
Definition: DQMHistPlotter.h:48
TauDQMHistPlotter::cfgEntryAxisX::print
void print() const
Definition: DQMHistPlotter.cc:205