16 #include <TPostScript.h>
103 if ( def.find(cfgEntryName) == def.end() ) {
104 edm::LogError (
"checkCfgDef") <<
" " << defType <<
" = " << cfgEntryName <<
" undefined, needed by drawJob = " << drawJobName <<
" !!";
110 void checkCfgDefs(
const std::vector<std::string>& cfgEntryNames, std::map<std::string, T>&
def,
int& errorFlag,
113 for ( std::vector<std::string>::const_iterator cfgEntryName = cfgEntryNames.begin();
114 cfgEntryName != cfgEntryNames.end(); ++cfgEntryName ) {
115 checkCfgDef(*cfgEntryName, def, errorFlag, defType, drawJobName);
123 typename std::map<std::string, T>::const_iterator it = def.find(cfgEntryName);
124 if ( it != def.end() ) {
125 return &(it->second);
127 edm::LogError (
"findCfgDef") <<
" " << defType <<
" = " << cfgEntryName <<
" undefined, needed by drawJob = " << drawJobName <<
" !!";
138 void drawHistograms(
const std::list<histoDrawEntry>& histogramList,
bool& isFirstHistogram)
140 for ( std::list<histoDrawEntry>::const_iterator it = histogramList.begin();
141 it != histogramList.end(); ++it ) {
143 it->first->Draw(drawOption.data());
144 isFirstHistogram =
false;
154 for ( std::vector<std::string>::const_iterator it = vs.begin();
155 it != vs.end(); ++it ) {
156 if ( (*it) ==
s )
return true;
182 std::cout <<
"<TauDQMHistPlotter::cfgEntryProcess::print>:" << std::endl;
183 std::cout <<
" name = " << name_ << std::endl;
184 std::cout <<
" dqmDirectory = " << dqmDirectory_ << std::endl;
185 std::cout <<
" legendEntry = " << legendEntry_ << std::endl;
186 std::cout <<
" legendEntryErrorBand = " << legendEntryErrorBand_ << std::endl;
187 std::cout <<
" type = " << type_ << std::endl;
209 std::cout <<
"<TauDQMHistPlotter::cfgEntryAxisX::print>:" << std::endl;
210 std::cout <<
" name = " << name_ << std::endl;
211 std::cout <<
" minX_ = " << minX_ << std::endl;
212 std::cout <<
" maxX_ = " << maxX_ << std::endl;
213 std::cout <<
" xAxisTitle = " << xAxisTitle_ << std::endl;
214 std::cout <<
" xAxisTitleOffset = " << xAxisTitleOffset_ << std::endl;
215 std::cout <<
" xAxisTitleSize = " << xAxisTitleSize_ << std::endl;
221 double xMin = ( minX_ !=
defaultMinX ) ? minX_ : histogram->GetXaxis()->GetXmin();
222 double xMax = ( maxX_ !=
defaultMaxX ) ? maxX_ : histogram->GetXaxis()->GetXmax();
223 histogram->SetAxisRange(xMin, xMax,
"X");
224 histogram->GetXaxis()->SetTitle(xAxisTitle_.data());
225 histogram->GetXaxis()->SetTitleOffset(xAxisTitleOffset_);
226 histogram->GetXaxis()->SetTitleSize(xAxisTitleSize_);
252 std::cout <<
"<TauDQMHistPlotter::cfgEntryAxisY::print>:" << std::endl;
253 std::cout <<
" name = " << name_ << std::endl;
254 std::cout <<
" minY_linear = " << minY_linear_ << std::endl;
255 std::cout <<
" minY_log = " << minY_log_ << std::endl;
256 std::cout <<
" maxY_linear = " << maxY_linear_ << std::endl;
257 std::cout <<
" maxY_log = " << maxY_log_ << std::endl;
258 std::cout <<
" yScale = " << yScale_ << std::endl;
259 std::cout <<
" yAxisTitle = " << yAxisTitle_ << std::endl;
260 std::cout <<
" yAxisTitleOffset = " << yAxisTitleOffset_ << std::endl;
261 std::cout <<
" yAxisTitleSize = " << yAxisTitleSize_ << std::endl;
267 bool yLogScale = ( yScale_ ==
yScale_log ) ?
true :
false;
268 double minY = ( yLogScale ) ? minY_log_ : minY_linear_;
269 histogram->SetMinimum(minY);
270 double maxY = ( yLogScale ) ? maxY_log_ : maxY_linear_;
272 if ( maxY != defaultMaxY ) {
274 histogram->SetMaximum(maxY);
280 histogram->SetMaximum(defaultYaxisMaximumScaleFactor*yAxisNorm_);
282 histogram->GetYaxis()->SetTitle(yAxisTitle_.data());
283 histogram->GetYaxis()->SetTitleOffset(yAxisTitleOffset_);
284 histogram->GetYaxis()->SetTitleSize(yAxisTitleSize_);
310 std::cout <<
"<TauDQMHistPlotter::cfgEntryLegend::print>:" << std::endl;
311 std::cout <<
" name = " << name_ << std::endl;
312 std::cout <<
" posX = " << posX_ << std::endl;
313 std::cout <<
" posY = " << posY_ << std::endl;
314 std::cout <<
" sizeX = " << sizeX_ << std::endl;
315 std::cout <<
" sizeY = " << sizeY_ << std::endl;
316 std::cout <<
" header = " << header_ << std::endl;
317 std::cout <<
" option = " << option_ << std::endl;
318 std::cout <<
" borderSize = " << borderSize_ << std::endl;
319 std::cout <<
" fillColor = " << fillColor_ << std::endl;
325 legend->SetX1(posX_);
326 legend->SetY1(posY_);
327 legend->SetX2(posX_ + sizeX_);
328 legend->SetY2(posY_ + sizeY_);
329 legend->SetHeader(header_.data());
330 legend->SetOption(option_.data());
331 legend->SetBorderSize(borderSize_);
332 legend->SetFillColor(fillColor_);
362 std::cout <<
"<TauDQMHistPlotter::cfgEntryLabel::print>:" << std::endl;
363 std::cout <<
" name = " << name_ << std::endl;
364 std::cout <<
" posX = " << posX_ << std::endl;
365 std::cout <<
" posY = " << posY_ << std::endl;
366 std::cout <<
" sizeX = " << sizeX_ << std::endl;
367 std::cout <<
" sizeY = " << sizeY_ << std::endl;
368 std::cout <<
" option = " << option_ << std::endl;
369 std::cout <<
" borderSize = " << borderSize_ << std::endl;
370 std::cout <<
" fillColor = " << fillColor_ << std::endl;
371 std::cout <<
" textColor = " << textColor_ << std::endl;
372 std::cout <<
" textSize = " << textSize_ << std::endl;
373 std::cout <<
" textAlign = " << textAlign_ << std::endl;
374 std::cout <<
" textAngle = " << textAngle_ << std::endl;
385 label->SetX1NDC(posX_);
386 label->SetY1NDC(posY_);
387 label->SetX2NDC(posX_ + sizeX_);
388 label->SetY2NDC(posY_ + sizeY_);
389 label->SetOption(option_.data());
390 label->SetBorderSize(borderSize_);
391 label->SetFillColor(fillColor_);
392 label->SetTextColor(textColor_);
393 label->SetTextSize(textSize_);
394 label->SetTextAlign(textAlign_);
395 label->SetTextAngle(textAngle_);
396 for ( vstring::const_iterator
line = text_.begin();
398 label->AddText(
line->data());
430 markerColor_(blueprint.markerColor_), markerSize_(blueprint.markerSize_), markerStyle_(blueprint.markerStyle_),
431 lineColor_(blueprint.lineColor_), lineStyle_(blueprint.lineStyle_), lineWidth_(blueprint.lineWidth_),
432 fillColor_(blueprint.fillColor_), fillStyle_(blueprint.fillStyle_),
433 drawOption_(blueprint.drawOption_), drawOptionLegend_(blueprint.drawOptionLegend_)
440 std::cout <<
"<TauDQMHistPlotter::cfgEntryDrawOption::print>:" << std::endl;
441 std::cout <<
" name = " << name_ << std::endl;
442 std::cout <<
" markerColor = " << markerColor_ << std::endl;
443 std::cout <<
" markerSize = " << markerSize_ << std::endl;
444 std::cout <<
" markerStyle = " << markerStyle_ << std::endl;
445 std::cout <<
" lineColor = " << lineColor_ << std::endl;
446 std::cout <<
" lineStyle = " << lineStyle_ << std::endl;
447 std::cout <<
" lineWidth = " << lineWidth_ << std::endl;
448 std::cout <<
" fillColor = " << fillColor_ << std::endl;
449 std::cout <<
" fillStyle = " << fillStyle_ << std::endl;
450 std::cout <<
" drawOption = " << drawOption_ << std::endl;
451 std::cout <<
" drawOptionLegend = " << drawOptionLegend_ << std::endl;
457 histogram->SetMarkerColor(markerColor_);
458 histogram->SetMarkerSize(markerSize_);
459 histogram->SetMarkerStyle(markerStyle_);
460 histogram->SetLineColor(lineColor_);
461 histogram->SetLineStyle(lineStyle_);
462 histogram->SetLineWidth(lineWidth_);
463 histogram->SetFillColor(fillColor_);
464 histogram->SetFillStyle(fillStyle_);
478 : dqmMonitorElement_(dqmMonitorElement),
479 drawOptionEntry_(drawOptionEntry),
480 legendEntry_(legendEntry),
481 legendEntryErrorBand_(legendEntryErrorBand),
490 : dqmMonitorElement_(blueprint.dqmMonitorElement_),
491 drawOptionEntry_(blueprint.drawOptionEntry_),
492 legendEntry_(blueprint.legendEntry_),
493 legendEntryErrorBand_(blueprint.legendEntryErrorBand_),
494 process_(blueprint.process_),
495 doStack_(blueprint.doStack_),
503 std::cout <<
"<TauDQMHistPlotter::plotDefEntry::print>:" << std::endl;
504 std::cout <<
" dqmMonitorElement = " << dqmMonitorElement_ << std::endl;
505 std::cout <<
" drawOptionEntry = " << drawOptionEntry_ << std::endl;
506 std::cout <<
" legendEntry = " << legendEntry_ << std::endl;
507 std::cout <<
" legendEntryErrorBand = " << legendEntryErrorBand_ << std::endl;
508 std::cout <<
" process = " << process_ << std::endl;
509 std::cout <<
" doStack = " << doStack_ << std::endl;
525 for ( plotDefList::const_iterator it = plotDefList.begin();
526 it != plotDefList.end(); ++it ) {
537 for ( vstring::const_iterator it = labels.begin();
538 it != labels.end(); ++it ) {
547 std::cout <<
"<TauDQMHistPlotter::cfgSetDrawJob::print>:" << std::endl;
548 std::cout <<
" name = " << name_ << std::endl;
550 for ( plotDefList::const_iterator
plot = plots_.begin();
555 std::cout <<
" title = " << title_ << std::endl;
556 std::cout <<
" xAxis = " << xAxis_ << std::endl;
557 std::cout <<
" yAxis = " << yAxis_ << std::endl;
558 std::cout <<
" legend = " << legend_ << std::endl;
569 std::cout <<
"<TauDQMHistPlotter::TauDQMHistPlotter>:" << std::endl;
577 readCfgParameter<cfgEntryProcess>(cfgParSet_processes,
processes_);
582 int numProcesses_Data = 0;
583 int numProcesses_sumMC = 0;
584 for ( std::map<std::string, cfgEntryProcess>::const_iterator
process =
processes_.begin();
592 edm::LogError (
"TauDQMHistPlotter") <<
" Undefined process type = " << type <<
" !!";
597 if ( type ==
type_Data ) ++numProcesses_Data;
600 if ( (numProcesses_Data > 1) || (numProcesses_sumMC > 1) ) {
601 edm::LogError (
"TauDQMHistPlotter") <<
" Cannot have more than one process of types sumMC and Data !!";
608 readCfgParameter<cfgEntryAxisX>(cfgParSet_xAxes,
xAxes_);
613 readCfgParameter<cfgEntryAxisY>(cfgParSet_yAxes,
yAxes_);
618 readCfgParameter<cfgEntryLegend>(cfgParSet_legends,
legends_);
623 readCfgParameter<cfgEntryLabel>(cfgParSet_labels,
labels_);
627 if ( cfg.
exists(
"drawOptionSets") ) {
630 for ( vstring::const_iterator drawOptionSetName = drawOptionSetNames.begin();
631 drawOptionSetName != drawOptionSetNames.end(); ++drawOptionSetName ) {
635 for ( vstring::const_iterator drawOptionEntryName = drawOptionEntryNames.begin();
636 drawOptionEntryName != drawOptionEntryNames.end(); ++drawOptionEntryName ) {
641 (drawOptionEntryName_full,
cfgEntryDrawOption(drawOptionEntryName_full, drawOptionEntry)));
646 if ( cfg.
exists(
"drawOptionEntries") ) {
648 readCfgParameter<cfgEntryDrawOption>(cfgParSet_drawOptionEntries,
drawOptionEntries_);
655 for ( vstring::const_iterator drawJobName = drawJobNames.begin();
656 drawJobName != drawJobNames.end(); ++drawJobName ) {
659 std::map<int, plotDefList> plotDefMap;
672 for ( vstring::const_iterator
process = processes.begin();
675 for ( vstring::const_iterator dqmMonitorElement = dqmMonitorElements.begin();
676 dqmMonitorElement != dqmMonitorElements.end(); ++dqmMonitorElement ) {
679 plotDefMap[
index].push_back(
plotDefEntry(*dqmMonitorElement, drawOptionEntry,
"",
"", *
process, stack_dqmMonitorElement));
684 typedef std::vector<edm::ParameterSet> vParameterSet;
690 for ( vParameterSet::const_iterator
plot = plots.begin();
693 if ( process ==
"" ||
plot->exists(
"process")) {
701 std::string legendEntry =
"", legendEntryErrorBand =
"";
702 if (
plot->exists(
"legendEntry") ) {
704 legendEntryErrorBand = (
plot->exists(
"legendEntryErrorBand") ) ?
712 for ( vstring::const_iterator dqmMonitorElement = dqmMonitorElements.begin();
713 dqmMonitorElement != dqmMonitorElements.end(); ++dqmMonitorElement ) {
714 plotDefMap[
index].push_back(
plotDefEntry(*dqmMonitorElement, drawOptionEntry, legendEntry, legendEntryErrorBand, process,
false));
721 unsigned numMonitorElements_ref = 0;
722 bool isFirstEntry =
true;
723 for ( std::map<int, plotDefList>::const_iterator
plot = plotDefMap.begin();
724 plot != plotDefMap.end(); ++
plot ) {
725 if ( isFirstEntry ) {
726 numMonitorElements_ref =
plot->second.size();
727 isFirstEntry =
false;
729 if (
plot->second.size() != numMonitorElements_ref ) {
730 edm::LogError (
"TauDQMHistPlotter::TauDQMHistPlotter") <<
" Numbers of dqmMonitorElements must be the same for all plots"
731 <<
" --> skipping drawJob = " << (*drawJobName) <<
" !!";
738 for ( std::map<int, plotDefList>::iterator
plot = plotDefMap.begin();
739 plot != plotDefMap.end(); ++
plot ) {
740 for ( plotDefList::iterator
entry =
plot->second.begin();
745 std::map<std::string, cfgEntryProcess>::const_iterator it =
processes_.find(process);
747 std::string process_dqmDirectory = it->second.dqmDirectory_;
756 entry->dqmMonitorElement_ = dqmMonitorElement_expanded;
761 edm::LogError (
"TauDQMHistPlotter::TauDQMHistPlotter") <<
" Undefined process = " << process <<
" !!";
778 for ( std::map<int, plotDefList>::iterator
plot = plotDefMap.begin();
779 plot != plotDefMap.end(); ++
plot ) {
780 if ( drawJob.
exists(
"parameter") ) {
784 for ( vstring::const_iterator
parameter = vparameter.begin();
789 for ( plotDefList::const_iterator
entry =
plot->second.begin();
797 plot_expanded.push_back(
plotDefEntry(dqmMonitorElement_expanded,
entry->drawOptionEntry_,
811 if ( errorFlag ) cfgError_ = 1;
814 plot_expanded, title_expanded, xAxis_expanded, yAxis_expanded, legend,
labels));
818 plot->second, title, xAxis, yAxis, legend, labels));
824 for ( std::list<cfgEntryDrawJob>::const_iterator drawJob =
drawJobs_.begin();
825 drawJob !=
drawJobs_.end(); ++drawJob ) {
826 for ( plotDefList::const_iterator
plot = drawJob->plots_.begin();
827 plot != drawJob->plots_.end(); ++
plot ) {
832 checkCfgDef<cfgEntryAxisX>(drawJob->xAxis_,
xAxes_,
cfgError_,
"xAxis", drawJob->name_);
833 checkCfgDef<cfgEntryAxisY>(drawJob->yAxis_,
yAxes_,
cfgError_,
"yAxis", drawJob->name_);
835 checkCfgDef<cfgEntryLegend>(drawJob->legend_,
legends_,
cfgError_,
"legend", drawJob->name_);
837 checkCfgDefs<cfgEntryLabel>(drawJob->labels_,
labels_,
cfgError_,
"label", drawJob->name_);
870 edm::LogError (
"TauDQMHistPlotter") <<
" Either outputFileName or indOutputFileName must be specified !!";
875 edm::LogError (
"TauDQMHistPlotter") <<
" Must not specify outputFileName and indOutputFileName simultaneously !!";
896 std::cout <<
"<TauDQMHistPlotter::endJob>:" << std::endl;
900 edm::LogError (
"endJob") <<
" Error in Configuration ParameterSet --> histograms will NOT be plotted !!";
906 edm::LogError (
"endJob") <<
" Failed to access dqmStore --> histograms will NOT be plotted !!";
917 gROOT->SetBatch(
true);
922 canvas.SetFillColor(10);
932 TPostScript* ps =
NULL;
935 ps =
new TPostScript(psFileName.data(), 112);
939 for ( std::list<cfgEntryDrawJob>::const_iterator drawJob =
drawJobs_.begin();
940 drawJob !=
drawJobs_.end(); ++drawJob ) {
943 std::cout <<
"--> processing drawJob " << drawJobName <<
"..." << std::endl;
946 TH1* stackedHistogram_sum =
NULL;
947 std::list<TH1*> histogramsToDelete;
948 std::list<plotDefEntry*> drawOptionsToDelete;
950 typedef std::pair<TH1*, const plotDefEntry*> histogram_drawOption_pair;
951 std::list<histogram_drawOption_pair> allHistograms;
953 for ( plotDefList::const_iterator
plot = drawJob->plots_.begin();
954 plot != drawJob->plots_.end(); ++
plot ) {
958 std::cout <<
" dqmMonitorElementName_full = " << dqmMonitorElementName_full << std::endl;
961 TH1* histogram = dqmMonitorElement->
getTH1F();
967 if ( histogram ==
NULL ) {
968 edm::LogError (
"endJob") <<
" Failed to access dqmMonitorElement = " << dqmMonitorElementName_full <<
","
969 <<
" needed by drawJob = " << drawJobName <<
" --> histograms will NOT be plotted !!";
973 if ( !histogram->GetSumw2N() ) histogram->Sumw2();
976 findCfgDef<cfgEntryDrawOption>(
plot->drawOptionEntry_,
drawOptionEntries_,
"drawOptionEntry", drawJobName);
977 if ( drawOptionConfig ==
NULL ) {
978 edm::LogError (
"endJob") <<
" Failed to access information needed by drawJob = " << drawJobName
979 <<
" --> histograms will NOT be plotted !!";
985 TH1* histogram_centralValue =
dynamic_cast<TH1*
>(histogram->Clone());
986 histogram_centralValue->SetName(
std::string(histogram->GetName()).
append(
"_centralValue").data());
990 drawOptionConfig_centralValue.
drawOption_ =
"hist";
997 (drawOptionName_centralValue,
cfgEntryDrawOption(drawOptionName_centralValue, drawOptionConfig_centralValue)));
1000 allHistograms.push_back(histogram_drawOption_pair(histogram_centralValue, plot_centralValue));
1001 histogramsToDelete.push_back(histogram_centralValue);
1002 drawOptionsToDelete.push_back(plot_centralValue);
1005 TH1* histogram_ErrorBand =
dynamic_cast<TH1*
>(histogram->Clone());
1006 histogram_ErrorBand->SetName(
std::string(histogram->GetName()).
append(
"_ErrorBand").data());
1019 (drawOptionName_ErrorBand,
cfgEntryDrawOption(drawOptionName_ErrorBand, drawOptionConfig_ErrorBand)));
1023 allHistograms.push_back(histogram_drawOption_pair(histogram_ErrorBand, plot_ErrorBand));
1024 histogramsToDelete.push_back(histogram_ErrorBand);
1025 drawOptionsToDelete.push_back(plot_ErrorBand);
1026 }
else if (
plot->doStack_ ) {
1027 TH1* stackedHistogram =
dynamic_cast<TH1*
>(histogram->Clone());
1028 if ( stackedHistogram_sum ) stackedHistogram->Add(stackedHistogram_sum);
1029 stackedHistogram_sum = stackedHistogram;
1030 histogramsToDelete.push_back(stackedHistogram);
1031 allHistograms.push_back(histogram_drawOption_pair(stackedHistogram, &(*
plot)));
1033 allHistograms.push_back(histogram_drawOption_pair(histogram, &(*
plot)));
1039 double yAxisNorm = 0.;
1040 for ( std::list<histogram_drawOption_pair>::const_iterator it = allHistograms.begin();
1041 it != allHistograms.end(); ++it ) {
1042 yAxisNorm =
TMath::Max(yAxisNorm, it->first->GetMaximum());
1048 const cfgEntryAxisX* xAxisConfig = findCfgDef<cfgEntryAxisX>(drawJob->xAxis_,
xAxes_,
"xAxis", drawJobName);
1049 const cfgEntryAxisY* yAxisConfig = findCfgDef<cfgEntryAxisY>(drawJob->yAxis_,
yAxes_,
"yAxis", drawJobName);
1050 const cfgEntryLegend* legendConfig = findCfgDef<cfgEntryLegend>(drawJob->legend_,
legends_,
"legend", drawJobName);
1051 if ( xAxisConfig ==
NULL || yAxisConfig ==
NULL || legendConfig ==
NULL ) {
1052 edm::LogError (
"endJob") <<
" Failed to access information needed by drawJob = " << drawJobName
1053 <<
" --> histograms will NOT be plotted !!";
1061 legendConfig->applyTo(&legend);
1063 std::list<histoDrawEntry> smProcessHistogramList;
1064 std::list<histoDrawEntry> bsmProcessHistogramList;
1065 std::list<histoDrawEntry> smSumHistogramList;
1066 std::list<histoDrawEntry> smSumUncertaintyHistogramList;
1067 std::list<histoDrawEntry> dataHistogramList;
1069 for ( std::list<histogram_drawOption_pair>::const_iterator it = allHistograms.begin();
1070 it != allHistograms.end(); ++it ) {
1071 TH1* histogram = it->first;
1077 if ( drawOptionConfig ==
NULL || processConfig ==
NULL ) {
1078 edm::LogError (
"endJob") <<
" Failed to access information needed by drawJob = " << drawJobName
1079 <<
" --> histograms will NOT be plotted !!";
1083 if ( drawJob->title_ !=
"" ) histogram->SetTitle(drawJob->title_.data());
1085 xAxisConfig->
applyTo(histogram);
1086 yAxisConfig->applyTo(histogram);
1088 bool yLogScale = ( yAxisConfig->yScale_ ==
yScale_log ) ?
true :
false;
1091 canvas.SetLogy(yLogScale);
1093 drawOptionConfig->
applyTo(histogram);
1094 histogram->SetStats(
false);
1099 if ( processConfig->type_ ==
type_smMC ) {
1101 }
else if ( processConfig->type_ ==
type_bsmMC ) {
1105 }
else if ( processConfig->type_ ==
type_Data ) {
1113 legendDrawOption =
"f";
1119 legend.AddEntry(histogram, legendEntry.data(), legendDrawOption.data());
1122 std::list<TPaveText>
labels;
1123 for ( vstring::const_iterator labelName = drawJob->labels_.begin();
1124 labelName != drawJob->labels_.end(); ++labelName ) {
1125 const cfgEntryLabel* labelConfig = findCfgDef<cfgEntryLabel>(*labelName,
labels_,
"label", drawJobName);
1130 labels.push_back(label);
1140 bool isFirstHistogram =
true;
1146 for ( std::list<histoDrawEntry>::reverse_iterator it = smProcessHistogramList.rbegin();
1147 it != smProcessHistogramList.rend(); ++it ) {
1149 it->first->Draw(drawOption.data());
1150 isFirstHistogram =
false;
1158 for ( std::list<TPaveText>::iterator
label = labels.begin();
1174 canvas.Print(fullFileName.data());
1180 if ( ps ) ps->NewPage();
1183 for ( std::list<TH1*>::const_iterator histogram = histogramsToDelete.begin();
1184 histogram != histogramsToDelete.end(); ++histogram ) {
1185 delete (*histogram);
1188 for ( std::list<plotDefEntry*>::const_iterator
drawOption = drawOptionsToDelete.begin();
1190 delete (*drawOption);
1198 if ( ps ) ps->Close();
const double defaultMaxY_log
const std::string processDirKeyword
virtual void analyze(const edm::Event &, const edm::EventSetup &)
T getParameter(std::string const &) const
std::string drawOptionLegend_
const double defaultLabelPosY
const std::string type_Data
const std::string defaultDrawOption
const double defaultScaleFactor
const double defaultMinY_linear
const double defaultLabelSizeY
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
static void setNorm(double yAxisNorm)
const std::string yScale_log
std::pair< TH1 *, std::string > histoDrawEntry
cfgEntryLabel(const std::string &, const edm::ParameterSet &)
const double defaultYaxisMaximumScaleFactor_linear
#define DEFINE_FWK_MODULE(type)
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
const int defaultLabelFillColor
std::string legendEntryErrorBand_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
const int defaultLineWidth
std::string replace_string(const std::string &src, const std::string &keyword, const std::string ¶meter, unsigned minReplacements, unsigned maxReplacements, int &errorFlag)
std::string dqmDirectory_
const int defaultLabelTextAlign
cfgEntryAxisX(const std::string &, const edm::ParameterSet &)
const int defaultFillStyle
std::string dqmDirectoryName(const std::string &dqmRootDirectory, const std::string &dqmSubDirectory)
void checkCfgDef(const std::string &cfgEntryName, std::map< std::string, T > &def, int &errorFlag, const std::string &defType, const std::string &drawJobName)
cfgEntryDrawOption(const std::string &, const edm::ParameterSet &)
const double defaultMinY_log
const double defaultLabelSizeX
const double defaultLegendSizeX
const std::string defaultDrawOptionLegend
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
const int defaultMarkerStyle
const double defaultYaxisTitleOffset
void applyTo(TLegend *) const
const double defaultYaxisMaximumScaleFactor_log
const int defaultLabelTextColor
const std::string type_bsmMC
std::pair< std::string, MonitorElement * > entry
void applyTo(TH1 *) const
const std::string defaultLegendOptions
const std::string defaultLegendHeader
void applyTo(TH1 *) const
const double defaultLegendSizeY
const std::string drawOption_eBand
const std::string type_smMC
const T * findCfgDef(const std::string &cfgEntryName, std::map< std::string, T > &def, const std::string &defType, const std::string &drawJobName)
bool find_vstring(const std::vector< std::string > &vs, const std::string &s)
std::map< std::string, cfgEntryLegend > legends_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
const double defaultLabelTextSize
const std::string parKeyword
std::vector< std::string > vstring
void checkCfgDefs(const std::vector< std::string > &cfgEntryNames, std::map< std::string, T > &def, int &errorFlag, const std::string &defType, const std::string &drawJobName)
std::string format_vstring(const std::vector< std::string > &vs)
void drawHistograms(const std::list< histoDrawEntry > &histogramList, bool &isFirstHistogram)
const std::string yScale_linear
const bool defaultDoOverlayPlots
cfgEntryProcess(const std::string &, const edm::ParameterSet &)
std::string outputFileName_
std::map< std::string, cfgEntryLabel > labels_
std::map< std::string, cfgEntryProcess > processes_
std::map< std::string, cfgEntryAxisX > xAxes_
const std::string type_smSumMC
std::string legendEntryErrorBand_
virtual ~TauDQMHistPlotter()
virtual void endRun(const edm::Run &r, const edm::EventSetup &c)
const int defaultCanvasSizeY
const double defaultLegendPosX
const int defaultFillColor
cfgEntryAxisY(const std::string &, const edm::ParameterSet &)
std::list< plotDefEntry > plotDefList
TH1F * getTH1F(void) const
std::string drawOptionEntry_
std::string outputFilePath_
std::map< std::string, cfgEntryDrawOption > drawOptionEntries_
const int defaultLegendFillColor
const std::string drawOptionSeparator
const std::string plotKeyword
plotDefEntry(const std::string &, const std::string &, const std::string &, const std::string &, const std::string &, bool)
const int defaultLabelBorderSize
const double defaultYaxisTitleSize
const std::string defaultLabelOptions
cfgEntryDrawJob(const std::string &, const plotDefList &, const std::string &, const std::string &, const std::string &, const std::string &, const vstring &)
std::list< cfgEntryDrawJob > drawJobs_
const int defaultLineStyle
void applyTo(TH1 *) const
const double defaultXaxisTitleSize
const double defaultMaxY_linear
const int defaultMarkerSize
const std::string dqmRootDirectory
TauDQMHistPlotter(const edm::ParameterSet &)
const int defaultMarkerColor
const int defaultLineColor
const int defaultLegendBorderSize
const double defaultXaxisTitleOffset
std::map< std::string, cfgEntryAxisY > yAxes_
const int defaultCanvasSizeX
std::string indOutputFileName_
const std::string defaultYscale
void applyTo(TPaveText *) const
cfgEntryLegend(const std::string &, const edm::ParameterSet &)
const double defaultLegendPosY
const double defaultLabelTextAngle
const double defaultLabelPosX