Jpp  18.3.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions | Variables
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  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...
 
class  JTestDictionary
 Dictionary to map different tests to unique integer indices. More...
 

Functions

std::istream & read (std::istream &in, JTestSummary &summary, const char delimiter= ' ')
 Read test summary. More...
 
std::ostream & print (std::ostream &out, const JTestSummary &summary, const char delimiter= ' ', const bool useColors=true)
 Print test summary. More...
 
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. More...
 

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

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  }
Utility class to parse parameter values.
Definition: JProperties.hh:497
static const char *const PASSED_t
Definition: JTestSummary.hh:27
JProperties getProperties(const JEquationParameters &equation=JTestSummary::getEquationParameters())
Get properties of this class.
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
Definition: JString.hh:478
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
Definition: JCanberra.sh:48
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  }
Utility class to parse parameter values.
Definition: JProperties.hh:497
JProperties getProperties(const JEquationParameters &equation=JTestSummary::getEquationParameters())
Get properties of this class.
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  }
JProperties getProperties(const JEquationParameters &equation=JTestSummary::getEquationParameters())
Get properties of this class.
std::ostream & write(std::ostream &out) const
Write the current parameter values.
Definition: JProperties.hh:847
do set_variable OUTPUT_DIRECTORY $WORKDIR T

Variable Documentation

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

Definition at line 27 of file JTestSummary.hh.

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

Definition at line 28 of file JTestSummary.hh.