![]() |
PandaRoot
|
Combines histograms with the same name from different files in one overlay histogram. More...
#include <PndHistoCombiner.h>
Classes | |
struct | fileData |
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 | DoTest (int val=0, double threshold=0.03) |
perform Kolmogorov or chi2 test between histograms of first file and all others. More... | |
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) |
std::pair< TPad *, TPad * > | SplitPadForPulls () |
void | DrawPulls (std::vector< TH1 *> &histos) |
void | CreateLegend (std::vector< TH1 *> &histos) |
double | PerformTest (TH1 *h1, TH1 *h2) |
bool | TestPassed (double result, double threshold) |
void | AddCDashOutput (TString prefix, TString histoName, double 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 brnaches 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 or Chisquare 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 30 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 76 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 50 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 70 of file PndHistoCombiner.h.
|
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().
|
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 104 of file PndHistoCombiner.h.
|
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 87 of file PndHistoCombiner.h.
|
inline |
Definition at line 89 of file PndHistoCombiner.h.
|
inline |
Definition at line 85 of file PndHistoCombiner.h.
|
inline |
Select to generate output string automatically to upload data to CDASH server.
Definition at line 113 of file PndHistoCombiner.h.
References CheckBranchName(), CheckBranchType(), CheckHistoName(), CreateCDashOutput(), CreateLegend(), DrawAndTestHistoStack(), DrawPulls(), InitFiles(), PerformTest(), and SplitPadForPulls().
|
inline |
Definition at line 97 of file PndHistoCombiner.h.
Referenced by SetPulls().
|
inline |
pictures per canvas. They will be organized in a quadratic way
val | number of pictures/pads |
Definition at line 83 of file PndHistoCombiner.h.
|
inline |
Definition at line 91 of file PndHistoCombiner.h.
References SetDimensions().
|
protected |
Referenced by SetCDashOutput().
|
inlineprotected |
Definition at line 130 of file PndHistoCombiner.h.
References AddCDashOutput(), and RemoveSpecialCharacters().