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

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

Definition at line 334 of file DQMHistPlotter.cc.

References defaultLabelBorderSize, defaultLabelFillColor, defaultLabelOptions, defaultLabelPosX, defaultLabelPosY, defaultLabelSizeX, defaultLabelSizeY, defaultLabelTextAlign, defaultLabelTextAngle, defaultLabelTextColor, defaultLabelTextSize, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), Skims_PA_cff::name, TauDQMHistPlotter::cfgEntryProcess::name_, TauDQMHistPlotter::cfgEntryProcess::print(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

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 }
T getParameter(std::string const &) const
const double defaultLabelPosY
const double defaultLabelSizeY
vector< string > vstring
Definition: ExoticaDQM.cc:8
const int defaultLabelFillColor
bool exists(std::string const &parameterName) const
checks if a parameter exists
const int defaultLabelTextAlign
const double defaultLabelSizeX
const int defaultLabelTextColor
const double defaultLabelTextSize
const int defaultLabelBorderSize
const std::string defaultLabelOptions
const int verbosity
const double defaultLabelTextAngle
const double defaultLabelPosX

Member Function Documentation

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

Definition at line 371 of file DQMHistPlotter.cc.

References mps_splice::line.

Referenced by TauDQMHistPlotter::endRun().

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 }
char const * label
void TauDQMHistPlotter::cfgEntryLabel::print ( void  ) const

Definition at line 354 of file DQMHistPlotter.cc.

References gather_cfg::cout, format_vstring(), and TauDQMHistPlotter::cfgEntryProcess::name_.

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 }
std::string format_vstring(const std::vector< std::string > &vs)

Member Data Documentation

int TauDQMHistPlotter::cfgEntryLabel::borderSize_

Definition at line 95 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryLabel::fillColor_

Definition at line 96 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryLabel::name_

Definition at line 89 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryLabel::option_

Definition at line 94 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::posX_

Definition at line 90 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::posY_

Definition at line 91 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::sizeX_

Definition at line 92 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::sizeY_

Definition at line 93 of file DQMHistPlotter.h.

vstring TauDQMHistPlotter::cfgEntryLabel::text_

Definition at line 101 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryLabel::textAlign_

Definition at line 99 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::textAngle_

Definition at line 100 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryLabel::textColor_

Definition at line 97 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::textSize_

Definition at line 98 of file DQMHistPlotter.h.