44 std::istream&
read(std::istream&
in)
override{
56 std::ostream&
write(std::ostream& out, std::string delimiter =
" ",
bool onlyFailures =
false)
const override{
60 out << std::scientific << std::setprecision(2) << (
r->passed ?
JPP::GREEN :
JPP::RED) <<
r->print(delimiter) << std::endl;
62 out << std::scientific << std::setprecision(2) << (
r->passed ?
JPP::GREEN :
JPP::RED) <<
r->print(delimiter) << std::endl;
78 if (!(dynamic_cast<TH2*>(o1) == NULL) && !(dynamic_cast<TH2*>(o2) == NULL)) {
80 TH2D*
h1 =
dynamic_cast<TH2D*
>(o1);
81 TH2D* h2 =
dynamic_cast<TH2D*
>(o2);
94 virtual void save(TFile*
f , std::string
path,
bool onlyFailures =
false)
override{
102 if (f -> GetDirectory(path.c_str())==0) f->mkdir(path.c_str());
107 if (f -> GetDirectory(path.c_str())==0) f->mkdir(path.c_str());
138 const std::string
name =
"Zero" ;
void clear() override
Clear results.
JTestResult JTestZero_2D(TH2 *h1, TH2 *h2, double outliersThreshold, double threshold, std::string testName, std::string parameterName)
Bin-by-Bin test for 2D histograms where a very low number of entries is expected. ...
JTestZero()
Default constructor.
const std::string parameter
parameter name.
const std::string name
test name.
std::istream & read(std::istream &in) override
Read test parameters from input.
void test(TObject *o1, TObject *o2) override
Bin-by-bin comparison for ROOT TH2 histograms, of compatibility with a Poisson pdf of parameter 1...
double outliersThreshold
Fraction of bins allowed to fail.
std::vector< JTestResult > results
then for HISTOGRAM in h0 h1
Implementation of a bin-by-bin compatibility test for 2D histograms with low bin contents.
double threshold
threshold p-value to decide if test is passed.
Structure containing the result of the test.
virtual void save(TFile *f, std::string path, bool onlyFailures=false) override
Writes the test result to root file.
Implementation of the Zeros test for histograms with expected low bin contents.
do cat driver txt<< EOFevent ev_configure{RC_EVT%< ev_configure.txt > RC_DWRT path
std::ostream & write(std::ostream &out, std::string delimiter=" ", bool onlyFailures=false) const override
Write test result to output.
std::string getName() override
Get test name.
std::string getParameter() override
Get parameter name.
Auxiliary class to define a range between two values.
Interface to read input and write output for TObject tests.
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 CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in