#ifndef __JCOMPAREHISTOGRAMS__JRESULTTITLE_T__ #define __JCOMPAREHISTOGRAMS__JRESULTTITLE_T__ #include #include "Jeep/JPrint.hh" #include "Jeep/JProperties.hh" /** * \author rgruiz */ namespace JCOMPAREHISTOGRAMS {} namespace JPP { using namespace JCOMPAREHISTOGRAMS; } namespace JCOMPAREHISTOGRAMS { /** * Class dedicated to standardize the title of the graphical objects produced by the JTest_t() derived classes. */ class JResultTitle: public JProperties { public: /** * Default constructor */ JResultTitle() { this->setEndOfLine(":"); this->insert(gmake_property(name)); this->insert(gmake_property(parameter)); this->insert(gmake_property(value)); this->insert(gmake_property(passed)); }; /** * Constructor * * \param Name Test name * \param Parameter Name of the parameter used to decide if the test passes. * \param Value Value of the parameter used to decide if the test passes. * \param Passed True if the test passes, false if it fails. */ JResultTitle(std::string Name, std::string Parameter, bool Passed, double Value): name (Name), parameter (Parameter), value (Value) { this->setEndOfLine(":"); passed = Passed ? "TRUE" : "FALSE"; this->insert(gmake_property(name)); this->insert(gmake_property(parameter)); this->insert(gmake_property(value)); this->insert(gmake_property(passed)); } /** * Returns a standard string to be used as title of a graphical root object. */ std::string getTitle(){ return MAKE_STRING(*this); } std::string name; /*!< Test name. */ std::string parameter; /*!< Name of the parameter used to evaluate the test. */ std::string passed; /*!< Human readable version of "passed". */ double value; /*!< Value of the parameter used to evaluate the test.*/ }; } #endif