Jpp  master_rocky-37-gf0c5bc59d
the software that should make you happy
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
JCOMPAREHISTOGRAMS::JTestSummary Class Reference

Class dedicated to standardize the title of the graphical objects produced by the JTest_t() derived classes. More...

#include <JTestSummary.hh>

Inheritance diagram for JCOMPAREHISTOGRAMS::JTestSummary:
JCOMPAREHISTOGRAMS::JTestResult

Classes

class  JTestSummaryHelper
 Auxiliary class for I/O of test result message. More...
 

Public Member Functions

 JTestSummary ()
 Default constructor. More...
 
 JTestSummary (const std::string &testName, const JRootObjectID &hA, const JRootObjectID &hB, const std::string &parameter, const double value, const double threshold, const bool passed)
 Constructor. More...
 
JProperties getProperties (const JEquationParameters &equation=JTestSummary::getEquationParameters())
 Get properties of this class. More...
 
JProperties getProperties (const JEquationParameters &equation=JTestSummary::getEquationParameters()) const
 Get properties of this class. More...
 

Static Public Member Functions

static JEquationParametersgetEquationParameters ()
 Get equation parameters. More...
 
static void setEquationParameters (const JEquationParameters &equation)
 Set equation parameters. More...
 

Public Attributes

std::string testName
 
JRootObjectID histogramA
 
JRootObjectID histogramB
 
std::string parameterName
 
double parameterValue
 
double parameterThreshold
 
bool passed
 
std::string passed_h
 

Friends

std::istream & operator>> (std::istream &in, JTestSummary &object)
 Read test summary from input. More...
 
std::ostream & operator<< (std::ostream &out, JTestSummary &object)
 Write test summary to output. More...
 

Detailed Description

Class dedicated to standardize the title of the graphical objects produced by the JTest_t() derived classes.

Definition at line 33 of file JTestSummary.hh.

Constructor & Destructor Documentation

◆ JTestSummary() [1/2]

JCOMPAREHISTOGRAMS::JTestSummary::JTestSummary ( )
inline

Default constructor.

Definition at line 40 of file JTestSummary.hh.

40  :
41  testName (""),
44  parameterName (""),
45  parameterValue (0.0),
46  parameterThreshold(0.0),
47  passed (false),
49  {}
Auxiliary class to handle file name, ROOT directory and object name.
static const char *const FAILED_t
Definition: JTestSummary.hh:28

◆ JTestSummary() [2/2]

JCOMPAREHISTOGRAMS::JTestSummary::JTestSummary ( const std::string &  testName,
const JRootObjectID hA,
const JRootObjectID hB,
const std::string &  parameter,
const double  value,
const double  threshold,
const bool  passed 
)
inline

Constructor.

Parameters
testNameTest name
hAName of the first histogram.
hBName of the second histogram.
parameterName of the parameter used for the test.
thresholdThreshold value for the tested parameter.
valueValue of the tested parameter.
passedtrue if the test is passed; else false.

Definition at line 63 of file JTestSummary.hh.

69  :
71  histogramA (hA),
72  histogramB (hB),
73  parameterName (parameter),
74  parameterValue (value),
75  parameterThreshold(threshold),
76  passed (passed),
78  {}
static const char *const PASSED_t
Definition: JTestSummary.hh:27

Member Function Documentation

◆ getEquationParameters()

static JEquationParameters& JCOMPAREHISTOGRAMS::JTestSummary::getEquationParameters ( )
inlinestatic

Get equation parameters.

Returns
equation parameters

Definition at line 86 of file JTestSummary.hh.

87  {
88  static JEquationParameters equation("=", "; ", "", "#");
89 
90  return equation;
91  }
Simple data structure to support I/O of equations (see class JLANG::JEquation).

◆ setEquationParameters()

static void JCOMPAREHISTOGRAMS::JTestSummary::setEquationParameters ( const JEquationParameters equation)
inlinestatic

Set equation parameters.

Parameters
equationequation parameters

Definition at line 99 of file JTestSummary.hh.

100  {
101  getEquationParameters() = equation;
102  }
static JEquationParameters & getEquationParameters()
Get equation parameters.
Definition: JTestSummary.hh:86

◆ getProperties() [1/2]

JProperties JCOMPAREHISTOGRAMS::JTestSummary::getProperties ( const JEquationParameters equation = JTestSummary::getEquationParameters())
inline

Get properties of this class.

Parameters
equationequation parameters

Definition at line 110 of file JTestSummary.hh.

111  {
112  return JTestSummaryHelper(*this, equation);
113  }

◆ getProperties() [2/2]

JProperties JCOMPAREHISTOGRAMS::JTestSummary::getProperties ( const JEquationParameters equation = JTestSummary::getEquationParameters()) const
inline

Get properties of this class.

Parameters
equationequation parameters

Definition at line 121 of file JTestSummary.hh.

122  {
123  return JTestSummaryHelper(*this, equation);
124  }

Friends And Related Function Documentation

◆ operator>>

std::istream& operator>> ( std::istream &  in,
JTestSummary object 
)
friend

Read test summary from input.

Parameters
ininput stream
objecttest summary
Returns
input stream

Definition at line 134 of file JTestSummary.hh.

136  {
137  using namespace std;
138 
139  in >> object.testName
140  >> object.histogramA
141  >> object.histogramB
142  >> object.parameterName
143  >> object.parameterThreshold
144  >> object.passed_h;
145 
146  object.passed = (object.passed_h == PASSED_t) ? 1 : 0;
147 
148  return in;
149  }
Definition: JSTDTypes.hh:14

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
JTestSummary object 
)
friend

Write test summary to output.

Parameters
outoutput stream
objecttest summary
Returns
output stream

Definition at line 159 of file JTestSummary.hh.

161  {
162  const JFormat format(out);
163 
164  out << object.testName << ' '
165  << object.histogramA << ' '
166  << object.histogramB << ' '
167  << object.parameterName << ' '
168  << object.parameterValue << ' '
169  << object.parameterThreshold << ' '
170  << object.passed_h;
171 
172  return out;
173  }
Auxiliary class to temporarily define format specifications.
Definition: JManip.hh:636

Member Data Documentation

◆ testName

std::string JCOMPAREHISTOGRAMS::JTestSummary::testName

Test name.

Definition at line 175 of file JTestSummary.hh.

◆ histogramA

JRootObjectID JCOMPAREHISTOGRAMS::JTestSummary::histogramA

First histogram.

Definition at line 176 of file JTestSummary.hh.

◆ histogramB

JRootObjectID JCOMPAREHISTOGRAMS::JTestSummary::histogramB

Second histogram.

Definition at line 177 of file JTestSummary.hh.

◆ parameterName

std::string JCOMPAREHISTOGRAMS::JTestSummary::parameterName

Parameter evaluated by the test.

Definition at line 178 of file JTestSummary.hh.

◆ parameterValue

double JCOMPAREHISTOGRAMS::JTestSummary::parameterValue

Value of the parameter evaluated by the test.

Definition at line 179 of file JTestSummary.hh.

◆ parameterThreshold

double JCOMPAREHISTOGRAMS::JTestSummary::parameterThreshold

Threshold to evaluate the parameter.

Definition at line 180 of file JTestSummary.hh.

◆ passed

bool JCOMPAREHISTOGRAMS::JTestSummary::passed

True if the test passed.

Definition at line 181 of file JTestSummary.hh.

◆ passed_h

std::string JCOMPAREHISTOGRAMS::JTestSummary::passed_h

Human readable version of passed.

Definition at line 182 of file JTestSummary.hh.


The documentation for this class was generated from the following file: