herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
Statistics::Run Class Reference

A simulation run. More...

#include <Run.h>

Public Member Functions

 Run ()
 Default constructor.
 
 Run (const std::string &newName)
 Construct giving a name and seed.
 
virtual ~Run ()
 Destructor.
 
void initialize ()
 Initialize this run.
 
void reset ()
 Reset this run.
 
void finalize (size_t newAttemptedPoints)
 Finalize this run.
 
void count (double weight)
 Add a point to this run.
 
HistogramaddHistogram (const std::string &newName, const std::vector< double > &newBoundaries)
 Add a histogram.
 
HistogramaddHistogram (const std::string &newName, const std::vector< double > &newBoundaries, const std::pair< double, double > &newPeriodicity)
 Add a histogram.
 
Histogramhistogram (const std::string &histoName)
 Return a given histogram.
 
const Histogramhistogram (const std::string &histoName) const
 Return a given histogram.
 
const std::map< std::string, Histogram > & histograms () const
 Return the histograms.
 
const std::string & name () const
 Return the name of the run.
 
void name (const std::string &newName)
 Set the name of the run.
 
size_t attemptedPoints () const
 Return the total number of attempted points.
 
double sumOfWeights () const
 The sum of weights.
 
double sumOfSquaredWeights () const
 The sum of squared weights.
 
Runoperator+= (const Run &other)
 Add a run to this run.
 
void fromXML (const XML::Element &)
 Fill run data from an XML element.
 
XML::Element toXML () const
 Return an XML element for the data of this run.
 

Private Attributes

std::string theName
 The name of the run.
 
size_t theAttemptedPoints
 The total number of attempted points.
 
double theSumOfWeights
 The sum of weights.
 
double theSumOfSquaredWeights
 The sum of squared weights.
 
std::map< std::string, HistogramtheHistograms
 The histograms.
 

Detailed Description

A simulation run.

Author
Simon Platzer

Definition at line 19 of file Run.h.

Member Function Documentation

◆ attemptedPoints()

size_t Statistics::Run::attemptedPoints ( ) const
inline

Return the total number of attempted points.

Definition at line 106 of file Run.h.

References theAttemptedPoints.

◆ count()

void Statistics::Run::count ( double  weight)
inline

Add a point to this run.

Definition at line 60 of file Run.h.

References theSumOfSquaredWeights, and theSumOfWeights.

◆ histograms()

const std::map< std::string, Histogram > & Statistics::Run::histograms ( ) const
inline

Return the histograms.

Definition at line 91 of file Run.h.

References theHistograms.

◆ name() [1/2]

const std::string & Statistics::Run::name ( ) const
inline

Return the name of the run.

Definition at line 96 of file Run.h.

References theName.

◆ name() [2/2]

void Statistics::Run::name ( const std::string &  newName)
inline

Set the name of the run.

Definition at line 101 of file Run.h.

References theName.

◆ sumOfSquaredWeights()

double Statistics::Run::sumOfSquaredWeights ( ) const
inline

The sum of squared weights.

Definition at line 116 of file Run.h.

References theSumOfSquaredWeights.

◆ sumOfWeights()

double Statistics::Run::sumOfWeights ( ) const
inline

The sum of weights.

Definition at line 111 of file Run.h.

References theSumOfWeights.

Member Data Documentation

◆ theAttemptedPoints

size_t Statistics::Run::theAttemptedPoints
private

The total number of attempted points.

Definition at line 147 of file Run.h.

Referenced by attemptedPoints().

◆ theHistograms

std::map<std::string,Histogram> Statistics::Run::theHistograms
private

The histograms.

Definition at line 162 of file Run.h.

Referenced by histograms().

◆ theName

std::string Statistics::Run::theName
private

The name of the run.

Definition at line 142 of file Run.h.

Referenced by name().

◆ theSumOfSquaredWeights

double Statistics::Run::theSumOfSquaredWeights
private

The sum of squared weights.

Definition at line 157 of file Run.h.

Referenced by count(), and sumOfSquaredWeights().

◆ theSumOfWeights

double Statistics::Run::theSumOfWeights
private

The sum of weights.

Definition at line 152 of file Run.h.

Referenced by count(), and sumOfWeights().


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