1 #ifndef __JTESTCHI2R_2D__ 
    2 #define __JTESTCHI2R_2D__ 
   38   std::istream& 
read(std::istream& 
in)
 override{ 
 
   50   std::ostream& 
write(std::ostream& out, std::string delimiter = 
" ", 
bool onlyFailures = 
false)
 const override{
 
   54           out << std::scientific << std::setprecision(2) << (
r->passed ? 
JPP::GREEN : 
JPP::RED) << 
r->print(delimiter) << std::endl;
 
   56         out << std::scientific << std::setprecision(2) << (
r->passed ? 
JPP::GREEN : 
JPP::RED) << 
r->print(delimiter) << std::endl;
 
   73     if (!(dynamic_cast<TH2*>(o1) == NULL) && !(dynamic_cast<TH2*>(o2) == NULL)) {
 
   75       TH2D* 
h1 = 
dynamic_cast<TH2D*
>(o1);
 
   76       TH2D* h2 = 
dynamic_cast<TH2D*
>(o2);
 
   85         ERROR (
"Slice option should be: x, X, y or Y, and not " + 
slice);
 
   88     } 
else if (!(dynamic_cast<TH1*>(o1) == NULL) && !(dynamic_cast<TH1*>(o2) == NULL)) {
 
   89       ERROR(
"For 1D histograms call JChi2_1D: " << o1->GetName() << endl);
 
   99   virtual void save(TFile* 
f , std::string 
path, 
bool onlyFailures = 
false)
 override{
 
  107           if (f -> GetDirectory(path.c_str())==0) f->mkdir(path.c_str());
 
  112         if (f -> GetDirectory(path.c_str())==0) f->mkdir(path.c_str());
 
  144   const std::string 
name = 
"Chi2R_2D";      
 
virtual void save(TFile *f, std::string path, bool onlyFailures=false) override
Writes the test result to root file. 
 
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. 
 
std::vector< JTestResult > results
 
std::istream & read(std::istream &in) override
Read test parameters from input. 
 
do set_array DAQHEADER JPrintDAQHeader f
 
then for HISTOGRAM in h0 h1
 
const std::string options
options for the ROOT chi2 test. 
 
void clear() override
Clear results. 
 
Structure containing the result of the test. 
 
double failuresThreshold
threshold p-value to decide if test is passed. 
 
do cat driver txt<< EOFevent ev_configure{RC_EVT%< ev_configure.txt > RC_DWRT path
 
JTestChi2R_2D()
Default constructor. 
 
std::string getName() override
Get test name. 
 
double threshold
threshold p-value to decide if test is passed. 
 
Interface to read input and write output for TObject tests. 
 
Implementation of the different Chi2-related tests. 
 
std::string getParameter() override
Get parameter name. 
 
const std::string name
test name. 
 
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
 
Implementation of the Chi2 test for 2D histograms. 
 
JTestResult JChi2TestSlice(TH2 *h1, TH2 *h2, double threshold, double failuresThreshold, std::string testName, std::string parameterName, std::string options, char slice)
Chi2 test for sliced 2D histograms. 
 
void test(TObject *o1, TObject *o2) override
Applies Chi2 test for two ROOT TH2 histograms.