![]() |
ATLAS Offline Software
|
Class to compare the histograms in two root files. More...
#include <TRootCompare.h>
Public Types | |
enum | ALG { BIN, CHI2, AXIS } |
Public Member Functions | |
TRootCompare () | |
virtual | ~TRootCompare () |
virtual void | processKey (TDirectory &dir, TKey &key) |
Method called for every key. More... | |
virtual void | beginJob () |
virtual void | endJob () |
Bool_t | setReferenceFile (const char *filename, const char *baseDir=0) |
Bool_t | setOutputFile (const char *filename) |
Bool_t | setPsFile (const char *filename) |
void | setAlg (TRootCompare::ALG alg, Double_t threshold) |
void | drawNormalized (Bool_t norm=kTRUE) |
void | drawDiff (Bool_t diff=kTRUE) |
void | sortLabels (Bool_t sort=kTRUE) |
Int_t | matchingHist () const |
Int_t | totalHist () const |
Int_t | missingHist () const |
virtual Int_t | run (const char *filename, const char *rootDir=0) |
Start processing. More... | |
Private Member Functions | |
Bool_t | compareHist (const TH1 &h, const TH1 &href) |
void | sortAndDeflate (TH1 &h) |
void | createDirectory (TFile *f, const char *dirpath) |
void | printCanvas (const char *filename) |
Private Attributes | |
TFile * | m_refFile |
TFile * | m_outFile |
TString | m_refRootDir |
TString | m_psFile |
TCanvas * | m_can |
ALG | m_alg |
Double_t | m_threshold |
Int_t | m_histMatch |
Int_t | m_histTotal |
Int_t | m_histMissing |
Bool_t | m_drawNormalized |
Bool_t | m_drawDiff |
Bool_t | m_sortLabels |
std::vector< std::string > | m_noMatch |
Processing hooks | |
virtual void | beforeFile () |
virtual void | afterFile () |
virtual void | beforeDir () |
virtual void | afterDir () |
virtual void | beforeObj () |
virtual void | afterObj () |
void | setDirsToSkip (const char *skipDirs) |
Skip this comma separated list of directories. More... | |
void | addFailRegexp (const char *regexp) |
Skip keys that match this regexp. More... | |
void | addPassRegexp (const char *regexp) |
Never skip keys that match this regexp. More... | |
void | passBeforeFailRegexp (Bool_t passBeforeFail=kTRUE) |
Reverse pass/fail logic. First check on pass then on fail. More... | |
void | setVerbose (Bool_t verbose=kTRUE) |
Set verbose mode. More... | |
Bool_t | verbose () const |
Query verbose mode. More... | |
const TFile * | file () const |
Current ROOT file. More... | |
TString | rootDir () const |
Current directory. More... | |
TFile * | m_file {nullptr} |
TString | m_rootDir |
TString | m_skipDirs |
Bool_t | m_verbose {kFALSE} |
Bool_t | m_passBeforeFail {kFALSE} |
Int_t | m_errorCode {0} |
std::vector< TPRegexp > | m_failRE |
std::vector< TPRegexp > | m_passRE |
std::vector< std::string > | m_skippedObjects |
TString | getPathFromDir (const TDirectory &dir) |
TString | getKeyPath (const TDirectory &dir, const TKey &key) |
void | processDir (TDirectory &dir) |
void | processFile (const char *filename, const char *rootDir=0) |
Bool_t | skipDir (const TDirectory &dir) |
Bool_t | skipObject (const char *name) |
TString | getDrawOptions (const TH1 &h) |
Class to compare the histograms in two root files.
Compare histograms in two root files. Statistics of differences is printed as well as a PS file with histograms overlayed.
Definition at line 28 of file TRootCompare.h.
enum TRootCompare::ALG |
TRootCompare::TRootCompare | ( | ) |
Definition at line 35 of file TRootCompare.cxx.
|
virtual |
Definition at line 51 of file TRootCompare.cxx.
|
inherited |
Skip keys that match this regexp.
Definition at line 160 of file TFileLooper.cxx.
|
inherited |
Never skip keys that match this regexp.
Definition at line 169 of file TFileLooper.cxx.
|
inlinevirtualinherited |
Definition at line 59 of file TFileLooper.h.
|
inlinevirtualinherited |
Definition at line 57 of file TFileLooper.h.
|
inlinevirtualinherited |
Definition at line 61 of file TFileLooper.h.
|
inlinevirtualinherited |
Definition at line 58 of file TFileLooper.h.
|
inlinevirtualinherited |
Definition at line 56 of file TFileLooper.h.
|
inlinevirtualinherited |
Definition at line 60 of file TFileLooper.h.
|
virtual |
Definition at line 382 of file TRootCompare.cxx.
|
private |
Definition at line 471 of file TRootCompare.cxx.
|
inline |
Definition at line 47 of file TRootCompare.h.
|
inline |
Definition at line 46 of file TRootCompare.h.
|
virtual |
|
inlineinherited |
|
protectedinherited |
|
protectedinherited |
|
inline |
Definition at line 50 of file TRootCompare.h.
|
inline |
Definition at line 52 of file TRootCompare.h.
|
inlineinherited |
Reverse pass/fail logic. First check on pass then on fail.
Definition at line 74 of file TFileLooper.h.
|
private |
|
protectedinherited |
Definition at line 73 of file TFileLooper.cxx.
|
protectedinherited |
Definition at line 44 of file TFileLooper.cxx.
|
virtual |
Method called for every key.
Only dummy implementation. Needs to be implemented in derived classes.
Reimplemented from TFileLooper.
Definition at line 116 of file TRootCompare.cxx.
|
inlineinherited |
|
inline |
Definition at line 43 of file TRootCompare.h.
|
inlineinherited |
Bool_t TRootCompare::setOutputFile | ( | const char * | filename | ) |
Definition at line 343 of file TRootCompare.cxx.
Bool_t TRootCompare::setPsFile | ( | const char * | filename | ) |
Definition at line 360 of file TRootCompare.cxx.
Definition at line 322 of file TRootCompare.cxx.
|
inlineinherited |
|
protectedinherited |
Definition at line 118 of file TFileLooper.cxx.
|
protectedinherited |
Definition at line 129 of file TFileLooper.cxx.
|
private |
|
inline |
Definition at line 48 of file TRootCompare.h.
|
inline |
Definition at line 51 of file TRootCompare.h.
|
inlineinherited |
|
private |
Definition at line 67 of file TRootCompare.h.
|
private |
Definition at line 65 of file TRootCompare.h.
|
private |
Definition at line 73 of file TRootCompare.h.
|
private |
Definition at line 72 of file TRootCompare.h.
|
protectedinherited |
Definition at line 94 of file TFileLooper.h.
|
protectedinherited |
Definition at line 96 of file TFileLooper.h.
|
protectedinherited |
Definition at line 89 of file TFileLooper.h.
|
private |
Definition at line 69 of file TRootCompare.h.
|
private |
Definition at line 71 of file TRootCompare.h.
|
private |
Definition at line 70 of file TRootCompare.h.
|
private |
Definition at line 76 of file TRootCompare.h.
|
private |
Definition at line 62 of file TRootCompare.h.
|
protectedinherited |
Definition at line 93 of file TFileLooper.h.
|
protectedinherited |
Definition at line 97 of file TFileLooper.h.
|
private |
Definition at line 64 of file TRootCompare.h.
|
private |
Definition at line 61 of file TRootCompare.h.
|
private |
Definition at line 63 of file TRootCompare.h.
|
protectedinherited |
Definition at line 90 of file TFileLooper.h.
|
protectedinherited |
Definition at line 91 of file TFileLooper.h.
|
protectedinherited |
Definition at line 99 of file TFileLooper.h.
|
private |
Definition at line 74 of file TRootCompare.h.
|
private |
Definition at line 68 of file TRootCompare.h.
|
protectedinherited |
Definition at line 92 of file TFileLooper.h.