1 #ifndef __JTESTCHI2_BIN__ 
    2 #define __JTESTCHI2_BIN__ 
   34   std::istream& 
read(std::istream& 
in)
 override{ 
 
   46   std::ostream& 
write(std::ostream& out, std::string delimiter = 
" ", 
bool onlyFailures = 
false)
 const override{
 
   50           out << std::scientific << std::setprecision(2) << (
r->passed ? 
JPP::GREEN : 
JPP::RED) << 
r->print(delimiter) << std::endl;
 
   52         out << std::scientific << std::setprecision(2) << (
r->passed ? 
JPP::GREEN : 
JPP::RED) << 
r->print(delimiter) << std::endl;
 
   70     if (!(dynamic_cast<TH2*>(o1) == NULL) && !(dynamic_cast<TH2*>(o2) == NULL)) {
 
   72       TH2D* 
h1 = 
dynamic_cast<TH2D*
>(o1);
 
   73       TH2D* h2 = 
dynamic_cast<TH2D*
>(o2);
 
   86   virtual void save(TFile* 
f , std::string 
path, 
bool onlyFailures = 
false)
 override{
 
   94           if (f -> GetDirectory(path.c_str())==0) f->mkdir(path.c_str());
 
   99         if (f -> GetDirectory(path.c_str())==0) f->mkdir(path.c_str());
 
  130   const std::string 
name = 
"Chi2_Bin";         
 
virtual void save(TFile *f, std::string path, bool onlyFailures=false) override
Writes the test result to root file. 
 
std::vector< JTestResult > results
 
void test(TObject *o1, TObject *o2) override
Tests the statistical compatibility of two ROOT 2D histograms. 
 
do set_array DAQHEADER JPrintDAQHeader f
 
then for HISTOGRAM in h0 h1
 
std::string getName() override
Get test name. 
 
Implementation of a bin-by-bin Chi2 test for 2D histograms. 
 
Structure containing the result of the test. 
 
const std::string name
test name. 
 
do cat driver txt<< EOFevent ev_configure{RC_EVT%< ev_configure.txt > RC_DWRT path
 
double outliersThreshold
number of bins allowed to fail the test. 
 
std::ostream & write(std::ostream &out, std::string delimiter=" ", bool onlyFailures=false) const override
Write test result to output. 
 
const std::string parameter
parameter name. 
 
JTestResult JChi2TestBin_2D(TH2 *h1, TH2 *h2, double outliersThreshold, double chi2Threshold, std::string testName, std::string parameterName)
Bin-by-Bin Chi2 comparison of 2D histograms. 
 
void clear() override
Clear results. 
 
double chi2Threshold
threshold p-value to decide if test is passed for a bin. 
 
Interface to read input and write output for TObject tests. 
 
Implementation of the different Chi2-related tests. 
 
std::istream & read(std::istream &in) override
Read test parameters from input. 
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
 
JTestChi2_Bin()
Default constructor. 
 
std::string getParameter() override
Get parameter name.