CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 89 of file DQMHistPlotter.h.

Constructor & Destructor Documentation

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

Definition at line 336 of file DQMHistPlotter.cc.

References defaultLabelBorderSize, defaultLabelFillColor, defaultLabelOptions, defaultLabelPosX, defaultLabelPosY, defaultLabelSizeX, defaultLabelSizeY, defaultLabelTextAlign, defaultLabelTextAngle, defaultLabelTextColor, defaultLabelTextSize, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), mergeVDriftHistosByStation::name, reco::print(), AlCaHLTBitMon_QueryRunRegistry::string, and HLT_25ns14e33_v1_cff::verbosity.

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

Member Function Documentation

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

Definition at line 374 of file DQMHistPlotter.cc.

References geometryCSVtoXML::line.

Referenced by TauDQMHistPlotter::endRun().

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

Definition at line 356 of file DQMHistPlotter.cc.

References gather_cfg::cout, and format_vstring().

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

Member Data Documentation

int TauDQMHistPlotter::cfgEntryLabel::borderSize_

Definition at line 100 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryLabel::fillColor_

Definition at line 101 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryLabel::name_

Definition at line 94 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryLabel::option_

Definition at line 99 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::posX_

Definition at line 95 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::posY_

Definition at line 96 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::sizeX_

Definition at line 97 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::sizeY_

Definition at line 98 of file DQMHistPlotter.h.

vstring TauDQMHistPlotter::cfgEntryLabel::text_

Definition at line 106 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryLabel::textAlign_

Definition at line 104 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::textAngle_

Definition at line 105 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryLabel::textColor_

Definition at line 102 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::textSize_

Definition at line 103 of file DQMHistPlotter.h.