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 288 of file DQMHistPlotter.cc.

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

References looper::cfg, defaultLegendBorderSize, defaultLegendFillColor, defaultLegendHeader, defaultLegendOptions, defaultLegendPosX, defaultLegendPosY, defaultLegendSizeX, defaultLegendSizeY, Skims_PA_cff::name, print(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Member Function Documentation

◆ applyTo()

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

Definition at line 317 of file DQMHistPlotter.cc.

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

References listHistos::legend.

Referenced by TauDQMHistPlotter::endRun().

◆ print()

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

Definition at line 304 of file DQMHistPlotter.cc.

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

References gather_cfg::cout.

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.

defaultLegendSizeX
const double defaultLegendSizeX
Definition: DQMHistPlotter.cc:50
TauDQMHistPlotter::cfgEntryLegend::print
void print() const
Definition: DQMHistPlotter.cc:304
TauDQMHistPlotter::cfgEntryLegend::header_
std::string header_
Definition: DQMHistPlotter.h:79
gather_cfg.cout
cout
Definition: gather_cfg.py:144
TauDQMHistPlotter::cfgEntryLegend::fillColor_
int fillColor_
Definition: DQMHistPlotter.h:82
TauDQMHistPlotter::cfgEntryLegend::sizeX_
double sizeX_
Definition: DQMHistPlotter.h:77
defaultLegendHeader
const std::string defaultLegendHeader
Definition: DQMHistPlotter.cc:52
defaultLegendPosX
const double defaultLegendPosX
Definition: DQMHistPlotter.cc:48
verbosity
const int verbosity
Definition: DQMHistPlotter.cc:90
TauDQMHistPlotter::cfgEntryLegend::name_
std::string name_
Definition: DQMHistPlotter.h:74
defaultLegendBorderSize
const int defaultLegendBorderSize
Definition: DQMHistPlotter.cc:54
listHistos.legend
legend
Definition: listHistos.py:41
TauDQMHistPlotter::cfgEntryLegend::sizeY_
double sizeY_
Definition: DQMHistPlotter.h:78
defaultLegendOptions
const std::string defaultLegendOptions
Definition: DQMHistPlotter.cc:53
defaultLegendPosY
const double defaultLegendPosY
Definition: DQMHistPlotter.cc:49
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition: looper.py:296
TauDQMHistPlotter::cfgEntryLegend::posY_
double posY_
Definition: DQMHistPlotter.h:76
TauDQMHistPlotter::cfgEntryLegend::option_
std::string option_
Definition: DQMHistPlotter.h:80
TauDQMHistPlotter::cfgEntryLegend::borderSize_
int borderSize_
Definition: DQMHistPlotter.h:81
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
defaultLegendSizeY
const double defaultLegendSizeY
Definition: DQMHistPlotter.cc:51
defaultLegendFillColor
const int defaultLegendFillColor
Definition: DQMHistPlotter.cc:55
TauDQMHistPlotter::cfgEntryLegend::posX_
double posX_
Definition: DQMHistPlotter.h:75