Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
larreco
larreco
RecoAlg
CMTool
CMToolBase
CMAlgoBase.h
Go to the documentation of this file.
1
/**
2
* \file CMAlgoBase.h
3
*
4
* \ingroup CMTool
5
*
6
* \brief Class def header for a class CMAlgoBase
7
*
8
* @author kazuhiro
9
*/
10
11
/** \addtogroup CMTool
12
13
@{*/
14
#ifndef RECOTOOL_CMALGOBASE_H
15
#define RECOTOOL_CMALGOBASE_H
16
17
#include "
larreco/RecoAlg/ClusterRecoUtil/ClusterParamsAlg.h
"
18
#include <vector>
19
20
class
TFile;
21
22
namespace
cmtool {
23
24
/**
25
\class CMAlgoBase
26
An abstract base class for merging/matching algorithm. Having this base class helps
27
to have a better overall design of various merging for iterative approach.
28
The algorithms are run through CMergeManager.
29
*/
30
class
CMAlgoBase
{
31
public
:
32
CMAlgoBase
()
33
{
34
_fout
= 0;
35
_verbose
=
false
;
36
}
37
virtual
~CMAlgoBase
() =
default
;
38
39
/// Function to reset the algorithm instance called within CMergeManager/CMatchManager's Reset() ... maybe implemented via child class
40
virtual
void
41
Reset
()
42
{}
43
44
/**
45
Optional function: called at the beginning of 1st iteration. This is called per event.
46
*/
47
virtual
void
48
EventBegin
(
const
std::vector<cluster::ClusterParamsAlg>&)
49
{}
50
51
/**
52
Optional function: called at the end of event ... after the last merging iteration is over.
53
*/
54
virtual
void
55
EventEnd
()
56
{}
57
58
/**
59
Optional function: called at the beggining of each iteration over all pairs of clusters.
60
This provides all clusters' information in case the algorithm need them. Note this
61
is called per iteration which may be more than once per event.
62
*/
63
virtual
void
64
IterationBegin
(
const
std::vector<cluster::ClusterParamsAlg>&)
65
{}
66
67
/**
68
Optional function: called at the end of each iteration over all pairs of clusters.
69
*/
70
virtual
void
71
IterationEnd
()
72
{}
73
74
/**
75
Optional function: called after Bool() function is called for all possible cluster
76
pairs by CMergeManager/CMatchManager IFF run with verbosity level kPerIteration.
77
Maybe useful for debugging.
78
*/
79
virtual
void
80
Report
()
81
{}
82
83
/// Setter function for an output plot TFile pointer
84
void
85
SetAnaFile
(TFile*
fout
)
86
{
87
_fout
=
fout
;
88
}
89
90
/// Setter function for verbosity
91
virtual
void
92
SetVerbose
(
bool
doit =
true
)
93
{
94
_verbose
= doit;
95
}
96
97
protected
:
98
/// TFile pointer to an output file
99
TFile*
_fout
;
100
101
/// Boolean to choose verbose mode. Turned on if CMergeManager/CMatchManager's verbosity level is >= kPerMerging
102
bool
_verbose
;
103
};
104
105
}
106
107
#endif
108
/** @} */
// end of doxygen group
cmtool::CMAlgoBase::Report
virtual void Report()
Definition:
CMAlgoBase.h:80
cmtool::CMAlgoBase::_fout
TFile * _fout
TFile pointer to an output file.
Definition:
CMAlgoBase.h:99
cmtool::CMAlgoBase::EventEnd
virtual void EventEnd()
Definition:
CMAlgoBase.h:55
cmtool::CMAlgoBase::CMAlgoBase
CMAlgoBase()
Definition:
CMAlgoBase.h:32
cmtool::CMAlgoBase::Reset
virtual void Reset()
Function to reset the algorithm instance called within CMergeManager/CMatchManager's Reset() ...
Definition:
CMAlgoBase.h:41
ClusterParamsAlg.h
cmtool::CMAlgoBase::~CMAlgoBase
virtual ~CMAlgoBase()=default
cmtool::CMAlgoBase::SetAnaFile
void SetAnaFile(TFile *fout)
Setter function for an output plot TFile pointer.
Definition:
CMAlgoBase.h:85
cmtool::CMAlgoBase
Definition:
CMAlgoBase.h:30
run_simTestPulse.fout
tuple fout
Definition:
run_simTestPulse.py:33
cmtool::CMAlgoBase::SetVerbose
virtual void SetVerbose(bool doit=true)
Setter function for verbosity.
Definition:
CMAlgoBase.h:92
cmtool::CMAlgoBase::IterationBegin
virtual void IterationBegin(const std::vector< cluster::ClusterParamsAlg > &)
Definition:
CMAlgoBase.h:64
cmtool::CMAlgoBase::IterationEnd
virtual void IterationEnd()
Definition:
CMAlgoBase.h:71
cmtool::CMAlgoBase::_verbose
bool _verbose
Boolean to choose verbose mode. Turned on if CMergeManager/CMatchManager's verbosity level is >= kPer...
Definition:
CMAlgoBase.h:102
cmtool::CMAlgoBase::EventBegin
virtual void EventBegin(const std::vector< cluster::ClusterParamsAlg > &)
Definition:
CMAlgoBase.h:48
Generated by
1.8.5