CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 111 of file DQMHistPlotter.h.

Constructor & Destructor Documentation

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

Definition at line 407 of file DQMHistPlotter.cc.

References defaultDrawOption, defaultDrawOptionLegend, defaultFillColor, defaultFillStyle, defaultLineColor, defaultLineStyle, defaultLineWidth, defaultMarkerColor, defaultMarkerSize, defaultMarkerStyle, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), mergeVDriftHistosByStation::name, reco::print(), AlCaHLTBitMon_QueryRunRegistry::string, and PFRecoTauDiscriminationAgainstMuon2_cfi::verbosity.

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

Definition at line 428 of file DQMHistPlotter.cc.

References print(), and PFRecoTauDiscriminationAgainstMuon2_cfi::verbosity.

429  : name_(name),
430  markerColor_(blueprint.markerColor_), markerSize_(blueprint.markerSize_), markerStyle_(blueprint.markerStyle_),
431  lineColor_(blueprint.lineColor_), lineStyle_(blueprint.lineStyle_), lineWidth_(blueprint.lineWidth_),
432  fillColor_(blueprint.fillColor_), fillStyle_(blueprint.fillStyle_),
433  drawOption_(blueprint.drawOption_), drawOptionLegend_(blueprint.drawOptionLegend_)
434 {
435  if ( verbosity ) print();
436 }

Member Function Documentation

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

Definition at line 454 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::endRun().

455 {
456  if ( histogram ) {
457  histogram->SetMarkerColor(markerColor_);
458  histogram->SetMarkerSize(markerSize_);
459  histogram->SetMarkerStyle(markerStyle_);
460  histogram->SetLineColor(lineColor_);
461  histogram->SetLineStyle(lineStyle_);
462  histogram->SetLineWidth(lineWidth_);
463  histogram->SetFillColor(fillColor_);
464  histogram->SetFillStyle(fillStyle_);
465  }
466 }
void TauDQMHistPlotter::cfgEntryDrawOption::print ( void  ) const

Definition at line 438 of file DQMHistPlotter.cc.

References gather_cfg::cout.

Referenced by cfgEntryDrawOption().

439 {
440  std::cout << "<TauDQMHistPlotter::cfgEntryDrawOption::print>:" << std::endl;
441  std::cout << " name = " << name_ << std::endl;
442  std::cout << " markerColor = " << markerColor_ << std::endl;
443  std::cout << " markerSize = " << markerSize_ << std::endl;
444  std::cout << " markerStyle = " << markerStyle_ << std::endl;
445  std::cout << " lineColor = " << lineColor_ << std::endl;
446  std::cout << " lineStyle = " << lineStyle_ << std::endl;
447  std::cout << " lineWidth = " << lineWidth_ << std::endl;
448  std::cout << " fillColor = " << fillColor_ << std::endl;
449  std::cout << " fillStyle = " << fillStyle_ << std::endl;
450  std::cout << " drawOption = " << drawOption_ << std::endl;
451  std::cout << " drawOptionLegend = " << drawOptionLegend_ << std::endl;
452 }
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

std::string TauDQMHistPlotter::cfgEntryDrawOption::drawOption_

Definition at line 126 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

std::string TauDQMHistPlotter::cfgEntryDrawOption::drawOptionLegend_

Definition at line 127 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::fillColor_

Definition at line 124 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::fillStyle_

Definition at line 125 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::lineColor_

Definition at line 121 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::lineStyle_

Definition at line 122 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryDrawOption::lineWidth_

Definition at line 123 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::markerColor_

Definition at line 118 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

double TauDQMHistPlotter::cfgEntryDrawOption::markerSize_

Definition at line 119 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::markerStyle_

Definition at line 120 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryDrawOption::name_

Definition at line 117 of file DQMHistPlotter.h.