Jpp 19.3.0-rc.2
the software that should make you happy
|
Interface to read input and write output for TObject tests. More...
#include <JTest_t.hh>
Public Member Functions | |
JTest_t (const std::string &testName, const std::string &resultType) | |
Constructor. | |
virtual void | test (const TObject *o1, const TObject *o2)=0 |
Tests compatibility between two TObjects. | |
virtual std::istream & | read (std::istream &in)=0 |
Read test parameters from input. | |
virtual std::ostream & | write (std::ostream &out, const char delimiter=' ', const bool onlyFailures=false) const |
Write test result to output. | |
virtual void | save (TFile *f, const std::string &path, const bool onlyFailures=false) const |
Writes the test result to root file. | |
const std::string & | getTestName () const |
Get test name. | |
const std::string & | getResultType () const |
Get result type. | |
Protected Attributes | |
const std::string | testName |
test name | |
const std::string | resultType |
test result type | |
Friends | |
std::istream & | operator>> (std::istream &in, JTest_t &test) |
Read test parameters from input. | |
std::ostream & | operator<< (std::ostream &out, const JTest_t &test) |
Write test result to output. | |
Interface to read input and write output for TObject tests.
This is an abstract class from which the different tests are derived.
All tests have in common the methods from this interface.
For each test, the parameters are passed through an istream, and parsed by the read() method.
For each test, the different results are stored in the internal results buffer.
The write() method is used to print a message with the result of the test.
The save() method is used to save a graphical output with the test results into a .root file.
For a list of available tests see JTestDictionary()
Definition at line 40 of file JTest_t.hh.
|
inline |
Constructor.
testName | test name |
resultType | result type |
Definition at line 51 of file JTest_t.hh.
|
pure virtual |
Tests compatibility between two TObjects.
o1 | First object |
o2 | Second object |
Implemented in JCOMPAREHISTOGRAMS::JTestChi2, JCOMPAREHISTOGRAMS::JTestChi2_Bin, JCOMPAREHISTOGRAMS::JTestChi2_Slice2D, JCOMPAREHISTOGRAMS::JTestIdentical, JCOMPAREHISTOGRAMS::JTestKolmogorov_1D, JCOMPAREHISTOGRAMS::JTestKolmogorov_2D, JCOMPAREHISTOGRAMS::JTestKolmogorov_Slice2D, JCOMPAREHISTOGRAMS::JTestPoissonLogLikelihoodRatio, JCOMPAREHISTOGRAMS::JTestPoissonLogLikelihoodRatioBeestonBarlow, JCOMPAREHISTOGRAMS::JTestRuns_1D, JCOMPAREHISTOGRAMS::JTestRuns_Slice2D, JCOMPAREHISTOGRAMS::JTestSignificance, and JCOMPAREHISTOGRAMS::JTestZero.
|
pure virtual |
Read test parameters from input.
in | input stream |
Implemented in JCOMPAREHISTOGRAMS::JTestChi2, JCOMPAREHISTOGRAMS::JTestChi2_Bin, JCOMPAREHISTOGRAMS::JTestChi2_Slice2D, JCOMPAREHISTOGRAMS::JTestIdentical, JCOMPAREHISTOGRAMS::JTestKolmogorov_1D, JCOMPAREHISTOGRAMS::JTestKolmogorov_2D, JCOMPAREHISTOGRAMS::JTestKolmogorov_Slice2D, JCOMPAREHISTOGRAMS::JTestPoissonLogLikelihoodRatio, JCOMPAREHISTOGRAMS::JTestPoissonLogLikelihoodRatioBeestonBarlow, JCOMPAREHISTOGRAMS::JTestRuns_1D, JCOMPAREHISTOGRAMS::JTestRuns_Slice2D, JCOMPAREHISTOGRAMS::JTestSignificance, and JCOMPAREHISTOGRAMS::JTestZero.
|
inlinevirtual |
Write test result to output.
out | output stream |
delimiter | field delimiter |
onlyFailures | if true, write only failures. |
Definition at line 84 of file JTest_t.hh.
|
inlinevirtual |
Writes the test result to root file.
f | A ROOT file |
path | Path in root file. |
onlyFailures | If true, write only failures. |
Definition at line 108 of file JTest_t.hh.
|
inline |
|
inline |
|
friend |
Read test parameters from input.
in | input stream |
test | test |
Definition at line 159 of file JTest_t.hh.
|
friend |
Write test result to output.
out | output stream |
test | test |
Definition at line 172 of file JTest_t.hh.
|
protected |
test name
Definition at line 180 of file JTest_t.hh.
|
protected |
test result type
Definition at line 181 of file JTest_t.hh.