CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
TauDQMHistPlotter::cfgEntryLabel Struct Reference

Public Member Functions

void applyTo (TPaveText *) const
 
 cfgEntryLabel (const std::string &, const edm::ParameterSet &)
 
void print () const
 

Public Attributes

int borderSize_
 
int fillColor_
 
std::string name_
 
std::string option_
 
double posX_
 
double posY_
 
double sizeX_
 
double sizeY_
 
vstring text_
 
int textAlign_
 
double textAngle_
 
int textColor_
 
double textSize_
 

Detailed Description

Definition at line 85 of file DQMHistPlotter.h.

Constructor & Destructor Documentation

◆ cfgEntryLabel()

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

Definition at line 334 of file DQMHistPlotter.cc.

334  {
335  name_ = name;
336 
337  posX_ = (cfg.exists("posX")) ? cfg.getParameter<double>("posX") : defaultLabelPosX;
338  posY_ = (cfg.exists("posY")) ? cfg.getParameter<double>("posY") : defaultLabelPosY;
339  sizeX_ = (cfg.exists("sizeX")) ? cfg.getParameter<double>("sizeX") : defaultLabelSizeX;
340  sizeY_ = (cfg.exists("sizeY")) ? cfg.getParameter<double>("sizeY") : defaultLabelSizeY;
341  option_ = (cfg.exists("option")) ? cfg.getParameter<std::string>("option") : defaultLabelOptions;
342  borderSize_ = (cfg.exists("borderSize")) ? cfg.getParameter<int>("borderSize") : defaultLabelBorderSize;
343  fillColor_ = (cfg.exists("fillColor")) ? cfg.getParameter<int>("fillColor") : defaultLabelFillColor;
344  textColor_ = (cfg.exists("textColor")) ? cfg.getParameter<int>("textColor") : defaultLabelTextColor;
345  textSize_ = (cfg.exists("textSize")) ? cfg.getParameter<double>("textSize") : defaultLabelTextSize;
346  textAlign_ = (cfg.exists("textAlign")) ? cfg.getParameter<int>("textAlign") : defaultLabelTextAlign;
347  textAngle_ = (cfg.exists("textAngle")) ? cfg.getParameter<double>("textAngle") : defaultLabelTextAngle;
348  text_ = cfg.getParameter<vstring>("text");
349 
350  if (verbosity)
351  print();
352 }

