1 #ifndef __JCOMPAREHISTOGRAMS__JTESTIDENTICAL_2D__
2 #define __JCOMPAREHISTOGRAMS__JTESTIDENTICAL_2D__
13 namespace JCOMPAREHISTOGRAMS {
31 JTest_t(
"Identical_2D",
"Difference"),
41 std::istream&
read(std::istream&
in)
override{
55 if (!(dynamic_cast<TH2*>(o1) == NULL) && !(dynamic_cast<TH2*>(o2) == NULL)) {
57 TH2D* h1 =
dynamic_cast<TH2D*
>(o1);
58 TH2D* h2 =
dynamic_cast<TH2D*
>(o2);
60 if(h1 -> GetNbinsX() != h2 -> GetNbinsX() || h1 -> GetNbinsY() != h2 -> GetNbinsY())
61 ERROR(
"Histograms with different bining. The objects: " << h1 -> GetName() <<
" can not be compared." << endl);
Implementation test that verify if two histograms are the same.
Interface to read input and write output for TObject tests.
void test(TObject *o1, TObject *o2) override
Tests compatibility between two TObjects.
std::vector< JTestResult > results
Buffer to store results of multiple tests.*/.
Implementation of the a test to check if two 2D histograms are the same.
JTestIdentical_2D()
Default constructor.
const std::string resultType
result type
const std::string testName
test name
std::istream & read(std::istream &in) override
Read test parameters from input.
Structure containing the result of the test.
double tolerance
tolerance value to accept the difference as acceptable.
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 JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in