LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
CFAlgoArray.h
Go to the documentation of this file.
1 
14 #ifndef RECOTOOL_CFALGOARRAY_H
15 #define RECOTOOL_CFALGOARRAY_H
16 
18 
19 namespace cmtool {
26  class CFAlgoArray : public CFloatAlgoBase {
27 
28  public:
29 
54  };
55 
57  CFAlgoArray();
58 
60  virtual ~CFAlgoArray(){};
61 
63  void AddAlgo(CFloatAlgoBase* algo) { _algo_array.push_back(algo); }
64 
66  void SetMode(EvaluationMode_t mode) { _mode = mode; }
67 
72  virtual float Float(const std::vector<const cluster::ClusterParamsAlg*> &cluster);
73 
78  virtual void Report() { for(auto const& algo : _algo_array) algo->Report(); }
79 
81  virtual void Reset() { for(auto const& algo : _algo_array) algo->Reset(); }
82 
86  virtual void EventBegin(const std::vector<cluster::ClusterParamsAlg> &clusters)
87  { for(auto const& algo : _algo_array) algo->EventBegin(clusters); }
88 
92  virtual void EventEnd()
93  { for(auto const& algo : _algo_array) algo->EventEnd(); }
94 
100  virtual void IterationBegin(const std::vector<cluster::ClusterParamsAlg> &clusters)
101  { for(auto const& algo : _algo_array) algo->IterationBegin(clusters); }
102 
106  virtual void IterationEnd()
107  { for(auto const& algo : _algo_array) algo->IterationEnd(); }
108 
109  protected:
110 
112  std::vector<CFloatAlgoBase*> _algo_array;
113 
116 
117  };
118 }
119 #endif
120  // end of doxygen group
121 
CFAlgoArray()
Default constructor.
Definition: CFAlgoArray.cxx:9
virtual float Float(const std::vector< const cluster::ClusterParamsAlg * > &cluster)
Definition: CFAlgoArray.cxx:17
EvaluationMode_t _mode
evaluation mode
Definition: CFAlgoArray.h:115
Class def header for a class CFloatAlgoBase.
Cluster finding and building.
virtual ~CFAlgoArray()
Default destructor.
Definition: CFAlgoArray.h:60
virtual void IterationBegin(const std::vector< cluster::ClusterParamsAlg > &clusters)
Definition: CFAlgoArray.h:100
void SetMode(EvaluationMode_t mode)
Setter for an evaluation.
Definition: CFAlgoArray.h:66
virtual void EventBegin(const std::vector< cluster::ClusterParamsAlg > &clusters)
Definition: CFAlgoArray.h:86
virtual void Report()
Definition: CFAlgoArray.h:78
virtual void Reset()
Function to reset the algorithm instance, called together with manager&#39;s Reset()
Definition: CFAlgoArray.h:81
std::vector< CFloatAlgoBase * > _algo_array
vector of algorithms
Definition: CFAlgoArray.h:112
virtual void EventEnd()
Definition: CFAlgoArray.h:92
void AddAlgo(CFloatAlgoBase *algo)
Setter to add a new algorithm.
Definition: CFAlgoArray.h:63
virtual void IterationEnd()
Definition: CFAlgoArray.h:106