References looper::cfg, defaultLabelBorderSize, defaultLabelFillColor, defaultLabelOptions, defaultLabelPosX, defaultLabelPosY, defaultLabelSizeX, defaultLabelSizeY, defaultLabelTextAlign, defaultLabelTextAngle, defaultLabelTextColor, defaultLabelTextSize, Skims_PA_cff::name, print(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Member Function Documentation

◆ applyTo()

void TauDQMHistPlotter::cfgEntryLabel::applyTo ( TPaveText *  label) const

Definition at line 371 of file DQMHistPlotter.cc.

371  {
372  if (label) {
373  //--- WARNING: need to call TPaveText::SetX1NDC, **not** TPaveText::SetX1 !!
374  // (see documentation of base-class constructor
375  // TPave::TPave(Double_t, Double_t,Double_t, Double_t, Int_t, Option_t*)
376  // in TPave.cxx for details)
377  label->SetX1NDC(posX_);
378  label->SetY1NDC(posY_);
379  label->SetX2NDC(posX_ + sizeX_);
380  label->SetY2NDC(posY_ + sizeY_);
381  label->SetOption(option_.data());
382  label->SetBorderSize(borderSize_);
383  label->SetFillColor(fillColor_);
384  label->SetTextColor(textColor_);
385  label->SetTextSize(textSize_);
386  label->SetTextAlign(textAlign_);
387  label->SetTextAngle(textAngle_);
388  for (vstring::const_iterator line = text_.begin(); line != text_.end(); ++line) {
389  label->AddText(line->data());
390  }
391  }
392 }

References label, and mps_splice::line.

Referenced by TauDQMHistPlotter::endRun().

◆ print()

void TauDQMHistPlotter::cfgEntryLabel::print ( void  ) const

Definition at line 354 of file DQMHistPlotter.cc.

354  {
355  std::cout << "<TauDQMHistPlotter::cfgEntryLabel::print>:" << std::endl;
356  std::cout << " name = " << name_ << std::endl;
357  std::cout << " posX = " << posX_ << std::endl;
358  std::cout << " posY = " << posY_ << std::endl;
359  std::cout << " sizeX = " << sizeX_ << std::endl;
360  std::cout << " sizeY = " << sizeY_ << std::endl;
361  std::cout << " option = " << option_ << std::endl;
362  std::cout << " borderSize = " << borderSize_ << std::endl;
363  std::cout << " fillColor = " << fillColor_ << std::endl;
364  std::cout << " textColor = " << textColor_ << std::endl;
365  std::cout << " textSize = " << textSize_ << std::endl;
366  std::cout << " textAlign = " << textAlign_ << std::endl;
367  std::cout << " textAngle = " << textAngle_ << std::endl;
368  std::cout << " text = " << format_vstring(text_) << std::endl;
369 }

References gather_cfg::cout, and format_vstring().

Member Data Documentation

◆ borderSize_

int TauDQMHistPlotter::cfgEntryLabel::borderSize_

Definition at line 95 of file DQMHistPlotter.h.

◆ fillColor_

int TauDQMHistPlotter::cfgEntryLabel::fillColor_

Definition at line 96 of file DQMHistPlotter.h.

◆ name_

std::string TauDQMHistPlotter::cfgEntryLabel::name_

Definition at line 89 of file DQMHistPlotter.h.

◆ option_

std::string TauDQMHistPlotter::cfgEntryLabel::option_

Definition at line 94 of file DQMHistPlotter.h.

◆ posX_

double TauDQMHistPlotter::cfgEntryLabel::posX_

Definition at line 90 of file DQMHistPlotter.h.

◆ posY_

double TauDQMHistPlotter::cfgEntryLabel::posY_

Definition at line 91 of file DQMHistPlotter.h.

◆ sizeX_

double TauDQMHistPlotter::cfgEntryLabel::sizeX_

Definition at line 92 of file DQMHistPlotter.h.

◆ sizeY_

double TauDQMHistPlotter::cfgEntryLabel::sizeY_

Definition at line 93 of file DQMHistPlotter.h.

◆ text_

vstring TauDQMHistPlotter::cfgEntryLabel::text_

Definition at line 101 of file DQMHistPlotter.h.

◆ textAlign_

int TauDQMHistPlotter::cfgEntryLabel::textAlign_

Definition at line 99 of file DQMHistPlotter.h.

◆ textAngle_

double TauDQMHistPlotter::cfgEntryLabel::textAngle_

Definition at line 100 of file DQMHistPlotter.h.

◆ textColor_

int TauDQMHistPlotter::cfgEntryLabel::textColor_

Definition at line 97 of file DQMHistPlotter.h.

◆ textSize_

double TauDQMHistPlotter::cfgEntryLabel::textSize_

Definition at line 98 of file DQMHistPlotter.h.

defaultLabelBorderSize
const int defaultLabelBorderSize
Definition: DQMHistPlotter.cc:63
defaultLabelPosX
const double defaultLabelPosX
Definition: DQMHistPlotter.cc:58
TauDQMHistPlotter::cfgEntryLabel::option_
std::string option_
Definition: DQMHistPlotter.h:94
TauDQMHistPlotter::cfgEntryLabel::textSize_
double textSize_
Definition: DQMHistPlotter.h:98
gather_cfg.cout
cout
Definition: gather_cfg.py:144
defaultLabelPosY
const double defaultLabelPosY
Definition: DQMHistPlotter.cc:59
verbosity
const int verbosity
Definition: DQMHistPlotter.cc:90
TauDQMHistPlotter::cfgEntryLabel::textAngle_
double textAngle_
Definition: DQMHistPlotter.h:100
TauDQMHistPlotter::cfgEntryLabel::text_
vstring text_
Definition: DQMHistPlotter.h:101
TauDQMHistPlotter::cfgEntryLabel::print
void print() const
Definition: DQMHistPlotter.cc:354
defaultLabelTextAngle
const double defaultLabelTextAngle
Definition: DQMHistPlotter.cc:68
TauDQMHistPlotter::cfgEntryLabel::sizeY_
double sizeY_
Definition: DQMHistPlotter.h:93
defaultLabelSizeY
const double defaultLabelSizeY
Definition: DQMHistPlotter.cc:61
TauDQMHistPlotter::cfgEntryLabel::textColor_
int textColor_
Definition: DQMHistPlotter.h:97
TauDQMHistPlotter::cfgEntryLabel::borderSize_
int borderSize_
Definition: DQMHistPlotter.h:95
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
defaultLabelOptions
const std::string defaultLabelOptions
Definition: DQMHistPlotter.cc:62
defaultLabelFillColor
const int defaultLabelFillColor
Definition: DQMHistPlotter.cc:64
TauDQMHistPlotter::cfgEntryLabel::sizeX_
double sizeX_
Definition: DQMHistPlotter.h:92
TauDQMHistPlotter::cfgEntryLabel::name_
std::string name_
Definition: DQMHistPlotter.h:89
TauDQMHistPlotter::cfgEntryLabel::textAlign_
int textAlign_
Definition: DQMHistPlotter.h:99
looper.cfg
cfg
Definition: looper.py:297
format_vstring
std::string format_vstring(const std::vector< std::string > &vs)
Definition: dqmAuxFunctions.cc:36
defaultLabelTextColor
const int defaultLabelTextColor
Definition: DQMHistPlotter.cc:65
defaultLabelTextAlign
const int defaultLabelTextAlign
Definition: DQMHistPlotter.cc:67
defaultLabelSizeX
const double defaultLabelSizeX
Definition: DQMHistPlotter.cc:60
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
vstring
vector< string > vstring
Definition: ExoticaDQM.cc:8
TauDQMHistPlotter::cfgEntryLabel::posY_
double posY_
Definition: DQMHistPlotter.h:91
defaultLabelTextSize
const double defaultLabelTextSize
Definition: DQMHistPlotter.cc:66
mps_splice.line
line
Definition: mps_splice.py:76
label
const char * label
Definition: PFTauDecayModeTools.cc:11
TauDQMHistPlotter::cfgEntryLabel::posX_
double posX_
Definition: DQMHistPlotter.h:90
TauDQMHistPlotter::cfgEntryLabel::fillColor_
int fillColor_
Definition: DQMHistPlotter.h:96