cmalgo.h
Go to the documentation of this file.
1 /**
2  * \file CMAlgo_Class_Name.h
3  *
4  * \ingroup Working_Package
5  *
6  * \brief Class def header for a class CMAlgo_Class_Name
7  *
8  * @author USER_NAME
9  */
10 
11 /** \addtogroup Working_Package
12 
13  @{*/
14 #ifndef CMALGO_CLASS_NAME_H
15 #define CMALGO_CLASS_NAME_H
16 
17 #include <iostream>
18 #include "CBoolAlgoBase.h"
19 
20 namespace cluster {
21  /**
22  \class CMAlgo_Class_Name
23  User implementation for CBoolAlgoBase class
24  doxygen documentation!
25  */
26  class CMAlgo_Class_Name : public CBoolAlgoBase {
27 
28  public:
29 
30  /// Default constructor
32 
33  /// Default destructor
34  virtual ~CMAlgo_Class_Name(){};
35 
36  /**
37  Optional function: called at the beginning of 1st iteration. This is called per event.
38  */
39  virtual void EventBegin(const std::vector<cluster::ClusterParamsAlg> &clusters);
40 
41  /**
42  Optional function: called at the end of event ... after the last merging iteration is over.
43  */
44  virtual void EventEnd();
45 
46  /**
47  Optional function: called at the beggining of each iteration over all pairs of clusters.
48  This provides all clusters' information in case the algorithm need them. Note this
49  is called per iteration which may be more than once per event.
50  */
51  virtual void IterationBegin(const std::vector<cluster::ClusterParamsAlg> &clusters);
52 
53  /**
54  Optional function: called at the end of each iteration over all pairs of clusters.
55  */
56  virtual void IterationEnd();
57 
58  /**
59  Core function: given the CPAN input, return whether a cluster should be
60  merged or not.
61  */
62  virtual bool Bool(const ClusterParamsAlg &cluster1,
63  const ClusterParamsAlg &cluster2);
64 
65  /**
66  Optional function: called after each Merge() function call by CMergeManager IFF
67  CMergeManager is run with verbosity level kPerMerging. Maybe useful for debugging.
68  */
69  virtual void Report();
70 
71  /// Function to reset the algorithm instance ... maybe implemented via child class
72  virtual void Reset();
73 
74  };
75 }
76 #endif
77 /** @} */ // end of doxygen group
78 
Class def header for algorithm classes for CMergeManager.
virtual void IterationEnd()
Definition: cmalgo.cxx:41
Cluster finding and building.
CMAlgo_Class_Name()
Default constructor.
Definition: cmalgo.cxx:6
virtual void EventBegin(const std::vector< cluster::ClusterParamsAlg > &clusters)
Definition: cmalgo.cxx:20
virtual void Reset()
Function to reset the algorithm instance ... maybe implemented via child class.
Definition: cmalgo.cxx:13
virtual void IterationBegin(const std::vector< cluster::ClusterParamsAlg > &clusters)
Definition: cmalgo.cxx:34
virtual bool Bool(const ClusterParamsAlg &cluster1, const ClusterParamsAlg &cluster2)
Definition: cmalgo.cxx:48
virtual void EventEnd()
Definition: cmalgo.cxx:27
virtual void Report()
Definition: cmalgo.cxx:56
virtual ~CMAlgo_Class_Name()
Default destructor.
Definition: cmalgo.h:34