CMS 3D CMS Logo

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

Constructor & Destructor Documentation

◆ cfgEntryLegend()

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

Definition at line 289 of file DQMHistPlotter.cc.

References looper::cfg, mergeVDriftHistosByStation::name, print(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

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

Member Function Documentation

◆ applyTo()

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

Definition at line 318 of file DQMHistPlotter.cc.

References compareTotals::legend.

318  {
319  if (legend) {
320  legend->SetX1(posX_);
321  legend->SetY1(posY_);
322  legend->SetX2(posX_ + sizeX_);
323  legend->SetY2(posY_ + sizeY_);
324  legend->SetHeader(header_.data());
325  legend->SetOption(option_.data());
326  legend->SetBorderSize(borderSize_);
327  legend->SetFillColor(fillColor_);
328  }
329 }

◆ print()

void TauDQMHistPlotter::cfgEntryLegend::print ( void  ) const

Definition at line 305 of file DQMHistPlotter.cc.

References gather_cfg::cout.

305  {
306  std::cout << "<TauDQMHistPlotter::cfgEntryLegend::print>:" << std::endl;
307  std::cout << " name = " << name_ << std::endl;
308  std::cout << " posX = " << posX_ << std::endl;
309  std::cout << " posY = " << posY_ << std::endl;
310  std::cout << " sizeX = " << sizeX_ << std::endl;
311  std::cout << " sizeY = " << sizeY_ << std::endl;
312  std::cout << " header = " << header_ << std::endl;
313  std::cout << " option = " << option_ << std::endl;
314  std::cout << " borderSize = " << borderSize_ << std::endl;
315  std::cout << " fillColor = " << fillColor_ << std::endl;
316 }

Member Data Documentation

◆ borderSize_

int TauDQMHistPlotter::cfgEntryLegend::borderSize_

Definition at line 81 of file DQMHistPlotter.h.

◆ fillColor_

int TauDQMHistPlotter::cfgEntryLegend::fillColor_

Definition at line 82 of file DQMHistPlotter.h.

◆ header_

std::string TauDQMHistPlotter::cfgEntryLegend::header_

Definition at line 79 of file DQMHistPlotter.h.

◆ name_

std::string TauDQMHistPlotter::cfgEntryLegend::name_

Definition at line 74 of file DQMHistPlotter.h.

◆ option_

std::string TauDQMHistPlotter::cfgEntryLegend::option_

Definition at line 80 of file DQMHistPlotter.h.

◆ posX_

double TauDQMHistPlotter::cfgEntryLegend::posX_

Definition at line 75 of file DQMHistPlotter.h.

◆ posY_

double TauDQMHistPlotter::cfgEntryLegend::posY_

Definition at line 76 of file DQMHistPlotter.h.

◆ sizeX_

double TauDQMHistPlotter::cfgEntryLegend::sizeX_

Definition at line 77 of file DQMHistPlotter.h.

◆ sizeY_

double TauDQMHistPlotter::cfgEntryLegend::sizeY_

Definition at line 78 of file DQMHistPlotter.h.