CMS 3D CMS Logo

Typedefs | Functions | Variables
DQMHistPlotter.cc File Reference
#include "Validation/RecoTau/plugins/DQMHistPlotter.h"
#include "Validation/RecoTau/plugins/dqmAuxFunctions.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include <TCanvas.h>
#include <TPad.h>
#include <TPostScript.h>
#include <TStyle.h>
#include <TROOT.h>
#include <TMath.h>
#include <iostream>
#include "FWCore/Framework/interface/MakerMacros.h"

Go to the source code of this file.

Typedefs

typedef std::pair< TH1 *, std::string > histoDrawEntry
 

Functions

template<class T >
void checkCfgDef (const std::string &cfgEntryName, std::map< std::string, T > &def, int &errorFlag, const std::string &defType, const std::string &drawJobName)
 
template<class T >
void checkCfgDefs (const std::vector< std::string > &cfgEntryNames, std::map< std::string, T > &def, int &errorFlag, const std::string &defType, const std::string &drawJobName)
 
void drawHistograms (const std::list< histoDrawEntry > &histogramList, bool &isFirstHistogram)
 
bool find_vstring (const std::vector< std::string > &vs, const std::string &s)
 
template<class T >
const TfindCfgDef (const std::string &cfgEntryName, std::map< std::string, T > &def, const std::string &defType, const std::string &drawJobName)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< TauDQMHistPlotter > > s_filler__LINE__ ("TauDQMHistPlotter")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< TauDQMHistPlotter > > s_maker__LINE__ ("TauDQMHistPlotter")
 

Variables

const int defaultCanvasSizeX = 800
 
const int defaultCanvasSizeY = 600
 
const std::string defaultDrawOption = ""
 
const std::string defaultDrawOptionLegend = "lpf"
 
const int defaultFillColor = 0
 
const int defaultFillStyle = 1001
 
const int defaultLabelBorderSize = 0
 
const int defaultLabelFillColor = 0
 
const std::string defaultLabelOptions = "brNDC"
 
const double defaultLabelPosX = 0.66
 
const double defaultLabelPosY = 0.82
 
const double defaultLabelSizeX = 0.26
 
const double defaultLabelSizeY = 0.10
 
const int defaultLabelTextAlign = 22
 
const double defaultLabelTextAngle = 0.
 
const int defaultLabelTextColor = 1
 
const double defaultLabelTextSize = 0.05
 
const int defaultLegendBorderSize = 0
 
const int defaultLegendFillColor = 0
 
const std::string defaultLegendHeader = ""
 
const std::string defaultLegendOptions = "brNDC"
 
const double defaultLegendPosX = 0.50
 
const double defaultLegendPosY = 0.55
 
const double defaultLegendSizeX = 0.39
 
const double defaultLegendSizeY = 0.34
 
const int defaultLineColor = 0
 
const int defaultLineStyle = 1
 
const int defaultLineWidth = 2
 
const int defaultMarkerColor = 1
 
const int defaultMarkerSize = 1
 
const int defaultMarkerStyle = 2
 
const double defaultMaxX = -1.
 
const double defaultMaxY_linear = -1.
 
const double defaultMaxY_log = -1.
 
const double defaultMinX = -1.
 
const double defaultMinY_linear = 0.
 
const double defaultMinY_log = 1.e-2
 
const double defaultXaxisTitleOffset = 1.0
 
const double defaultXaxisTitleSize = 0.05
 
const double defaultYaxisMaximumScaleFactor_linear = 1.6
 
const double defaultYaxisMaximumScaleFactor_log = 5.e+2
 
const double defaultYaxisTitleOffset = 1.0
 
const double defaultYaxisTitleSize = 0.05
 
const std::string defaultYscale = yScale_linear
 
const std::string drawOption_eBand = "eBand"
 
const std::string drawOptionSeparator = "#.#"
 
const std::string type_bsmMC = "bsmMC"
 
const std::string type_Data = "Data"
 
const std::string type_smMC = "smMC"
 
const std::string type_smSumMC = "smSumMC"
 
const int verbosity = 0
 
const std::string yScale_linear = "linear"
 
const std::string yScale_log = "log"
 

Typedef Documentation

◆ histoDrawEntry

typedef std::pair<TH1*, std::string> histoDrawEntry

Definition at line 137 of file DQMHistPlotter.cc.

Function Documentation

◆ checkCfgDef()

template<class T >
void checkCfgDef ( const std::string &  cfgEntryName,
std::map< std::string, T > &  def,
int &  errorFlag,
const std::string &  defType,
const std::string &  drawJobName 
)

