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 192 of file DQMHistPlotter.cc.

References looper::cfg, mergeVDriftHistosByStation::name, print(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

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

Member Function Documentation

◆ applyTo()

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

Definition at line 216 of file DQMHistPlotter.cc.

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

Referenced by TauDQMHistPlotter::endRun().

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

◆ print()

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

Definition at line 206 of file DQMHistPlotter.cc.

References gather_cfg::cout.

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

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.