Jpp master_rocky-44-g75b7c4f75
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 222 of file JTestSummary.hh.

225 {
226 using namespace std;
227 using namespace JPP;
228
229 JProperties properties = summary.getProperties();
230
231 for (JProperties::iterator i = properties.begin(); i != properties.end(); ++i) {
232
233 string buffer;
234 getline(in, buffer, delimiter);
235
236 istringstream iss(buffer);
237
238 i->second->read(iss);
239 }
240
241 summary.passed = (summary.passed_h == PASSED_t);
242
243 return in;
244 }
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 255 of file JTestSummary.hh.

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

◆ 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 292 of file JTestSummary.hh.

298 {
299 using namespace std;
300 using namespace JPP;
301
302 out << scientific << setprecision(2);
303
304 if (useColors) {
305 out << (summary.passed ? GREEN : RED);
306 }
307
308 for (T i = __begin; i != __end; ++i) {
309
310 summary.getProperties()[*i]->write(out);
311
312 out << delimiter;
313 }
314
315 out << endl;
316
317 return out;
318 }
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 27 of file JTestSummary.hh.

◆ FAILED_t

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

Definition at line 28 of file JTestSummary.hh.