Definition at line 93 of file DQMHistPlotter.cc.

References spu::def().

Referenced by checkCfgDefs().

97  {
98  if (def.find(cfgEntryName) == def.end()) {
99  edm::LogError("checkCfgDef") << " " << defType << " = " << cfgEntryName
100  << " undefined, needed by drawJob = " << drawJobName << " !!";
101  errorFlag = 1;
102  }
103 }
int def(FILE *, FILE *, int)
Log< level::Error, false > LogError

◆ checkCfgDefs()

template<class T >
void checkCfgDefs ( const std::vector< std::string > &  cfgEntryNames,
std::map< std::string, T > &  def,
int &  errorFlag,
const std::string &  defType,
const std::string &  drawJobName 
)

Definition at line 106 of file DQMHistPlotter.cc.

References checkCfgDef(), and spu::def().

110  {
111  for (std::vector<std::string>::const_iterator cfgEntryName = cfgEntryNames.begin();
112  cfgEntryName != cfgEntryNames.end();
113  ++cfgEntryName) {
114  checkCfgDef(*cfgEntryName, def, errorFlag, defType, drawJobName);
115  }
116 }
int def(FILE *, FILE *, int)
void checkCfgDef(const std::string &cfgEntryName, std::map< std::string, T > &def, int &errorFlag, const std::string &defType, const std::string &drawJobName)

◆ drawHistograms()

void drawHistograms ( const std::list< histoDrawEntry > &  histogramList,
bool &  isFirstHistogram 
)

Definition at line 139 of file DQMHistPlotter.cc.

References histoStyle::drawOption, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by TauDQMHistPlotter::endRun().

139  {
140  for (std::list<histoDrawEntry>::const_iterator it = histogramList.begin(); it != histogramList.end(); ++it) {
141  std::string drawOption = (isFirstHistogram) ? it->second : std::string(it->second).append("same");
142  it->first->Draw(drawOption.data());
143  isFirstHistogram = false;
144  }
145 }

◆ find_vstring()

bool find_vstring ( const std::vector< std::string > &  vs,
const std::string &  s 
)

Definition at line 151 of file DQMHistPlotter.cc.

References alignCSCRings::s.

Referenced by TauDQMHistPlotter::TauDQMHistPlotter().

151  {
152  for (std::vector<std::string>::const_iterator it = vs.begin(); it != vs.end(); ++it) {
153  if ((*it) == s)
154  return true;
155  }
156  return false;
157 }

◆ findCfgDef()

template<class T >
const T* findCfgDef ( const std::string &  cfgEntryName,
std::map< std::string, T > &  def,
const std::string &  defType,
const std::string &  drawJobName 
)

Definition at line 119 of file DQMHistPlotter.cc.

References spu::def().

122  {
123  typename std::map<std::string, T>::const_iterator it = def.find(cfgEntryName);
124  if (it != def.end()) {
125  return &(it->second);
126  } else {
127  edm::LogError("findCfgDef") << " " << defType << " = " << cfgEntryName
128  << " undefined, needed by drawJob = " << drawJobName << " !!";
129  return nullptr;
130  }
131 }
int def(FILE *, FILE *, int)
Log< level::Error, false > LogError

◆ s_filler__LINE__()

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< TauDQMHistPlotter > > s_filler__LINE__ ( "TauDQMHistPlotter"  )
static

◆ s_maker__LINE__()

static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< TauDQMHistPlotter > > s_maker__LINE__ ( "TauDQMHistPlotter"  )
static

Variable Documentation

◆ defaultCanvasSizeX

const int defaultCanvasSizeX = 800

Definition at line 85 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::TauDQMHistPlotter().

◆ defaultCanvasSizeY

const int defaultCanvasSizeY = 600

Definition at line 86 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::TauDQMHistPlotter().

◆ defaultDrawOption

const std::string defaultDrawOption = ""

◆ defaultDrawOptionLegend

const std::string defaultDrawOptionLegend = "lpf"

◆ defaultFillColor

const int defaultFillColor = 0

◆ defaultFillStyle

const int defaultFillStyle = 1001

◆ defaultLabelBorderSize

const int defaultLabelBorderSize = 0

Definition at line 63 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLabelFillColor

const int defaultLabelFillColor = 0

Definition at line 64 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLabelOptions

const std::string defaultLabelOptions = "brNDC"

Definition at line 62 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLabelPosX

const double defaultLabelPosX = 0.66

