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 87 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(), dataset::name, TauDQMHistPlotter::cfgEntryProcess::name_, TauDQMHistPlotter::cfgEntryProcess::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 ) 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 372 of file DQMHistPlotter.cc.

References mps_splice::line.

Referenced by TauDQMHistPlotter::endRun().

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

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

int TauDQMHistPlotter::cfgEntryLabel::borderSize_

Definition at line 98 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryLabel::fillColor_

Definition at line 99 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryLabel::name_

Definition at line 92 of file DQMHistPlotter.h.

std::string TauDQMHistPlotter::cfgEntryLabel::option_

Definition at line 97 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::posX_

Definition at line 93 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::posY_

Definition at line 94 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::sizeX_

Definition at line 95 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::sizeY_

Definition at line 96 of file DQMHistPlotter.h.

vstring TauDQMHistPlotter::cfgEntryLabel::text_

Definition at line 104 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryLabel::textAlign_

Definition at line 102 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::textAngle_

Definition at line 103 of file DQMHistPlotter.h.

int TauDQMHistPlotter::cfgEntryLabel::textColor_

Definition at line 100 of file DQMHistPlotter.h.

double TauDQMHistPlotter::cfgEntryLabel::textSize_

Definition at line 101 of file DQMHistPlotter.h.