LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
CMAlgoBase.h
Go to the documentation of this file.
1 
14 #ifndef RECOTOOL_CMALGOBASE_H
15 #define RECOTOOL_CMALGOBASE_H
16 
17 #include <iostream>
19 #include "TFile.h"
20 
21 namespace cmtool {
22 
29  class CMAlgoBase {
30 
31  public:
32 
34  CMAlgoBase(){ _fout = 0; _verbose = false; }
35 
37  virtual ~CMAlgoBase(){}
38 
40  virtual void Reset(){}
41 
45  virtual void EventBegin(const std::vector<cluster::ClusterParamsAlg> &clusters)
46  { if(clusters.size()) return; }
47 
51  virtual void EventEnd()
52  {return;}
53 
59  virtual void IterationBegin(const std::vector<cluster::ClusterParamsAlg> &clusters)
60  { if(clusters.size()) return;}
61 
65  virtual void IterationEnd()
66  {return; }
67 
73  virtual void Report()
74  {return;}
75 
77  void SetAnaFile(TFile* fout) { _fout = fout; }
78 
80  virtual void SetVerbose(bool doit=true) { _verbose = doit; }
81 
82  protected:
83 
85  TFile* _fout;
86 
88  bool _verbose;
89  };
90 
91 }
92 
93 #endif
94  // end of doxygen group
95 
virtual void Report()
Definition: CMAlgoBase.h:73
TFile * _fout
TFile pointer to an output file.
Definition: CMAlgoBase.h:85
virtual void EventEnd()
Definition: CMAlgoBase.h:51
CMAlgoBase()
Default constructor.
Definition: CMAlgoBase.h:34
virtual void Reset()
Function to reset the algorithm instance called within CMergeManager/CMatchManager&#39;s Reset() ...
Definition: CMAlgoBase.h:40
void SetAnaFile(TFile *fout)
Setter function for an output plot TFile pointer.
Definition: CMAlgoBase.h:77
virtual void IterationBegin(const std::vector< cluster::ClusterParamsAlg > &clusters)
Definition: CMAlgoBase.h:59
virtual void EventBegin(const std::vector< cluster::ClusterParamsAlg > &clusters)
Definition: CMAlgoBase.h:45
virtual ~CMAlgoBase()
Default destructor.
Definition: CMAlgoBase.h:37
virtual void SetVerbose(bool doit=true)
Setter function for verbosity.
Definition: CMAlgoBase.h:80
virtual void IterationEnd()
Definition: CMAlgoBase.h:65
bool _verbose
Boolean to choose verbose mode. Turned on if CMergeManager/CMatchManager&#39;s verbosity level is >= kPer...
Definition: CMAlgoBase.h:88