#include <CFAlgoArray.h>
Public Types | |
enum | EvaluationMode_t { kPositiveAddition, kSimpleAddition, kMultiplication, kLastAlgo } |
Public Member Functions | |
CFAlgoArray () | |
Default constructor. More... | |
virtual | ~CFAlgoArray () |
Default destructor. More... | |
void | AddAlgo (CFloatAlgoBase *algo) |
Setter to add a new algorithm. More... | |
void | SetMode (EvaluationMode_t mode) |
Setter for an evaluation. More... | |
virtual float | Float (const std::vector< const cluster::ClusterParamsAlg * > &cluster) |
virtual void | Report () |
virtual void | Reset () |
Function to reset the algorithm instance, called together with manager's Reset() More... | |
virtual void | EventBegin (const std::vector< cluster::ClusterParamsAlg > &clusters) |
virtual void | EventEnd () |
virtual void | IterationBegin (const std::vector< cluster::ClusterParamsAlg > &clusters) |
virtual void | IterationEnd () |
Public Member Functions inherited from cmtool::CFloatAlgoBase | |
CFloatAlgoBase () | |
Default constructor. More... | |
virtual | ~CFloatAlgoBase () |
Default destructor. More... | |
Public Member Functions inherited from cmtool::CMAlgoBase | |
CMAlgoBase () | |
Default constructor. More... | |
virtual | ~CMAlgoBase () |
Default destructor. More... | |
void | SetAnaFile (TFile *fout) |
Setter function for an output plot TFile pointer. More... | |
virtual void | SetVerbose (bool doit=true) |
Setter function for verbosity. More... | |
Protected Attributes | |
std::vector< CFloatAlgoBase * > | _algo_array |
vector of algorithms More... | |
EvaluationMode_t | _mode |
evaluation mode More... | |
Protected Attributes inherited from cmtool::CMAlgoBase | |
TFile * | _fout |
TFile pointer to an output file. More... | |
bool | _verbose |
Boolean to choose verbose mode. Turned on if CMergeManager/CMatchManager's verbosity level is >= kPerMerging. More... | |
User implementation for CFloatAlgoBase class This is an array of priority algorithms. It has multiple modes to compute combined Float() return value.
Definition at line 26 of file CFAlgoArray.h.
Enumerator | |
---|---|
kPositiveAddition |
DEFAULT: simply add Float() return values except negative return. If there is a negative return value, it returns that and stop processing the rest of algorithms |
kSimpleAddition |
Simply add Float() return values from all algorithms. Note some algorithms are allowed to return negative values. |
kMultiplication |
Multiply Float() return values from all algorithms except negative return. If there is a negative return, it returns that and stop processing the rest of algorithms |
kLastAlgo |
If all algorithms return positive values, return the last algorithm's Float() return value. If any algorithm returns negative, it returns that and stop processing the rest of algorithms |
Definition at line 30 of file CFAlgoArray.h.
cmtool::CFAlgoArray::CFAlgoArray | ( | ) |
Default constructor.
Definition at line 6 of file CFAlgoArray.cxx.
|
inlinevirtual |
|
inline |
Setter to add a new algorithm.
Definition at line 63 of file CFAlgoArray.h.
|
inlinevirtual |
Optional function: called at the beginning of 1st iteration. This is called per event.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 86 of file CFAlgoArray.h.
|
inlinevirtual |
Optional function: called at the end of event ... after the last merging iteration is over.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 92 of file CFAlgoArray.h.
|
virtual |
Core function: given a set of CPANs, return a float which indicates the compatibility the cluster combination.
Reimplemented from cmtool::CFloatAlgoBase.
Definition at line 14 of file CFAlgoArray.cxx.
|
inlinevirtual |
Optional function: called at the beggining of each iterative loop. This provides all clusters' information in case the algorithm need them. Note this is called per iteration which may be more than once per event.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 100 of file CFAlgoArray.h.
|
inlinevirtual |
Optional function: called at the end of each iterative loop.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 106 of file CFAlgoArray.h.
|
inlinevirtual |
Optional function: called after each iterative approach if a manager class is run with verbosity level <= kPerIteration. Maybe useful for debugging.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 78 of file CFAlgoArray.h.
|
inlinevirtual |
Function to reset the algorithm instance, called together with manager's Reset()
Reimplemented from cmtool::CMAlgoBase.
Definition at line 81 of file CFAlgoArray.h.
|
inline |
|
protected |
vector of algorithms
Definition at line 112 of file CFAlgoArray.h.
|
protected |
evaluation mode
Definition at line 115 of file CFAlgoArray.h.