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

Constructor & Destructor Documentation

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

Definition at line 403 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 HLT_25ns10e33_v2_cff::verbosity.

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

References print(), and HLT_25ns10e33_v2_cff::verbosity.

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

Member Function Documentation

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

Definition at line 450 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 }
void TauDQMHistPlotter::cfgEntryDrawOption::print ( void  ) const

Definition at line 434 of file DQMHistPlotter.cc.

References gather_cfg::cout.

Referenced by cfgEntryDrawOption().

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

Member Data Documentation

std::string TauDQMHistPlotter::cfgEntryDrawOption::drawOption_

Definition at line 124 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

std::string TauDQMHistPlotter::cfgEntryDrawOption::drawOptionLegend_

Definition at line 125 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::fillColor_

Definition at line 122 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::fillStyle_

Definition at line 123 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::lineColor_

Definition at line 119 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::lineStyle_

Definition at line 120 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryDrawOption::lineWidth_

Definition at line 121 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::markerColor_

Definition at line 116 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

double TauDQMHistPlotter::cfgEntryDrawOption::markerSize_

Definition at line 117 of file DQMHistPlotter.h.

Referenced by TauDQMHistPlotter::endRun().

int TauDQMHistPlotter::cfgEntryDrawOption::markerStyle_

Definition at line 118 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryDrawOption::name_

Definition at line 115 of file DQMHistPlotter.h.