10 #ifndef ICARUSALG_UTILITIES_PASSCOUNTER_H
11 #define ICARUSALG_UTILITIES_PASSCOUNTER_H
14 namespace icarus::ns::util
15 {
template <
typename Count =
unsigned int>
class PassCounter; }
41 template <
typename Count >
111 template <
typename Count>
121 template <
typename Count>
132 #endif // ICARUSALG_UTILITIES_PASSCOUNTER_H
void reset()
Resets all counts.
Count_t total() const
Returns the total number of registered events.
Count_t const & totalRef() const
Direct read-only access to data members for derived classes.
void addFailed()
Adds a single event which did not "pass".
bool empty() const
Returns whether there is no event recorded yet.
Count_t fTotal
Total entries.
void add(bool pass)
Adds a single event, specifying whether it "passes" or not.
void addPassed()
Adds a single event which did "pass".
Count_t failed() const
Returns the number of events which "failed".
std::atomic< Count > Count_t
Type used for counters.
Count_t passed() const
Returns the number of events which "passed".
Class counting pass/fail events.
Count_t const & passedRef() const
Direct read-only access to data members for derived classes.
Count_t fPassed
Entries which "passed".