PhoenixSwarm  3.5.0
Library to ease communication between daemons
Loading...
Searching...
No Matches
CheckStream< StatAccumulator > Struct Reference

Generic StatAccumulator Check function. More...

#include <Representation.h>

Static Public Member Functions

static bool check_stream (const std::string &fieldDescription, const StatAccumulator &data, const StatAccumulator &reference, std::ostream &out)
 Check Stream for a StatAccumulator.
 

Detailed Description

Generic StatAccumulator Check function.

Definition at line 529 of file Representation.h.

Member Function Documentation

◆ check_stream()

bool CheckStream< StatAccumulator >::check_stream ( const std::string & fieldDescription,
const StatAccumulator & data,
const StatAccumulator & reference,
std::ostream & out )
static

Check Stream for a StatAccumulator.

Parameters
fieldDescription: description of the field to be checked
data: data to be checked
reference: reference of the check
out: ostream used to collect feed back in case of error (std::cerr or a logger)
Returns
true on success, false otherwise

Definition at line 963 of file Representation.cpp.

963 {
964 bool b(true);
965 b &= CheckStream<size_t>::check_stream(fieldDescription + "\n- StatAccumulator::nbEvent", data.getNbEvent(), reference.getNbEvent(), out);
966 b &= CheckStream<float>::check_stream(fieldDescription + "\n- StatAccumulator::sum", data.getSum(), reference.getSum(), out);
967 b &= CheckStream<float>::check_stream(fieldDescription + "\n- StatAccumulator::min", data.getMin(), reference.getMin(), out);
968 b &= CheckStream<float>::check_stream(fieldDescription + "\n- StatAccumulator::max", data.getMax(), reference.getMax(), out);
969 b &= CheckStream<std::vector<size_t>>::check_stream(fieldDescription + "\n- StatAccumulator::vecHistogram", data.getVecHistogram(), reference.getVecHistogram(), out);
970 b &= CheckStream<float>::check_stream(fieldDescription + "\n- StatAccumulator::histLowerBound", data.getHistLowerBound(), reference.getHistLowerBound(), out);
971 b &= CheckStream<float>::check_stream(fieldDescription + "\n- StatAccumulator::histUpperBound", data.getHistUpperBound(), reference.getHistUpperBound(), out);
972 b &= CheckStream<size_t>::check_stream(fieldDescription + "\n- StatAccumulator::nbEventBelowLowerBound", data.getNbEventBelowLowerBound(), reference.getNbEventBelowLowerBound(), out);
973 b &= CheckStream<size_t>::check_stream(fieldDescription + "\n- StatAccumulator::nbEventAboveUpperBound", data.getNbEventAboveUpperBound(), reference.getNbEventAboveUpperBound(), out);
974 return b;
975}
float getHistUpperBound() const
Gets the histUpperBound of the StatAccumulator.
float getSum() const
Gets the sum of the StatAccumulator.
size_t getNbEvent() const
Gets the nbEvent of the StatAccumulator.
float getMax() const
Gets the max of the StatAccumulator.
size_t getNbEventAboveUpperBound() const
Gets the nbEventAboveUpperBound of the StatAccumulator.
float getMin() const
Gets the min of the StatAccumulator.
float getHistLowerBound() const
Gets the histLowerBound of the StatAccumulator.
size_t getNbEventBelowLowerBound() const
Gets the nbEventBelowLowerBound of the StatAccumulator.
const std::vector< size_t > & getVecHistogram() const
Gets the vecHistogram of the StatAccumulator.
static bool check_stream(const std::string &fieldDescription, const StatAccumulator &data, const StatAccumulator &reference, std::ostream &out)
Check Stream for a StatAccumulator.

References check_stream(), StatAccumulator::getHistLowerBound(), StatAccumulator::getHistUpperBound(), StatAccumulator::getMax(), StatAccumulator::getMin(), StatAccumulator::getNbEvent(), StatAccumulator::getNbEventAboveUpperBound(), StatAccumulator::getNbEventBelowLowerBound(), StatAccumulator::getSum(), and StatAccumulator::getVecHistogram().

Referenced by check_stream().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this struct was generated from the following files: