![]() |
PandaRoot
|
Combines histograms with the same name from different files in one overlay histogram. More...
#include <PndHistoCombiner.h>
Classes | |
struct | fileData |
struct | histoComparisonValues |
Public Member Functions | |
PndHistoCombiner () | |
virtual | ~PndHistoCombiner () |
void | AddFileNamesAndShortName (TString fileName, TString shortName) |
Adds the file which contain the histos to be plotted together. First file is the one comparisons are made to. More... | |
int | GenerateHistos () |
Main method to generate histograms. More... | |
int | GenerateBranches () |
Main method to generate histograms from branches. More... | |
void | AddHistoSelector (TString histoName) |
Only those histograms are combined with part of their matching the histoName. More... | |
void | AddBranchSelector (TString branchName) |
Only those branches are combined with part of their matching the branchName. More... | |
void | SetPicPerCan (int val) |
pictures per canvas. They will be organized in a quadratic way More... | |
void | SetCanvasPrefix (TString val) |
void | SetCanvasOutputDir (TString val) |
void | SetCanvasOutputFormat (TString val) |
void | SetPulls (bool dopulls=true) |
void | SetDimensions (int x=400, int y=300) |
void | SetGlobalThresholds (double thresholdKol=0.03, double thresholdChi2=-1.0, double thresholdAD=-1.0) |
perform Kolmogorov or chi2 test between histograms of first file and all others. More... | |
void | AddHistoThresholds (TString histoName, double thresholdKol=0.03, double thresholdChi2=-1.0, double thresholdAD=-1.0) |
void | AddHistoThresholds (TString histoName, std::vector< double > thresholds) |
void | SetCDashOutput (bool val=true) |
Select to generate output string automatically to upload data to CDASH server. More... | |
void | CreateCDashOutput () |
Generate output string to upload data to CDASH server This can be called automatically or by hand. More... | |
Protected Member Functions | |
void | InitFiles () |
bool | CheckHistoName (TString histoName) |
bool | CheckBranchName (TString branchName) |
bool | CheckBranchType (TString branchType) |
void | DrawAndTestHistoStack (std::vector< TH1 *> &histos) |
void | DrawAndTest2DHistoStack (std::vector< TH1 *> &histos) |
std::pair< TPad *, TPad * > | SplitPadForPulls () |
void | DrawPulls (std::vector< TH1 *> &histos) |
void | CreateLegend (std::vector< TH1 *> &histos) |
histoComparisonValues | PerformTest (TH1 *h1, TH1 *h2) |
bool | TestPassed (TString &histoTitle, histoComparisonValues results, histoComparisonValues thresholds) |
void | AddCDashOutput (TString prefix, TString histoName, histoComparisonValues value) |
Add to output string to upload data to CDASH server. More... | |
TString | RemoveSpecialCharacters (TString input) |
Combines histograms with the same name from different files in one overlay histogram.
The class runs through all histograms or branches of the first file given and checks if histograms/branches with the same name exist in the other files. If this is the case they are plotted into a common histogram via the option "same". The legend of the histogram is filled with the short name given by the user. The histograms are saved in a canvas as jpg files. The number of histograms per canvas can be set. In addition it is possible to perform a Kolmogorov, Chisquare or Anderson test between the first and all other histograms in one stack. If the test fail the word "FAILED" will be added to the title of the histogram. Furthermore, a cdash output can be created which uploads the probability of the test to the cdash server.
Definition at line 32 of file PndHistoCombiner.h.
PndHistoCombiner::PndHistoCombiner | ( | ) |
|
virtual |
|
inline |
Only those branches are combined with part of their matching the branchName.
branchName | part of the histo name to be compared |
Definition at line 84 of file PndHistoCombiner.h.
|
protected |
Add to output string to upload data to CDASH server.
Referenced by TestPassed().
|
inline |
Adds the file which contain the histos to be plotted together. First file is the one comparisons are made to.
fileName | full path to file |
shortName | name displayed in histogram legend |
Definition at line 58 of file PndHistoCombiner.h.
References GenerateBranches(), and GenerateHistos().
|
inline |
Only those histograms are combined with part of their matching the histoName.
histoName | part of the histo name to be compared |
Definition at line 78 of file PndHistoCombiner.h.
|
inline |
Definition at line 115 of file PndHistoCombiner.h.
References PndHistoCombiner::histoComparisonValues::fAD, PndHistoCombiner::histoComparisonValues::fChi2, and PndHistoCombiner::histoComparisonValues::fKol.
Referenced by AddHistoThresholds(), and SetGlobalThresholds().
|
inline |
Definition at line 123 of file PndHistoCombiner.h.
References AddHistoThresholds().
|
protected |
Referenced by SetCDashOutput().
|
protected |
Referenced by SetCDashOutput().
|
protected |
Referenced by SetCDashOutput().
void PndHistoCombiner::CreateCDashOutput | ( | ) |
Generate output string to upload data to CDASH server This can be called automatically or by hand.
Referenced by SetCDashOutput().
|
protected |
Referenced by SetCDashOutput().
|
protected |
Referenced by SetCDashOutput().
|
protected |
Referenced by SetCDashOutput().
|
protected |
Referenced by SetCDashOutput().
int PndHistoCombiner::GenerateBranches | ( | ) |
Main method to generate histograms from branches.
Referenced by AddFileNamesAndShortName().
int PndHistoCombiner::GenerateHistos | ( | ) |
Main method to generate histograms.
Referenced by AddFileNamesAndShortName().
|
protected |
Referenced by SetCDashOutput().
|
protected |
Referenced by SetCDashOutput().
|
protected |
Referenced by TestPassed().
|
inline |
Definition at line 93 of file PndHistoCombiner.h.
|
inline |
Definition at line 94 of file PndHistoCombiner.h.
|
inline |
Definition at line 92 of file PndHistoCombiner.h.
|
inline |
Select to generate output string automatically to upload data to CDASH server.
Definition at line 134 of file PndHistoCombiner.h.
References CheckBranchName(), CheckBranchType(), CheckHistoName(), CreateCDashOutput(), CreateLegend(), DrawAndTest2DHistoStack(), DrawAndTestHistoStack(), DrawPulls(), InitFiles(), PerformTest(), and SplitPadForPulls().
|
inline |
Definition at line 102 of file PndHistoCombiner.h.
|
inline |
perform Kolmogorov or chi2 test between histograms of first file and all others.
val | test type. 0: none, 1: Kolmogorov test, 2: chisquare test |
threshold | for the probability of the test. Every p larger than threshold will be counted as passed |
Definition at line 109 of file PndHistoCombiner.h.
References AddHistoThresholds().
|
inline |
pictures per canvas. They will be organized in a quadratic way
val | number of pictures/pads |
Definition at line 91 of file PndHistoCombiner.h.
|
inline |
Definition at line 96 of file PndHistoCombiner.h.
|
protected |
Referenced by SetCDashOutput().
|
inlineprotected |
Definition at line 152 of file PndHistoCombiner.h.
References AddCDashOutput(), PndHistoCombiner::histoComparisonValues::fAD, PndHistoCombiner::histoComparisonValues::fChi2, PndHistoCombiner::histoComparisonValues::fKol, and RemoveSpecialCharacters().