LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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:
53  };
54 
56  CPAlgoArray();
57 
59  virtual ~CPAlgoArray(){};
60 
62  void AddAlgo(CPriorityAlgoBase* algo) { _algo_array.push_back(algo); }
63 
65  void SetMode(EvaluationMode_t mode) { _mode = mode; }
66 
71  virtual float Priority(const ::cluster::ClusterParamsAlg& cluster);
72 
77  virtual void Report()
78  {
79  for (auto const& algo : _algo_array)
80  algo->Report();
81  }
82 
84  virtual void Reset()
85  {
86  for (auto const& algo : _algo_array)
87  algo->Reset();
88  }
89 
93  virtual void EventBegin(const std::vector<cluster::ClusterParamsAlg>& clusters)
94  {
95  for (auto const& algo : _algo_array)
96  algo->EventBegin(clusters);
97  }
98 
102  virtual void EventEnd()
103  {
104  for (auto const& algo : _algo_array)
105  algo->EventEnd();
106  }
107 
113  virtual void IterationBegin(const std::vector<cluster::ClusterParamsAlg>& clusters)
114  {
115  for (auto const& algo : _algo_array)
116  algo->IterationBegin(clusters);
117  }
118 
122  virtual void IterationEnd()
123  {
124  for (auto const& algo : _algo_array)
125  algo->IterationEnd();
126  }
127 
128  protected:
130  std::vector<CPriorityAlgoBase*> _algo_array;
131 
134  };
135 }
136 #endif
137  // end of doxygen group
virtual void EventEnd()
Definition: CPAlgoArray.h:102
virtual void EventBegin(const std::vector< cluster::ClusterParamsAlg > &clusters)
Definition: CPAlgoArray.h:93
virtual void IterationEnd()
Definition: CPAlgoArray.h:122
void AddAlgo(CPriorityAlgoBase *algo)
Setter to add a new algorithm.
Definition: CPAlgoArray.h:62
Cluster finding and building.
virtual void IterationBegin(const std::vector< cluster::ClusterParamsAlg > &clusters)
Definition: CPAlgoArray.h:113
Class def header for a class CPriorityAlgoBase.
virtual ~CPAlgoArray()
Default destructor.
Definition: CPAlgoArray.h:59
CPAlgoArray()
Default constructor.
Definition: CPAlgoArray.cxx:6
std::vector< CPriorityAlgoBase * > _algo_array
vector of algorithms
Definition: CPAlgoArray.h:130
virtual float Priority(const ::cluster::ClusterParamsAlg &cluster)
Definition: CPAlgoArray.cxx:14
virtual void Report()
Definition: CPAlgoArray.h:77
EvaluationMode_t _mode
evaluation mode
Definition: CPAlgoArray.h:133
virtual void Reset()
Function to reset the algorithm instance, called together with manager&#39;s Reset()
Definition: CPAlgoArray.h:84
void SetMode(EvaluationMode_t mode)
Setter for an evaluation.
Definition: CPAlgoArray.h:65