Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
 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.
 
JProperties getProperties (const JEquationParameters &equation=JTestSummary::getEquationParameters())
 Get properties of this class.
 
JProperties getProperties (const JEquationParameters &equation=JTestSummary::getEquationParameters()) const
 Get properties of this class.
 

Static Public Member Functions

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

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.
 
std::ostream & operator<< (std::ostream &out, JTestSummary &object)
 Write test summary to output.
 

Detailed Description

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

Definition at line 34 of file JTestSummary.hh.

Constructor & Destructor Documentation

◆ JTestSummary() [1/2]

JCOMPAREHISTOGRAMS::JTestSummary::JTestSummary ( )
inline

Default constructor.

Definition at line 41 of file JTestSummary.hh.

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

70 :
72 histogramA (hA),
73 histogramB (hB),
74 parameterName (parameter),
75 parameterValue (value),
76 parameterThreshold(threshold),
77 passed (passed),
79 {}
static const char *const PASSED_t

Member Function Documentation

◆ getEquationParameters()

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

Get equation parameters.

Returns
equation parameters

Definition at line 87 of file JTestSummary.hh.

88 {
89 static JEquationParameters equation("=", "; ", "", "#");
90
91 return equation;
92 }
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 100 of file JTestSummary.hh.

101 {
102 getEquationParameters() = equation;
103 }
static JEquationParameters & getEquationParameters()
Get equation parameters.

◆ getProperties() [1/2]

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

Get properties of this class.

Parameters
equationequation parameters

Definition at line 111 of file JTestSummary.hh.

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

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

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

Friends And Related Symbol 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 135 of file JTestSummary.hh.

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

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

162 {
163 const JFormat format(out);
164
165 out << object.testName << ' '
166 << object.histogramA << ' '
167 << object.histogramB << ' '
168 << object.parameterName << ' '
169 << object.parameterValue << ' '
170 << object.parameterThreshold << ' '
171 << object.passed_h;
172
173 return out;
174 }
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 176 of file JTestSummary.hh.

◆ histogramA

JRootObjectID JCOMPAREHISTOGRAMS::JTestSummary::histogramA

First histogram.

Definition at line 177 of file JTestSummary.hh.

◆ histogramB

JRootObjectID JCOMPAREHISTOGRAMS::JTestSummary::histogramB

Second histogram.

Definition at line 178 of file JTestSummary.hh.

◆ parameterName

std::string JCOMPAREHISTOGRAMS::JTestSummary::parameterName

Parameter evaluated by the test.

Definition at line 179 of file JTestSummary.hh.

◆ parameterValue

double JCOMPAREHISTOGRAMS::JTestSummary::parameterValue

Value of the parameter evaluated by the test.

Definition at line 180 of file JTestSummary.hh.

◆ parameterThreshold

double JCOMPAREHISTOGRAMS::JTestSummary::parameterThreshold

Threshold to evaluate the parameter.

Definition at line 181 of file JTestSummary.hh.

◆ passed

bool JCOMPAREHISTOGRAMS::JTestSummary::passed

True if the test passed.

Definition at line 182 of file JTestSummary.hh.

◆ passed_h

std::string JCOMPAREHISTOGRAMS::JTestSummary::passed_h

Human readable version of passed.

Definition at line 183 of file JTestSummary.hh.


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