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

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

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

Member Function Documentation

◆ applyTo()

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

Definition at line 372 of file DQMHistPlotter.cc.

References label, and mps_splice::line.

Referenced by TauDQMHistPlotter::endRun().

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

◆ print()

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

Definition at line 355 of file DQMHistPlotter.cc.

References gather_cfg::cout, and format_vstring().

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

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.