CMS 3D CMS Logo

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

Public Member Functions

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

Public Attributes

std::string drawOption_
 
std::string drawOptionLegend_
 
int fillColor_
 
int fillStyle_
 
int lineColor_
 
int lineStyle_
 
int lineWidth_
 
int markerColor_
 
double markerSize_
 
int markerStyle_
 
std::string name_
 

Detailed Description

Definition at line 104 of file DQMHistPlotter.h.

Constructor & Destructor Documentation

◆ cfgEntryDrawOption() [1/2]

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

Definition at line 398 of file DQMHistPlotter.cc.

References looper::cfg, defaultDrawOption, defaultDrawOptionLegend, defaultFillColor, defaultFillStyle, defaultLineColor, defaultLineStyle, defaultLineWidth, defaultMarkerColor, defaultMarkerSize, defaultMarkerStyle, Skims_PA_cff::name, print(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

398  {
399  name_ = name;
400 
401  markerColor_ = (cfg.exists("markerColor")) ? cfg.getParameter<int>("markerColor") : defaultMarkerColor;
402  markerSize_ = (cfg.exists("markerSize")) ? cfg.getParameter<double>("markerSize") : defaultMarkerSize;
403  markerStyle_ = (cfg.exists("markerStyle")) ? cfg.getParameter<int>("markerStyle") : defaultMarkerStyle;
404 
405  lineColor_ = (cfg.exists("lineColor")) ? cfg.getParameter<int>("lineColor") : defaultLineColor;
406  lineStyle_ = (cfg.exists("lineStyle")) ? cfg.getParameter<int>("lineStyle") : defaultLineStyle;
407  lineWidth_ = (cfg.exists("lineWidth")) ? cfg.getParameter<int>("lineWidth") : defaultLineWidth;
408 
409  fillColor_ = (cfg.exists("fillColor")) ? cfg.getParameter<int>("fillColor") : defaultFillColor;
410  fillStyle_ = (cfg.exists("fillStyle")) ? cfg.getParameter<int>("fillStyle") : defaultFillStyle;
411 
412  drawOption_ = (cfg.exists("drawOption")) ? cfg.getParameter<std::string>("drawOption") : defaultDrawOption;
414  (cfg.exists("drawOptionLegend")) ? cfg.getParameter<std::string>("drawOptionLegend") : defaultDrawOptionLegend;
415 
416  if (verbosity)
417  print();
418 }
const std::string defaultDrawOption
const int defaultLineWidth
const int defaultFillStyle
const std::string defaultDrawOptionLegend
const int defaultMarkerStyle
const int defaultFillColor
const int defaultLineStyle
const int defaultMarkerSize
const int defaultMarkerColor
const int defaultLineColor
const int verbosity

◆ cfgEntryDrawOption() [2/2]

TauDQMHistPlotter::cfgEntryDrawOption::cfgEntryDrawOption ( const std::string &  name,
const cfgEntryDrawOption blueprint 
)

Definition at line 420 of file DQMHistPlotter.cc.

References print(), and verbosity.

421  : name_(name),
422  markerColor_(blueprint.markerColor_),
423  markerSize_(blueprint.markerSize_),
424  markerStyle_(blueprint.markerStyle_),
425  lineColor_(blueprint.lineColor_),
426  lineStyle_(blueprint.lineStyle_),
427  lineWidth_(blueprint.lineWidth_),
428  fillColor_(blueprint.fillColor_),
429  fillStyle_(blueprint.fillStyle_),
430  drawOption_(blueprint.drawOption_),
431  drawOptionLegend_(blueprint.drawOptionLegend_) {
432  if (verbosity)
433  print();
434 }
const int verbosity

Member Function Documentation

◆ applyTo()

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

Definition at line 451 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::endRun().

451  {
452  if (histogram) {
453  histogram->SetMarkerColor(markerColor_);
454  histogram->SetMarkerSize(markerSize_);
455  histogram->SetMarkerStyle(markerStyle_);
456  histogram->SetLineColor(lineColor_);
457  histogram->SetLineStyle(lineStyle_);
458  histogram->SetLineWidth(lineWidth_);
459  histogram->SetFillColor(fillColor_);
460  histogram->SetFillStyle(fillStyle_);
461  }
462 }

◆ print()

void TauDQMHistPlotter::cfgEntryDrawOption::print ( void  ) const

Definition at line 436 of file DQMHistPlotter.cc.

References gather_cfg::cout.

Referenced by cfgEntryDrawOption().

436  {
437  std::cout << "<TauDQMHistPlotter::cfgEntryDrawOption::print>:" << std::endl;
438  std::cout << " name = " << name_ << std::endl;
439  std::cout << " markerColor = " << markerColor_ << std::endl;
440  std::cout << " markerSize = " << markerSize_ << std::endl;
441  std::cout << " markerStyle = " << markerStyle_ << std::endl;
442  std::cout << " lineColor = " << lineColor_ << std::endl;
443  std::cout << " lineStyle = " << lineStyle_ << std::endl;
444  std::cout << " lineWidth = " << lineWidth_ << std::endl;
445  std::cout << " fillColor = " << fillColor_ << std::endl;
446  std::cout << " fillStyle = " << fillStyle_ << std::endl;
447  std::cout << " drawOption = " << drawOption_ << std::endl;
448  std::cout << " drawOptionLegend = " << drawOptionLegend_ << std::endl;
449 }

Member Data Documentation

◆ drawOption_

std::string TauDQMHistPlotter::cfgEntryDrawOption::drawOption_

Definition at line 118 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

◆ drawOptionLegend_

std::string TauDQMHistPlotter::cfgEntryDrawOption::drawOptionLegend_

Definition at line 119 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

◆ fillColor_

int TauDQMHistPlotter::cfgEntryDrawOption::fillColor_

Definition at line 116 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

◆ fillStyle_

int TauDQMHistPlotter::cfgEntryDrawOption::fillStyle_

Definition at line 117 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

◆ lineColor_

int TauDQMHistPlotter::cfgEntryDrawOption::lineColor_

Definition at line 113 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

◆ lineStyle_

int TauDQMHistPlotter::cfgEntryDrawOption::lineStyle_

Definition at line 114 of file DQMHistPlotter.h.

◆ lineWidth_

int TauDQMHistPlotter::cfgEntryDrawOption::lineWidth_

Definition at line 115 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

◆ markerColor_

int TauDQMHistPlotter::cfgEntryDrawOption::markerColor_

Definition at line 110 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

◆ markerSize_

double TauDQMHistPlotter::cfgEntryDrawOption::markerSize_

Definition at line 111 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

◆ markerStyle_

int TauDQMHistPlotter::cfgEntryDrawOption::markerStyle_

Definition at line 112 of file DQMHistPlotter.h.

◆ name_

std::string TauDQMHistPlotter::cfgEntryDrawOption::name_

Definition at line 109 of file DQMHistPlotter.h.