Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
JResultMessage Class Reference

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

#include <JTest_t.hh>

Public Member Functions

 JResultMessage ()
 Default constructor. More...
 
 JResultMessage (std::string testName, std::string nameA, std::string nameB, std::string parameter, double value, double threshold, bool passed)
 Constructor. More...
 
std::istream & read (std::istream &in)
 Read test parameters from input. More...
 
std::string getMessage ()
 Returns a standard string to be used as title of a graphical root object. More...
 

Public Attributes

std::string testName
 
std::string nameA
 
std::string nameB
 
std::string parameter
 
double value
 
double threshold
 
bool passed
 
std::string passed_h
 

Detailed Description

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

Definition at line 80 of file JTest_t.hh.

Constructor & Destructor Documentation

JResultMessage::JResultMessage ( )
inline

Default constructor.

Definition at line 86 of file JTest_t.hh.

86  :
87  testName (" "),
88  nameA (" "),
89  nameB (" "),
90  parameter (" "),
91  value (-9999.0),
92  threshold (-9999.0),
93  passed (false)
94  {};
std::string nameB
Definition: JTest_t.hh:153
std::string testName
Definition: JTest_t.hh:151
double value
Definition: JTest_t.hh:155
double threshold
Definition: JTest_t.hh:156
std::string parameter
Definition: JTest_t.hh:154
std::string nameA
Definition: JTest_t.hh:152
JResultMessage::JResultMessage ( std::string  testName,
std::string  nameA,
std::string  nameB,
std::string  parameter,
double  value,
double  threshold,
bool  passed 
)
inline

Constructor.

Parameters
testNameTest name
nameAName of the first histogram.
nameBName 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.

Definition at line 107 of file JTest_t.hh.

107  :
108  testName (testName),
109  nameA (nameA),
110  nameB (nameB),
112  value (value),
114  passed (passed)
115  {
116  passed_h = passed ? "PASSED" : "FAILED";
117  };
std::string nameB
Definition: JTest_t.hh:153
std::string testName
Definition: JTest_t.hh:151
std::string passed_h
Definition: JTest_t.hh:158
double value
Definition: JTest_t.hh:155
double threshold
Definition: JTest_t.hh:156
std::string parameter
Definition: JTest_t.hh:154
std::string nameA
Definition: JTest_t.hh:152

Member Function Documentation

std::istream& JResultMessage::read ( std::istream &  in)
inline

Read test parameters from input.

Parameters
ininput stream
Returns
input stream

Definition at line 125 of file JTest_t.hh.

125  {
126  in >>
127  testName >>
128  nameA >>
129  nameB >>
130  parameter >>
131  value >>
132  threshold >>
133  passed_h;
134  passed = (passed_h == "PASSED") ? 1 : 0;
135  return in;
136  };
std::string nameB
Definition: JTest_t.hh:153
std::string testName
Definition: JTest_t.hh:151
std::string passed_h
Definition: JTest_t.hh:158
double value
Definition: JTest_t.hh:155
double threshold
Definition: JTest_t.hh:156
std::string parameter
Definition: JTest_t.hh:154
std::string nameA
Definition: JTest_t.hh:152
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 source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:38
std::string JResultMessage::getMessage ( )
inline

Returns a standard string to be used as title of a graphical root object.

Definition at line 141 of file JTest_t.hh.

141  {
142  return MAKE_STRING(testName << " " <<
143  nameA << " " <<
144  nameB << " " <<
145  parameter << " " <<
146  value << " " <<
147  threshold << " " <<
148  passed_h);
149  }
std::string nameB
Definition: JTest_t.hh:153
std::string testName
Definition: JTest_t.hh:151
std::string passed_h
Definition: JTest_t.hh:158
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
double value
Definition: JTest_t.hh:155
double threshold
Definition: JTest_t.hh:156
std::string parameter
Definition: JTest_t.hh:154
std::string nameA
Definition: JTest_t.hh:152

Member Data Documentation

std::string JResultMessage::testName

Test name.

Definition at line 151 of file JTest_t.hh.

std::string JResultMessage::nameA

Name of the first histogram.

Definition at line 152 of file JTest_t.hh.

std::string JResultMessage::nameB

Name of the second histogram.

Definition at line 153 of file JTest_t.hh.

std::string JResultMessage::parameter

Parameter evaluated by the test".

Definition at line 154 of file JTest_t.hh.

double JResultMessage::value

Value of the parameter evaluated by the test.

Definition at line 155 of file JTest_t.hh.

double JResultMessage::threshold

Threshold to evaluate the parameter.

Definition at line 156 of file JTest_t.hh.

bool JResultMessage::passed

True if the test passed.

Definition at line 157 of file JTest_t.hh.

std::string JResultMessage::passed_h

Human readable version of passed.

Definition at line 158 of file JTest_t.hh.


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