Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JCOMPAREHISTOGRAMS Namespace Reference

Classes

class  JResultTitle
 Class dedicated to standardize the title of the graphical objects produced by the JTest_t() derived classes. More...
 
class  JTest_t
 Interface to read input and write output for TObject tests. More...
 
class  JTestChi2
 Implementation of the Chi2 test for ROOT histograms. More...
 
class  JTestChi2_Bin
 Implementation of a bin-by-bin Chi2 test for 2D histograms. More...
 
class  JTestChi2_Slice2D
 Implementation of the Chi2 test for 2D histograms. More...
 
class  JTestDictionary
 Dictionary to map different tests to unique integer indices. More...
 
class  JTestIdentical
 Implementation of the a test to check if two 1D histograms are the same. More...
 
class  JTestKolmogorov_1D
 Implementation of the Kolmogorov test for 1D histograms. More...
 
class  JTestKolmogorov_2D
 Implementation of the Kolmogorov test for 2D histograms. More...
 
class  JTestKolmogorov_Slice2D
 Implementation of the Kolmogorov test for 2D histograms. More...
 
class  JTestPoissonLogLikelihoodRatio
 Implementation of the Poisson log-likelihood ratio test. More...
 
class  JTestPoissonLogLikelihoodRatioBeestonBarlow
 Implementation of the Poisson log-likelihood ratio test. More...
 
struct  JTestResult
 Structure containing the result of the test. More...
 
class  JTestRuns_1D
 Implementation of the Runs test for 1D histograms. More...
 
class  JTestRuns_Slice2D
 Implementation of the Chi2 test for 2D histograms. More...
 
class  JTestSignificance
 Significance test. More...
 
class  JTestSummary
 Class dedicated to standardize the title of the graphical objects produced by the JTest_t() derived classes. More...
 
class  JTestZero
 Implementation of a bin-by-bin compatibility test for histograms with low bin contents. More...
 

Functions

std::istream & read (std::istream &in, JTestSummary &summary, const char delimiter=' ')
 Read test summary.
 
std::ostream & print (std::ostream &out, const JTestSummary &summary, const char delimiter=' ', const bool useColors=true)
 Print test summary.
 
template<class T >
std::ostream & print (std::ostream &out, const JTestSummary &summary, T __begin, T __end, const char delimiter=' ', const bool useColors=true)
 Print test summary.
 

Variables

static const char *const PASSED_t = "PASSED"
 
static const char *const FAILED_t = "FAILED"
 

Detailed Description

Author
rgruiz
rgruiz, bjung
bjung
rgruiz, bofearreigh, bjung

Function Documentation

◆ read()

std::istream & JCOMPAREHISTOGRAMS::read ( std::istream & in,
JTestSummary & summary,
const char delimiter = ' ' )
inline

Read test summary.

Parameters
ininput stream
summarytest summary
delimiterdelimiter

Definition at line 223 of file JTestSummary.hh.

226 {
227 using namespace std;
228 using namespace JPP;
229
230 JProperties properties = summary.getProperties();
231
232 for (JProperties::iterator i = properties.begin(); i != properties.end(); ++i) {
233
234 string buffer;
235 getline(in, buffer, delimiter);
236
237 istringstream iss(buffer);
238
239 i->second->read(iss);
240 }
241
242 summary.passed = (summary.passed_h == PASSED_t);
243
244 return in;
245 }
JProperties getProperties(const JEquationParameters &equation=JTestSummary::getEquationParameters())
Get properties of this class.
Utility class to parse parameter values.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).

◆ print() [1/2]

std::ostream & JCOMPAREHISTOGRAMS::print ( std::ostream & out,
const JTestSummary & summary,
const char delimiter = ' ',
const bool useColors = true )
inline

Print test summary.

Parameters
outoutput stream
summarytest summary
delimiterdelimiter
useColors

Definition at line 256 of file JTestSummary.hh.

260 {
261 using namespace std;
262 using namespace JPP;
263
264 out << scientific << setprecision(2);
265
266 if (useColors) {
267 out << (summary.passed ? GREEN : RED);
268 }
269
270 const JProperties& properties = summary.getProperties();
271
272 for (JProperties::const_iterator i = properties.cbegin(); i != properties.cend(); ++i) {
273 out << i->second.toString() << delimiter;
274 }
275
276 out << RESET << endl;
277
278 return out;
279 }

◆ print() [2/2]

template<class T >
std::ostream & JCOMPAREHISTOGRAMS::print ( std::ostream & out,
const JTestSummary & summary,
T __begin,
T __end,
const char delimiter = ' ',
const bool useColors = true )
inline

Print test summary.

Parameters
outoutput stream
summarytest summary
__beginbegin list of keys
__endend list of keys
delimiterdelimiter
useColors

Definition at line 293 of file JTestSummary.hh.

299 {
300 using namespace std;
301 using namespace JPP;
302
303 out << scientific << setprecision(2);
304
305 if (useColors) {
306 out << (summary.passed ? GREEN : RED);
307 }
308
309 for (T i = __begin; i != __end; ++i) {
310
311 summary.getProperties()[*i]->write(out);
312
313 out << delimiter;
314 }
315
316 out << endl;
317
318 return out;
319 }
std::ostream & write(std::ostream &out) const
Write the current parameter values.

Variable Documentation

◆ PASSED_t

const char* const JCOMPAREHISTOGRAMS::PASSED_t = "PASSED"
static

Definition at line 28 of file JTestSummary.hh.

◆ FAILED_t

const char* const JCOMPAREHISTOGRAMS::FAILED_t = "FAILED"
static

Definition at line 29 of file JTestSummary.hh.