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::cfgEntryLegend Struct Reference

Public Member Functions

void applyTo (TLegend *) const
 
 cfgEntryLegend (const std::string &, const edm::ParameterSet &)
 
void print () const
 

Public Attributes

int borderSize_
 
int fillColor_
 
std::string header_
 
std::string name_
 
std::string option_
 
double posX_
 
double posY_
 
double sizeX_
 
double sizeY_
 

Detailed Description

Definition at line 73 of file DQMHistPlotter.h.

Constructor & Destructor Documentation

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

Definition at line 292 of file DQMHistPlotter.cc.

References defaultLegendBorderSize, defaultLegendFillColor, defaultLegendHeader, defaultLegendOptions, defaultLegendPosX, defaultLegendPosY, defaultLegendSizeX, defaultLegendSizeY, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), mergeVDriftHistosByStation::name, reco::print(), AlCaHLTBitMon_QueryRunRegistry::string, and PFRecoTauDiscriminationAgainstMuon2_cfi::verbosity.

293 {
294  name_ = name;
295 
296  posX_ = ( cfg.exists("posX") ) ? cfg.getParameter<double>("posX") : defaultLegendPosX;
297  posY_ = ( cfg.exists("posY") ) ? cfg.getParameter<double>("posY") : defaultLegendPosY;
298  sizeX_ = ( cfg.exists("sizeX") ) ? cfg.getParameter<double>("sizeX") : defaultLegendSizeX;
299  sizeY_ = ( cfg.exists("sizeY") ) ? cfg.getParameter<double>("sizeY") : defaultLegendSizeY;
300  header_ = ( cfg.exists("header") ) ? cfg.getParameter<std::string>("header") : defaultLegendHeader;
301  option_ = ( cfg.exists("option") ) ? cfg.getParameter<std::string>("option") : defaultLegendOptions;
302  borderSize_ = ( cfg.exists("borderSize") ) ? cfg.getParameter<int>("borderSize") : defaultLegendBorderSize;
303  fillColor_ = ( cfg.exists("fillColor") ) ? cfg.getParameter<int>("fillColor") : defaultLegendFillColor;
304 
305  if ( verbosity ) print();
306 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
const double defaultLegendSizeX
const std::string defaultLegendOptions
const std::string defaultLegendHeader
const double defaultLegendSizeY
const double defaultLegendPosX
const int defaultLegendFillColor
const int defaultLegendBorderSize
const double defaultLegendPosY

Member Function Documentation

void TauDQMHistPlotter::cfgEntryLegend::applyTo ( TLegend *  legend) const

Definition at line 322 of file DQMHistPlotter.cc.

323 {
324  if ( legend ) {
325  legend->SetX1(posX_);
326  legend->SetY1(posY_);
327  legend->SetX2(posX_ + sizeX_);
328  legend->SetY2(posY_ + sizeY_);
329  legend->SetHeader(header_.data());
330  legend->SetOption(option_.data());
331  legend->SetBorderSize(borderSize_);
332  legend->SetFillColor(fillColor_);
333  }
334 }
void TauDQMHistPlotter::cfgEntryLegend::print ( void  ) const

Definition at line 308 of file DQMHistPlotter.cc.

References gather_cfg::cout.

309 {
310  std::cout << "<TauDQMHistPlotter::cfgEntryLegend::print>:" << std::endl;
311  std::cout << " name = " << name_ << std::endl;
312  std::cout << " posX = " << posX_ << std::endl;
313  std::cout << " posY = " << posY_ << std::endl;
314  std::cout << " sizeX = " << sizeX_ << std::endl;
315  std::cout << " sizeY = " << sizeY_ << std::endl;
316  std::cout << " header = " << header_ << std::endl;
317  std::cout << " option = " << option_ << std::endl;
318  std::cout << " borderSize = " << borderSize_ << std::endl;
319  std::cout << " fillColor = " << fillColor_ << std::endl;
320 }
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

int TauDQMHistPlotter::cfgEntryLegend::borderSize_

Definition at line 85 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryLegend::fillColor_

Definition at line 86 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryLegend::header_

Definition at line 83 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryLegend::name_

Definition at line 78 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryLegend::option_

Definition at line 84 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLegend::posX_

Definition at line 79 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLegend::posY_

Definition at line 80 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLegend::sizeX_

Definition at line 81 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLegend::sizeY_

Definition at line 82 of file DQMHistPlotter.h.