1 #ifndef __JTESTIDENTICAL_3D__
2 #define __JTESTIDENTICAL_3D__
36 std::istream&
read(std::istream&
in)
override{
48 std::ostream&
write(std::ostream& out, std::string delimiter =
" ",
bool onlyFailures =
false)
const override{
52 out << std::scientific << std::setprecision(2) << (
r->passed ?
JPP::GREEN :
JPP::RED) <<
r->print(delimiter) << std::endl;
54 out << std::scientific << std::setprecision(2) << (
r->passed ?
JPP::GREEN :
JPP::RED) <<
r->print(delimiter) << std::endl;
70 if (!(dynamic_cast<TH3*>(o1) == NULL) && !(dynamic_cast<TH3*>(o2) == NULL)) {
72 TH3D*
h1 =
dynamic_cast<TH3D*
>(o1);
73 TH3D* h2 =
dynamic_cast<TH3D*
>(o2);
75 if(h1 -> GetNbinsX() != h2 -> GetNbinsX())
76 ERROR(
"Histograms with different bining. The objects: " << h1 -> GetName() <<
" can not be compared." << endl);
90 virtual void save(TFile*
f , std::string
path,
bool onlyFailures =
false)
override{
98 if (f -> GetDirectory(path.c_str())==0) f->mkdir(path.c_str());
103 if (f -> GetDirectory(path.c_str())==0) f->mkdir(path.c_str());
134 const std::string
name =
"Identical_3D";
Implementation test that verify if two histograms are the same.
virtual void save(TFile *f, std::string path, bool onlyFailures=false) override
Writes the test result to root file.
void test(TObject *o1, TObject *o2) override
Applies test for two ROOT TH1 histograms.
const std::string parameter
parameter name.
std::vector< JTestResult > results
std::string getName() override
Get test name.
then for HISTOGRAM in h0 h1
Structure containing the result of the test.
do cat driver txt<< EOFevent ev_configure{RC_EVT%< ev_configure.txt > RC_DWRT path
void clear() override
Clear results.
double tolerance
tolerance value to accept the difference as acceptable.
std::istream & read(std::istream &in) override
Read test parameters from input.
std::string getParameter() override
Get parameter name.
const std::string name
test name.
Interface to read input and write output for TObject tests.
std::ostream & write(std::ostream &out, std::string delimiter=" ", bool onlyFailures=false) const override
Write test result to output.
Implementation of the a test to check if two 3D histograms are the same.
JTestIdentical_3D()
Default constructor.
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