Jpp 20.0.0-rc.2
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  JTestEffectiveLogLikelihoodRatio
 Implementation of the effective log-likelihood ratio test. 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...
 
struct  JTestResult
 Structure containing the result of the test. More...
 
class  JTestRuns_1D
 Implementation of the Wald-Wolfowitz runs test for 1D histograms. More...
 
class  JTestRuns_Slice2D
 Implementation of the Wald-Wolfowitz runs test for 2D histograms. More...
 
class  JTestSignificance
 Significance test. More...
 
class  JTestSlice2D
 Abstract base class for 2D slice tests. 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)
 Read test summary.
 
template<class T >
std::ostream & print (std::ostream &out, const JTestSummary &summary, T __begin, T __end, const bool useColors=true, const JFormat_t &formatting=JFormat_t(18, 3, std::ios::fixed))
 Print test summary.
 
std::ostream & print (std::ostream &out, const JTestSummary &summary, const bool useColors=true, const JFormat_t &formatting=JFormat_t(18, 3, std::ios::fixed))
 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 )
inline

Read test summary.

Parameters
ininput stream
summarytest summary

Definition at line 219 of file JTestSummary.hh.

221 {
222 using namespace std;
223 using namespace JPP;
224
225 JProperties properties = summary.getProperties();
226
227 for (JProperties::iterator i = properties.begin(); i != properties.end(); ++i) {
228
229 string buffer;
230 in >> buffer;
231
232 istringstream iss(buffer);
233
234 i->second->read(iss);
235 }
236
237 summary.passed = (summary.passed_h == PASSED_t);
238
239 return in;
240 }
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]

template<class T >
std::ostream & JCOMPAREHISTOGRAMS::print ( std::ostream & out,
const JTestSummary & summary,
T __begin,
T __end,
const bool useColors = true,
const JFormat_t & formatting = JFormat_t(18, 3, std::ios::fixed) )
inline

Print test summary.

Parameters
outoutput stream
summarytest summary
__beginbegin list of keys
__endend list of keys
useColorstoggle colors
formattingformatting

Definition at line 254 of file JTestSummary.hh.

260 {
261 using namespace std;
262 using namespace JPP;
263
264 const JFormat format(out, formatting);
265
266 if (useColors) {
267 out << (summary.passed ? GREEN : RED);
268 }
269
270 const JProperties& properties = summary.getProperties();
271
272 for (T i = __begin; i != __end; ++i) {
273
274 JProperties::const_iterator p = properties.find(*i);
275
276 if (p != properties.cend()) {
277
278 out << format;
279
280 p->second->write(out);
281
282 out << properties.getDefaultWhiteSpace();
283 }
284 }
285
286 out << RESET << endl;
287
288 return out;
289 }
const char getDefaultWhiteSpace() const
Get default white space character.
Auxiliary class to temporarily define format specifications.
Definition JManip.hh:636

◆ print() [2/2]

std::ostream & JCOMPAREHISTOGRAMS::print ( std::ostream & out,
const JTestSummary & summary,
const bool useColors = true,
const JFormat_t & formatting = JFormat_t(18, 3, std::ios::fixed) )
inline

Print test summary.

Parameters
outoutput stream
summarytest summary
useColorstoggle colors
formattingformatting

Definition at line 300 of file JTestSummary.hh.

304 {
305 using namespace std;
306 using namespace JPP;
307
308 const JProperties& properties = summary.getProperties();
309
310 const array_type<string>& keys = get_keys(properties);
311
312 return print(out, summary, keys.cbegin(), keys.cend(), useColors, formatting);
313 }
void print(const TH1 &h1, std::ostream &out)
Print histogram parameters.
Auxiliary data structure for return type of make methods.
Definition JVectorize.hh:28

Variable Documentation

◆ PASSED_t

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

Definition at line 29 of file JTestSummary.hh.

◆ FAILED_t

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

Definition at line 30 of file JTestSummary.hh.