Definition at line 58 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLabelPosY

const double defaultLabelPosY = 0.82

Definition at line 59 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLabelSizeX

const double defaultLabelSizeX = 0.26

Definition at line 60 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLabelSizeY

const double defaultLabelSizeY = 0.10

Definition at line 61 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLabelTextAlign

const int defaultLabelTextAlign = 22

Definition at line 67 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLabelTextAngle

const double defaultLabelTextAngle = 0.

Definition at line 68 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLabelTextColor

const int defaultLabelTextColor = 1

Definition at line 65 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLabelTextSize

const double defaultLabelTextSize = 0.05

Definition at line 66 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLabel::cfgEntryLabel().

◆ defaultLegendBorderSize

const int defaultLegendBorderSize = 0

Definition at line 54 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLegend::cfgEntryLegend().

◆ defaultLegendFillColor

const int defaultLegendFillColor = 0

Definition at line 55 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLegend::cfgEntryLegend().

◆ defaultLegendHeader

const std::string defaultLegendHeader = ""

Definition at line 52 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLegend::cfgEntryLegend().

◆ defaultLegendOptions

const std::string defaultLegendOptions = "brNDC"

Definition at line 53 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryLegend::cfgEntryLegend().

◆ defaultLegendPosX

const double defaultLegendPosX = 0.50

◆ defaultLegendPosY

const double defaultLegendPosY = 0.55

◆ defaultLegendSizeX

const double defaultLegendSizeX = 0.39

◆ defaultLegendSizeY

const double defaultLegendSizeY = 0.34

◆ defaultLineColor

const int defaultLineColor = 0

◆ defaultLineStyle

const int defaultLineStyle = 1

◆ defaultLineWidth

const int defaultLineWidth = 2

◆ defaultMarkerColor

const int defaultMarkerColor = 1

◆ defaultMarkerSize

const int defaultMarkerSize = 1

◆ defaultMarkerStyle

const int defaultMarkerStyle = 2

◆ defaultMaxX

const double defaultMaxX = -1.

◆ defaultMaxY_linear

const double defaultMaxY_linear = -1.

◆ defaultMaxY_log

const double defaultMaxY_log = -1.

◆ defaultMinX

const double defaultMinX = -1.

◆ defaultMinY_linear

const double defaultMinY_linear = 0.

Definition at line 35 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryAxisY::cfgEntryAxisY().

◆ defaultMinY_log

const double defaultMinY_log = 1.e-2

Definition at line 36 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryAxisY::cfgEntryAxisY().

◆ defaultXaxisTitleOffset

const double defaultXaxisTitleOffset = 1.0

Definition at line 31 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryAxisX::cfgEntryAxisX().

◆ defaultXaxisTitleSize

const double defaultXaxisTitleSize = 0.05

Definition at line 32 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryAxisX::cfgEntryAxisX().

◆ defaultYaxisMaximumScaleFactor_linear

const double defaultYaxisMaximumScaleFactor_linear = 1.6

Definition at line 44 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryAxisY::applyTo().

◆ defaultYaxisMaximumScaleFactor_log

const double defaultYaxisMaximumScaleFactor_log = 5.e+2

Definition at line 45 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryAxisY::applyTo().

◆ defaultYaxisTitleOffset

const double defaultYaxisTitleOffset = 1.0

Definition at line 42 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryAxisY::cfgEntryAxisY().

◆ defaultYaxisTitleSize

const double defaultYaxisTitleSize = 0.05

Definition at line 43 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryAxisY::cfgEntryAxisY().

◆ defaultYscale

const std::string defaultYscale = yScale_linear

Definition at line 41 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::cfgEntryAxisY::cfgEntryAxisY().

◆ drawOption_eBand

const std::string drawOption_eBand = "eBand"

Definition at line 82 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::endRun().

◆ drawOptionSeparator

const std::string drawOptionSeparator = "#.#"

Definition at line 88 of file DQMHistPlotter.cc.

Referenced by TauDQMHistPlotter::TauDQMHistPlotter().

◆ type_bsmMC

const std::string type_bsmMC = "bsmMC"

◆ type_Data

const std::string type_Data = "Data"

◆ type_smMC

const std::string type_smMC = "smMC"

◆ type_smSumMC

const std::string type_smSumMC = "smSumMC"

◆ verbosity

const int verbosity = 0

◆ yScale_linear

const std::string yScale_linear = "linear"

Definition at line 39 of file DQMHistPlotter.cc.

◆ yScale_log

const std::string yScale_log = "log"