BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Friends
Result Class Reference

Base class of a result. More...

#include <Result.hh>

Inheritance diagram for Result:
Inheritance graph
Collaboration diagram for Result:
Collaboration graph

Public Member Functions

 Result (std::string nameIn, std::string objTypeIn)
 
virtual ~Result ()
 Virtual destructor.
 
virtual std::string print () const
 Print the result of the test - ie information store in the class.
 

Data Fields

std::string name
 Name of object being compared in files.
 
std::string objtype
 Name of class of object being compared in files.
 
bool passed
 Whether it passed or not.
 

Friends

std::ostream & operator<< (std::ostream &ostr, const Result &rhs)
 Overload ostream for easy printing.
 

Detailed Description

Base class of a result.

The basic information each test result should have. Public member class with compiler provided default constructor to use as a struct.

Author
Stewart Boogert

Definition at line 36 of file Result.hh.

Constructor & Destructor Documentation

◆ Result() [1/2]

Result::Result ( std::string  nameIn,
std::string  objTypeIn 
)
inline

Definition at line 39 of file Result.hh.

◆ Result() [2/2]

Result::Result ( )
inline

Definition at line 45 of file Result.hh.

◆ ~Result()

virtual Result::~Result ( )
inlinevirtual

Virtual destructor.

Definition at line 51 of file Result.hh.

Member Function Documentation

◆ print()

virtual std::string Result::print ( ) const
inlinevirtual

Print the result of the test - ie information store in the class.

Reimplemented in ResultEvent, ResultEventTree, ResultHistogram, ResultHistogram2D, ResultSampler, and ResultTree.

Definition at line 58 of file Result.hh.

References name, objtype, and passed.

Referenced by ResultEvent::print(), ResultEventTree::print(), ResultHistogram::print(), ResultSampler::print(), and ResultTree::print().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  ostr,
const Result rhs 
)
friend

Overload ostream for easy printing.

Definition at line 68 of file Result.hh.

Field Documentation

◆ name

std::string Result::name

Name of object being compared in files.

Definition at line 53 of file Result.hh.

Referenced by Compare::Histograms(), Compare::Optics(), print(), and Compare::Trees().

◆ objtype

std::string Result::objtype

Name of class of object being compared in files.

Definition at line 54 of file Result.hh.

Referenced by Compare::Histograms(), Compare::Optics(), print(), and Compare::Trees().

◆ passed

bool Result::passed

Whether it passed or not.

Definition at line 55 of file Result.hh.

Referenced by Compare::Histograms(), Compare::Optics(), print(), and Compare::Trees().


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