16 #include <TPostScript.h>
99 if ( def.find(cfgEntryName) == def.end() ) {
100 edm::LogError (
"checkCfgDef") <<
" " << defType <<
" = " << cfgEntryName <<
" undefined, needed by drawJob = " << drawJobName <<
" !!";
106 void checkCfgDefs(
const std::vector<std::string>& cfgEntryNames, std::map<std::string, T>&
def,
int& errorFlag,
109 for ( std::vector<std::string>::const_iterator cfgEntryName = cfgEntryNames.begin();
110 cfgEntryName != cfgEntryNames.end(); ++cfgEntryName ) {
111 checkCfgDef(*cfgEntryName, def, errorFlag, defType, drawJobName);
119 typename std::map<std::string, T>::const_iterator it = def.find(cfgEntryName);
120 if ( it != def.end() ) {
121 return &(it->second);
123 edm::LogError (
"findCfgDef") <<
" " << defType <<
" = " << cfgEntryName <<
" undefined, needed by drawJob = " << drawJobName <<
" !!";
134 void drawHistograms(
const std::list<histoDrawEntry>& histogramList,
bool& isFirstHistogram)
136 for ( std::list<histoDrawEntry>::const_iterator it = histogramList.begin();
137 it != histogramList.end(); ++it ) {
139 it->first->Draw(drawOption.data());
140 isFirstHistogram =
false;
150 for ( std::vector<std::string>::const_iterator it = vs.begin();
151 it != vs.end(); ++it ) {
152 if ( (*it) ==
s )
return true;
178 std::cout <<
"<TauDQMHistPlotter::cfgEntryProcess::print>:" << std::endl;
179 std::cout <<
" name = " << name_ << std::endl;
180 std::cout <<
" dqmDirectory = " << dqmDirectory_ << std::endl;
181 std::cout <<
" legendEntry = " << legendEntry_ << std::endl;
182 std::cout <<
" legendEntryErrorBand = " << legendEntryErrorBand_ << std::endl;
183 std::cout <<
" type = " << type_ << std::endl;
205 std::cout <<
"<TauDQMHistPlotter::cfgEntryAxisX::print>:" << std::endl;
206 std::cout <<
" name = " << name_ << std::endl;
207 std::cout <<
" minX_ = " << minX_ << std::endl;
208 std::cout <<
" maxX_ = " << maxX_ << std::endl;
209 std::cout <<
" xAxisTitle = " << xAxisTitle_ << std::endl;
210 std::cout <<
" xAxisTitleOffset = " << xAxisTitleOffset_ << std::endl;
211 std::cout <<
" xAxisTitleSize = " << xAxisTitleSize_ << std::endl;
217 double xMin = ( minX_ !=
defaultMinX ) ? minX_ : histogram->GetXaxis()->GetXmin();
218 double xMax = ( maxX_ !=
defaultMaxX ) ? maxX_ : histogram->GetXaxis()->GetXmax();
219 histogram->SetAxisRange(xMin, xMax,
"X");
220 histogram->GetXaxis()->SetTitle(xAxisTitle_.data());
221 histogram->GetXaxis()->SetTitleOffset(xAxisTitleOffset_);
222 histogram->GetXaxis()->SetTitleSize(xAxisTitleSize_);
248 std::cout <<
"<TauDQMHistPlotter::cfgEntryAxisY::print>:" << std::endl;
249 std::cout <<
" name = " << name_ << std::endl;
250 std::cout <<
" minY_linear = " << minY_linear_ << std::endl;
251 std::cout <<
" minY_log = " << minY_log_ << std::endl;
252 std::cout <<
" maxY_linear = " << maxY_linear_ << std::endl;
253 std::cout <<
" maxY_log = " << maxY_log_ << std::endl;
254 std::cout <<
" yScale = " << yScale_ << std::endl;
255 std::cout <<
" yAxisTitle = " << yAxisTitle_ << std::endl;
256 std::cout <<
" yAxisTitleOffset = " << yAxisTitleOffset_ << std::endl;
257 std::cout <<
" yAxisTitleSize = " << yAxisTitleSize_ << std::endl;
263 bool yLogScale = ( yScale_ ==
yScale_log ) ?
true :
false;
264 double minY = ( yLogScale ) ? minY_log_ : minY_linear_;
265 histogram->SetMinimum(minY);
266 double maxY = ( yLogScale ) ? maxY_log_ : maxY_linear_;
268 if ( maxY != defaultMaxY ) {
270 histogram->SetMaximum(maxY);
276 histogram->SetMaximum(defaultYaxisMaximumScaleFactor*yAxisNorm_);
278 histogram->GetYaxis()->SetTitle(yAxisTitle_.data());
279 histogram->GetYaxis()->SetTitleOffset(yAxisTitleOffset_);
280 histogram->GetYaxis()->SetTitleSize(yAxisTitleSize_);
306 std::cout <<
"<TauDQMHistPlotter::cfgEntryLegend::print>:" << std::endl;
307 std::cout <<
" name = " << name_ << std::endl;
308 std::cout <<
" posX = " << posX_ << std::endl;
309 std::cout <<
" posY = " << posY_ << std::endl;
310 std::cout <<
" sizeX = " << sizeX_ << std::endl;
311 std::cout <<
" sizeY = " << sizeY_ << std::endl;
312 std::cout <<
" header = " << header_ << std::endl;
313 std::cout <<
" option = " << option_ << std::endl;
314 std::cout <<
" borderSize = " << borderSize_ << std::endl;
315 std::cout <<
" fillColor = " << fillColor_ << std::endl;
321 legend->SetX1(posX_);
322 legend->SetY1(posY_);
323 legend->SetX2(posX_ + sizeX_);
324 legend->SetY2(posY_ + sizeY_);
325 legend->SetHeader(header_.data());
326 legend->SetOption(option_.data());
327 legend->SetBorderSize(borderSize_);
328 legend->SetFillColor(fillColor_);
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;
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();
394 label->AddText(
line->data());
426 markerColor_(blueprint.markerColor_), markerSize_(blueprint.markerSize_), markerStyle_(blueprint.markerStyle_),
427 lineColor_(blueprint.lineColor_), lineStyle_(blueprint.lineStyle_), lineWidth_(blueprint.lineWidth_),
428 fillColor_(blueprint.fillColor_), fillStyle_(blueprint.fillStyle_),
429 drawOption_(blueprint.drawOption_), drawOptionLegend_(blueprint.drawOptionLegend_)
436 std::cout <<
"<TauDQMHistPlotter::cfgEntryDrawOption::print>:" << std::endl;
437 std::cout <<
" name = " << name_ << std::endl;
438 std::cout <<
" markerColor = " << markerColor_ << std::endl;
439 std::cout <<
" markerSize = " << markerSize_ << std::endl;
440 std::cout <<
" markerStyle = " << markerStyle_ << std::endl;
441 std::cout <<
" lineColor = " << lineColor_ << std::endl;
442 std::cout <<
" lineStyle = " << lineStyle_ << std::endl;
443 std::cout <<
" lineWidth = " << lineWidth_ << std::endl;
444 std::cout <<
" fillColor = " << fillColor_ << std::endl;
445 std::cout <<
" fillStyle = " << fillStyle_ << std::endl;
446 std::cout <<
" drawOption = " << drawOption_ << std::endl;
447 std::cout <<
" drawOptionLegend = " << drawOptionLegend_ << std::endl;
453 histogram->SetMarkerColor(markerColor_);
454 histogram->SetMarkerSize(markerSize_);
455 histogram->SetMarkerStyle(markerStyle_);
456 histogram->SetLineColor(lineColor_);
457 histogram->SetLineStyle(lineStyle_);
458 histogram->SetLineWidth(lineWidth_);
459 histogram->SetFillColor(fillColor_);
460 histogram->SetFillStyle(fillStyle_);
474 : dqmMonitorElement_(dqmMonitorElement),
475 drawOptionEntry_(drawOptionEntry),
476 legendEntry_(legendEntry),
477 legendEntryErrorBand_(legendEntryErrorBand),
486 : dqmMonitorElement_(blueprint.dqmMonitorElement_),
487 drawOptionEntry_(blueprint.drawOptionEntry_),
488 legendEntry_(blueprint.legendEntry_),
489 legendEntryErrorBand_(blueprint.legendEntryErrorBand_),
490 process_(blueprint.process_),
491 doStack_(blueprint.doStack_),
499 std::cout <<
"<TauDQMHistPlotter::plotDefEntry::print>:" << std::endl;
500 std::cout <<
" dqmMonitorElement = " << dqmMonitorElement_ << std::endl;
501 std::cout <<
" drawOptionEntry = " << drawOptionEntry_ << std::endl;
502 std::cout <<
" legendEntry = " << legendEntry_ << std::endl;
503 std::cout <<
" legendEntryErrorBand = " << legendEntryErrorBand_ << std::endl;
504 std::cout <<
" process = " << process_ << std::endl;
505 std::cout <<
" doStack = " << doStack_ << std::endl;
521 for ( plotDefList::const_iterator it = plotDefList.begin();
522 it != plotDefList.end(); ++it ) {
533 for ( vstring::const_iterator it = labels.begin();
534 it != labels.end(); ++it ) {
543 std::cout <<
"<TauDQMHistPlotter::cfgSetDrawJob::print>:" << std::endl;
544 std::cout <<
" name = " << name_ << std::endl;
546 for ( plotDefList::const_iterator
plot = plots_.begin();
551 std::cout <<
" title = " << title_ << std::endl;
552 std::cout <<
" xAxis = " << xAxis_ << std::endl;
553 std::cout <<
" yAxis = " << yAxis_ << std::endl;
554 std::cout <<
" legend = " << legend_ << std::endl;
565 std::cout <<
"<TauDQMHistPlotter::TauDQMHistPlotter>:" << std::endl;
573 readCfgParameter<cfgEntryProcess>(cfgParSet_processes,
processes_);
578 int numProcesses_Data = 0;
579 int numProcesses_sumMC = 0;
580 for ( std::map<std::string, cfgEntryProcess>::const_iterator
process =
processes_.begin();
588 edm::LogError (
"TauDQMHistPlotter") <<
" Undefined process type = " << type <<
" !!";
593 if ( type ==
type_Data ) ++numProcesses_Data;
596 if ( (numProcesses_Data > 1) || (numProcesses_sumMC > 1) ) {
597 edm::LogError (
"TauDQMHistPlotter") <<
" Cannot have more than one process of types sumMC and Data !!";
604 readCfgParameter<cfgEntryAxisX>(cfgParSet_xAxes,
xAxes_);
609 readCfgParameter<cfgEntryAxisY>(cfgParSet_yAxes,
yAxes_);
614 readCfgParameter<cfgEntryLegend>(cfgParSet_legends,
legends_);
619 readCfgParameter<cfgEntryLabel>(cfgParSet_labels,
labels_);
623 if ( cfg.
exists(
"drawOptionSets") ) {
626 for ( vstring::const_iterator drawOptionSetName = drawOptionSetNames.begin();
627 drawOptionSetName != drawOptionSetNames.end(); ++drawOptionSetName ) {
631 for ( vstring::const_iterator drawOptionEntryName = drawOptionEntryNames.begin();
632 drawOptionEntryName != drawOptionEntryNames.end(); ++drawOptionEntryName ) {
637 (drawOptionEntryName_full,
cfgEntryDrawOption(drawOptionEntryName_full, drawOptionEntry)));
642 if ( cfg.
exists(
"drawOptionEntries") ) {
644 readCfgParameter<cfgEntryDrawOption>(cfgParSet_drawOptionEntries,
drawOptionEntries_);
651 for ( vstring::const_iterator drawJobName = drawJobNames.begin();
652 drawJobName != drawJobNames.end(); ++drawJobName ) {
655 std::map<int, plotDefList> plotDefMap;
668 for ( vstring::const_iterator
process = processes.begin();
671 for ( vstring::const_iterator dqmMonitorElement = dqmMonitorElements.begin();
672 dqmMonitorElement != dqmMonitorElements.end(); ++dqmMonitorElement ) {
675 plotDefMap[
index].push_back(
plotDefEntry(*dqmMonitorElement, drawOptionEntry,
"",
"", *
process, stack_dqmMonitorElement));
680 typedef std::vector<edm::ParameterSet> vParameterSet;
686 for ( vParameterSet::const_iterator
plot = plots.begin();
689 if ( process ==
"" ||
plot->exists(
"process")) {
697 std::string legendEntry =
"", legendEntryErrorBand =
"";
698 if (
plot->exists(
"legendEntry") ) {
700 legendEntryErrorBand = (
plot->exists(
"legendEntryErrorBand") ) ?
708 for ( vstring::const_iterator dqmMonitorElement = dqmMonitorElements.begin();
709 dqmMonitorElement != dqmMonitorElements.end(); ++dqmMonitorElement ) {
710 plotDefMap[
index].push_back(
plotDefEntry(*dqmMonitorElement, drawOptionEntry, legendEntry, legendEntryErrorBand, process,
false));
717 unsigned numMonitorElements_ref = 0;
718 bool isFirstEntry =
true;
719 for ( std::map<int, plotDefList>::const_iterator
plot = plotDefMap.begin();
720 plot != plotDefMap.end(); ++
plot ) {
721 if ( isFirstEntry ) {
722 numMonitorElements_ref =
plot->second.size();
723 isFirstEntry =
false;
725 if (
plot->second.size() != numMonitorElements_ref ) {
726 edm::LogError (
"TauDQMHistPlotter::TauDQMHistPlotter") <<
" Numbers of dqmMonitorElements must be the same for all plots"
727 <<
" --> skipping drawJob = " << (*drawJobName) <<
" !!";
734 for ( std::map<int, plotDefList>::iterator
plot = plotDefMap.begin();
735 plot != plotDefMap.end(); ++
plot ) {
736 for ( plotDefList::iterator entry =
plot->second.begin();
737 entry !=
plot->second.end(); ++entry ) {
738 std::string dqmMonitorElement = entry->dqmMonitorElement_;
741 std::map<std::string, cfgEntryProcess>::const_iterator it =
processes_.find(process);
743 std::string process_dqmDirectory = it->second.dqmDirectory_;
752 entry->dqmMonitorElement_ = dqmMonitorElement_expanded;
757 edm::LogError (
"TauDQMHistPlotter::TauDQMHistPlotter") <<
" Undefined process = " << process <<
" !!";
774 for ( std::map<int, plotDefList>::iterator
plot = plotDefMap.begin();
775 plot != plotDefMap.end(); ++
plot ) {
776 if ( drawJob.
exists(
"parameter") ) {
780 for ( vstring::const_iterator
parameter = vparameter.begin();
785 for ( plotDefList::const_iterator entry =
plot->second.begin();
786 entry !=
plot->second.end(); ++entry ) {
787 std::string dqmMonitorElement = entry->dqmMonitorElement_;
793 plot_expanded.push_back(
plotDefEntry(dqmMonitorElement_expanded, entry->drawOptionEntry_,
794 entry->legendEntry_, entry->legendEntryErrorBand_, entry->process_, entry->doStack_));
807 if ( errorFlag ) cfgError_ = 1;
810 plot_expanded, title_expanded, xAxis_expanded, yAxis_expanded, legend,
labels));
814 plot->second, title, xAxis, yAxis, legend, labels));
820 for ( std::list<cfgEntryDrawJob>::const_iterator drawJob =
drawJobs_.begin();
821 drawJob !=
drawJobs_.end(); ++drawJob ) {
822 for ( plotDefList::const_iterator
plot = drawJob->plots_.begin();
823 plot != drawJob->plots_.end(); ++
plot ) {
828 checkCfgDef<cfgEntryAxisX>(drawJob->xAxis_,
xAxes_,
cfgError_,
"xAxis", drawJob->name_);
829 checkCfgDef<cfgEntryAxisY>(drawJob->yAxis_,
yAxes_,
cfgError_,
"yAxis", drawJob->name_);
831 checkCfgDef<cfgEntryLegend>(drawJob->legend_,
legends_,
cfgError_,
"legend", drawJob->name_);
833 checkCfgDefs<cfgEntryLabel>(drawJob->labels_,
labels_,
cfgError_,
"label", drawJob->name_);
866 edm::LogError (
"TauDQMHistPlotter") <<
" Either outputFileName or indOutputFileName must be specified !!";
871 edm::LogError (
"TauDQMHistPlotter") <<
" Must not specify outputFileName and indOutputFileName simultaneously !!";
892 std::cout <<
"<TauDQMHistPlotter::endJob>:" << std::endl;
896 edm::LogError (
"endJob") <<
" Error in Configuration ParameterSet --> histograms will NOT be plotted !!";
902 edm::LogError (
"endJob") <<
" Failed to access dqmStore --> histograms will NOT be plotted !!";
913 gROOT->SetBatch(
true);
918 canvas.SetFillColor(10);
928 TPostScript* ps =
NULL;
931 ps =
new TPostScript(psFileName.data(), 112);
935 for ( std::list<cfgEntryDrawJob>::const_iterator drawJob =
drawJobs_.begin();
936 drawJob !=
drawJobs_.end(); ++drawJob ) {
939 std::cout <<
"--> processing drawJob " << drawJobName <<
"..." << std::endl;
942 TH1* stackedHistogram_sum =
NULL;
943 std::list<TH1*> histogramsToDelete;
944 std::list<plotDefEntry*> drawOptionsToDelete;
946 typedef std::pair<TH1*, const plotDefEntry*> histogram_drawOption_pair;
947 std::list<histogram_drawOption_pair> allHistograms;
949 for ( plotDefList::const_iterator
plot = drawJob->plots_.begin();
950 plot != drawJob->plots_.end(); ++
plot ) {
954 std::cout <<
" dqmMonitorElementName_full = " << dqmMonitorElementName_full << std::endl;
957 TH1* histogram = dqmMonitorElement->
getTH1F();
963 if ( histogram ==
NULL ) {
964 edm::LogError (
"endJob") <<
" Failed to access dqmMonitorElement = " << dqmMonitorElementName_full <<
","
965 <<
" needed by drawJob = " << drawJobName <<
" --> histograms will NOT be plotted !!";
969 if ( !histogram->GetSumw2N() ) histogram->Sumw2();
972 findCfgDef<cfgEntryDrawOption>(
plot->drawOptionEntry_,
drawOptionEntries_,
"drawOptionEntry", drawJobName);
973 if ( drawOptionConfig ==
NULL ) {
974 edm::LogError (
"endJob") <<
" Failed to access information needed by drawJob = " << drawJobName
975 <<
" --> histograms will NOT be plotted !!";
981 TH1* histogram_centralValue =
dynamic_cast<TH1*
>(histogram->Clone());
982 histogram_centralValue->SetName(
std::string(histogram->GetName()).
append(
"_centralValue").data());
986 drawOptionConfig_centralValue.
drawOption_ =
"hist";
993 (drawOptionName_centralValue,
cfgEntryDrawOption(drawOptionName_centralValue, drawOptionConfig_centralValue)));
996 allHistograms.push_back(histogram_drawOption_pair(histogram_centralValue, plot_centralValue));
997 histogramsToDelete.push_back(histogram_centralValue);
998 drawOptionsToDelete.push_back(plot_centralValue);
1001 TH1* histogram_ErrorBand =
dynamic_cast<TH1*
>(histogram->Clone());
1002 histogram_ErrorBand->SetName(
std::string(histogram->GetName()).
append(
"_ErrorBand").data());
1015 (drawOptionName_ErrorBand,
cfgEntryDrawOption(drawOptionName_ErrorBand, drawOptionConfig_ErrorBand)));
1019 allHistograms.push_back(histogram_drawOption_pair(histogram_ErrorBand, plot_ErrorBand));
1020 histogramsToDelete.push_back(histogram_ErrorBand);
1021 drawOptionsToDelete.push_back(plot_ErrorBand);
1022 }
else if (
plot->doStack_ ) {
1023 TH1* stackedHistogram =
dynamic_cast<TH1*
>(histogram->Clone());
1024 if ( stackedHistogram_sum ) stackedHistogram->Add(stackedHistogram_sum);
1025 stackedHistogram_sum = stackedHistogram;
1026 histogramsToDelete.push_back(stackedHistogram);
1027 allHistograms.push_back(histogram_drawOption_pair(stackedHistogram, &(*
plot)));
1029 allHistograms.push_back(histogram_drawOption_pair(histogram, &(*
plot)));
1035 double yAxisNorm = 0.;
1036 for ( std::list<histogram_drawOption_pair>::const_iterator it = allHistograms.begin();
1037 it != allHistograms.end(); ++it ) {
1038 yAxisNorm =
TMath::Max(yAxisNorm, it->first->GetMaximum());
1044 const cfgEntryAxisX* xAxisConfig = findCfgDef<cfgEntryAxisX>(drawJob->xAxis_,
xAxes_,
"xAxis", drawJobName);
1045 const cfgEntryAxisY* yAxisConfig = findCfgDef<cfgEntryAxisY>(drawJob->yAxis_,
yAxes_,
"yAxis", drawJobName);
1046 const cfgEntryLegend* legendConfig = findCfgDef<cfgEntryLegend>(drawJob->legend_,
legends_,
"legend", drawJobName);
1047 if ( xAxisConfig ==
NULL || yAxisConfig ==
NULL || legendConfig ==
NULL ) {
1048 edm::LogError (
"endJob") <<
" Failed to access information needed by drawJob = " << drawJobName
1049 <<
" --> histograms will NOT be plotted !!";
1057 legendConfig->applyTo(&legend);
1059 std::list<histoDrawEntry> smProcessHistogramList;
1060 std::list<histoDrawEntry> bsmProcessHistogramList;
1061 std::list<histoDrawEntry> smSumHistogramList;
1062 std::list<histoDrawEntry> smSumUncertaintyHistogramList;
1063 std::list<histoDrawEntry> dataHistogramList;
1065 for ( std::list<histogram_drawOption_pair>::const_iterator it = allHistograms.begin();
1066 it != allHistograms.end(); ++it ) {
1067 TH1* histogram = it->first;
1073 if ( drawOptionConfig ==
NULL || processConfig ==
NULL ) {
1074 edm::LogError (
"endJob") <<
" Failed to access information needed by drawJob = " << drawJobName
1075 <<
" --> histograms will NOT be plotted !!";
1079 if ( drawJob->title_ !=
"" ) histogram->SetTitle(drawJob->title_.data());
1081 xAxisConfig->
applyTo(histogram);
1082 yAxisConfig->applyTo(histogram);
1084 bool yLogScale = ( yAxisConfig->yScale_ ==
yScale_log ) ?
true :
false;
1087 canvas.SetLogy(yLogScale);
1089 drawOptionConfig->
applyTo(histogram);
1090 histogram->SetStats(
false);
1095 if ( processConfig->type_ ==
type_smMC ) {
1097 }
else if ( processConfig->type_ ==
type_bsmMC ) {
1101 }
else if ( processConfig->type_ ==
type_Data ) {
1109 legendDrawOption =
"f";
1115 legend.AddEntry(histogram, legendEntry.data(), legendDrawOption.data());
1118 std::list<TPaveText>
labels;
1119 for ( vstring::const_iterator labelName = drawJob->labels_.begin();
1120 labelName != drawJob->labels_.end(); ++labelName ) {
1121 const cfgEntryLabel* labelConfig = findCfgDef<cfgEntryLabel>(*labelName,
labels_,
"label", drawJobName);
1126 labels.push_back(label);
1136 bool isFirstHistogram =
true;
1142 for ( std::list<histoDrawEntry>::reverse_iterator it = smProcessHistogramList.rbegin();
1143 it != smProcessHistogramList.rend(); ++it ) {
1145 it->first->Draw(drawOption.data());
1146 isFirstHistogram =
false;
1154 for ( std::list<TPaveText>::iterator
label = labels.begin();
1170 canvas.Print(fullFileName.data());
1176 if ( ps ) ps->NewPage();
1179 for ( std::list<TH1*>::const_iterator histogram = histogramsToDelete.begin();
1180 histogram != histogramsToDelete.end(); ++histogram ) {
1181 delete (*histogram);
1184 for ( std::list<plotDefEntry*>::const_iterator
drawOption = drawOptionsToDelete.begin();
1186 delete (*drawOption);
1194 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 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
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
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
volatile std::atomic< bool > shutdown_flag false
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