#include <Majority.h>
Public Member Functions | |
void | add (const T &value) |
void | add (const T &value) |
Majority () | |
Majority () | |
T | result (double *proba) const |
T | result (double *proba) const |
virtual | ~Majority () |
virtual | ~Majority () |
Private Attributes | |
double | n_ |
std::map< T, double > | votes_ |
Utility class to take a decision on majority based. Used by MatacqProducer.
Definition at line 13 of file Majority.h.
void Majority< T >::add | ( | const T & | value | ) | [inline] |
Definition at line 25 of file Majority.h.
References Majority< T >::n_, relativeConstraints::value, and Majority< T >::votes_.
Referenced by MatacqProducer::getCalibTriggerType(), and LaserSorter::getDetailedTriggerType().
void Majority< T >::add | ( | const T & | value | ) | [inline] |
Collects event
value | event |
Definition at line 29 of file Majority.h.
References Majority< T >::n_, relativeConstraints::value, and Majority< T >::votes_.
T Majority< T >::result | ( | double * | proba | ) | const [inline] |
Result of majority decision
proba. | If not null, filled with the frequency of the selected value. |
Definition at line 39 of file Majority.h.
References m, Majority< T >::n_, and Majority< T >::votes_.
T Majority< T >::result | ( | double * | proba | ) | const [inline] |
Definition at line 30 of file Majority.h.
References m, Majority< T >::n_, and Majority< T >::votes_.
Referenced by MatacqProducer::getCalibTriggerType(), and LaserSorter::getDetailedTriggerType().
Definition at line 51 of file Majority.h.
Referenced by Majority< T >::add(), and Majority< T >::result().
Definition at line 50 of file Majority.h.
Referenced by Majority< T >::add(), and Majority< T >::result().