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