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 107 of file DQMHistPlotter.h.

Constructor & Destructor Documentation

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

Definition at line 401 of file DQMHistPlotter.cc.

References defaultDrawOption, defaultDrawOptionLegend, defaultFillColor, defaultFillStyle, defaultLineColor, defaultLineStyle, defaultLineWidth, defaultMarkerColor, defaultMarkerSize, defaultMarkerStyle, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), dataset::name, TauDQMHistPlotter::cfgEntryProcess::name_, TauDQMHistPlotter::cfgEntryProcess::print(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

402 {
403  name_ = name;
404 
405  markerColor_ = ( cfg.exists("markerColor") ) ? cfg.getParameter<int>("markerColor") : defaultMarkerColor;
406  markerSize_ = ( cfg.exists("markerSize") ) ? cfg.getParameter<double>("markerSize") : defaultMarkerSize;
407  markerStyle_ = ( cfg.exists("markerStyle") ) ? cfg.getParameter<int>("markerStyle") : defaultMarkerStyle;
408 
409  lineColor_ = ( cfg.exists("lineColor") ) ? cfg.getParameter<int>("lineColor") : defaultLineColor;
410  lineStyle_ = ( cfg.exists("lineStyle") ) ? cfg.getParameter<int>("lineStyle") : defaultLineStyle;
411  lineWidth_ = ( cfg.exists("lineWidth") ) ? cfg.getParameter<int>("lineWidth") : defaultLineWidth;
412 
413  fillColor_ = ( cfg.exists("fillColor") ) ? cfg.getParameter<int>("fillColor") : defaultFillColor;
414  fillStyle_ = ( cfg.exists("fillStyle") ) ? cfg.getParameter<int>("fillStyle") : defaultFillStyle;
415 
416  drawOption_ = ( cfg.exists("drawOption") ) ? cfg.getParameter<std::string>("drawOption") : defaultDrawOption;
417  drawOptionLegend_ = ( cfg.exists("drawOptionLegend") ) ? cfg.getParameter<std::string>("drawOptionLegend") : defaultDrawOptionLegend;
418 
419  if ( verbosity ) print();
420 }
T getParameter(std::string const &) const
const std::string defaultDrawOption
bool exists(std::string const &parameterName) const
checks if a parameter exists
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
TauDQMHistPlotter::cfgEntryDrawOption::cfgEntryDrawOption ( const std::string &  name,
const cfgEntryDrawOption blueprint 
)

Definition at line 422 of file DQMHistPlotter.cc.

References print(), and verbosity.

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

Member Function Documentation

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

Definition at line 448 of file DQMHistPlotter.cc.

References fillColor_, fillStyle_, lineColor_, lineStyle_, lineWidth_, markerColor_, markerSize_, and markerStyle_.

Referenced by TauDQMHistPlotter::endRun().

449 {
450  if ( histogram ) {
451  histogram->SetMarkerColor(markerColor_);
452  histogram->SetMarkerSize(markerSize_);
453  histogram->SetMarkerStyle(markerStyle_);
454  histogram->SetLineColor(lineColor_);
455  histogram->SetLineStyle(lineStyle_);
456  histogram->SetLineWidth(lineWidth_);
457  histogram->SetFillColor(fillColor_);
458  histogram->SetFillStyle(fillStyle_);
459  }
460 }
void TauDQMHistPlotter::cfgEntryDrawOption::print ( void  ) const

Definition at line 432 of file DQMHistPlotter.cc.

References gather_cfg::cout, drawOption_, drawOptionLegend_, fillColor_, fillStyle_, lineColor_, lineStyle_, lineWidth_, markerColor_, markerSize_, markerStyle_, and name_.

Referenced by cfgEntryDrawOption().

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

Member Data Documentation

std::string TauDQMHistPlotter::cfgEntryDrawOption::drawOption_

Definition at line 122 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun(), and print().

std::string TauDQMHistPlotter::cfgEntryDrawOption::drawOptionLegend_

Definition at line 123 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun(), and print().

int TauDQMHistPlotter::cfgEntryDrawOption::fillColor_

Definition at line 120 of file DQMHistPlotter.h.

Referenced by applyTo(), TauDQMHistPlotter::endRun(), and print().

int TauDQMHistPlotter::cfgEntryDrawOption::fillStyle_

Definition at line 121 of file DQMHistPlotter.h.

Referenced by applyTo(), TauDQMHistPlotter::endRun(), and print().

int TauDQMHistPlotter::cfgEntryDrawOption::lineColor_

Definition at line 117 of file DQMHistPlotter.h.

Referenced by applyTo(), TauDQMHistPlotter::endRun(), and print().

int TauDQMHistPlotter::cfgEntryDrawOption::lineStyle_

Definition at line 118 of file DQMHistPlotter.h.

Referenced by applyTo(), and print().

int TauDQMHistPlotter::cfgEntryDrawOption::lineWidth_

Definition at line 119 of file DQMHistPlotter.h.

Referenced by applyTo(), TauDQMHistPlotter::endRun(), and print().

int TauDQMHistPlotter::cfgEntryDrawOption::markerColor_

Definition at line 114 of file DQMHistPlotter.h.

Referenced by applyTo(), TauDQMHistPlotter::endRun(), and print().

double TauDQMHistPlotter::cfgEntryDrawOption::markerSize_

Definition at line 115 of file DQMHistPlotter.h.

Referenced by applyTo(), TauDQMHistPlotter::endRun(), and print().

int TauDQMHistPlotter::cfgEntryDrawOption::markerStyle_

Definition at line 116 of file DQMHistPlotter.h.

Referenced by applyTo(), and print().

std::string TauDQMHistPlotter::cfgEntryDrawOption::name_

Definition at line 113 of file DQMHistPlotter.h.

Referenced by print().