LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "CMManagerBase.h"
Public Types | |
enum | CMMSGLevel_t { kPerMerging, kPerIteration, kPerEvent, kNone } |
Enum to specify message output level. More... | |
Public Member Functions | |
CMManagerBase () | |
Default constructor. More... | |
virtual | ~CMManagerBase () |
Default destructor. More... | |
void | DebugMode (CMMSGLevel_t level) |
Method to enable debug mode (lots of couts) More... | |
void | ReportTimings (bool time_report=true) |
Method to enable timing profile cout. More... | |
void | Reset () |
Method to reset itself. More... | |
void | AddPriorityAlgo (CPriorityAlgoBase *algo) |
Setter to add an algorithm for priority determination. More... | |
void | MergeTillConverge (bool doit=true) |
Switch to continue merging till converges. More... | |
void | SetClusters (const std::vector< std::vector< util::PxHit > > &clusters) |
A simple method to add a cluster. More... | |
void | SetClusters (const std::vector< cluster::ClusterParamsAlg > &clusters) |
A simple method to add a cluster. More... | |
const std::vector< cluster::ClusterParamsAlg > & | GetInputClusters () const |
A getter for input clusters. More... | |
void | SetMinNHits (unsigned int n) |
A setter for minimum # of hits ... passed onto ClusterParamsAlg. More... | |
void | Process () |
A method to execute the main action, to be called per event. More... | |
void | SetAnaFile (TFile *fout) |
A setter for an analysis output file. More... | |
Protected Member Functions | |
void | ComputePriority (const std::vector< cluster::ClusterParamsAlg > &clusters) |
Function to compute priority. More... | |
virtual void | EventBegin () |
FMWK function called @ beginning of Process() More... | |
virtual void | IterationBegin () |
FMWK function called @ beginning of iterative loop inside Process() More... | |
virtual bool | IterationProcess ()=0 |
FMWK function called @ iterative loop inside Process() More... | |
virtual void | IterationEnd () |
FMWK function called @ end of iterative loop inside Process() More... | |
virtual void | EventEnd () |
FMWK function called @ end of Process() More... | |
Protected Attributes | |
bool | _time_report |
Timing verbosity flag. More... | |
unsigned int | _min_nhits |
Minimum number of hits: the limit set for ClusterParamsAlg. More... | |
CMMSGLevel_t | _debug_mode |
Debug mode switch. More... | |
std::vector< cluster::ClusterParamsAlg > | _in_clusters |
Input clusters. More... | |
::cmtool::CPriorityAlgoBase * | _priority_algo |
Priority algorithm. More... | |
TFile * | _fout |
Output analysis plot TFile. More... | |
std::multimap< float, size_t > | _priority |
Priority record. More... | |
bool | _merge_till_converge |
Iteration loop switch. More... | |
std::set< UChar_t > | _planes |
A holder for # of unique planes in the clusters, computed in ComputePriority() function. More... | |
A class that instantiates merging algorithm(s) and run. The book-keeping of merged cluster sets are done by CMergeBookKeeper.
Definition at line 29 of file CMManagerBase.h.
Enum to specify message output level.
Enumerator | |
---|---|
kPerMerging |
Extremely verbose (cout per individual algorithm execution) |
kPerIteration |
Somewhat verbose (cout per merging iteration) |
kPerEvent |
Bit verbose (cout per event) |
kNone |
Normal. |
Definition at line 34 of file CMManagerBase.h.
cmtool::CMManagerBase::CMManagerBase | ( | ) |
Default constructor.
Definition at line 8 of file CMManagerBase.cxx.
References _debug_mode, _fout, _merge_till_converge, _min_nhits, _priority_algo, _time_report, kNone, and Reset().
|
inlinevirtual |
|
inline |
Setter to add an algorithm for priority determination.
Definition at line 63 of file CMManagerBase.h.
References _priority_algo.
Referenced by cluster::FuzzyClusterMerger::FuzzyClusterMerger(), and ShowerReco3D::ShowerReco3D().
|
protected |
Function to compute priority.
Definition at line 147 of file CMManagerBase.cxx.
References _planes, _priority, _priority_algo, _time_report, and cmtool::CPriorityAlgoBase::Priority().
Referenced by cmtool::CMatchManager::IterationProcess(), cmtool::CMergeManager::IterationProcess(), and SetAnaFile().
|
inline |
Method to enable debug mode (lots of couts)
Definition at line 54 of file CMManagerBase.h.
References _debug_mode.
Referenced by cluster::SimpleClusterMerger::SimpleClusterMerger().
|
inlineprotectedvirtual |
FMWK function called @ beginning of Process()
Reimplemented in cmtool::CMergeManager, and cmtool::CMatchManager.
Definition at line 94 of file CMManagerBase.h.
Referenced by Process().
|
inlineprotectedvirtual |
FMWK function called @ end of Process()
Reimplemented in cmtool::CMergeManager, and cmtool::CMatchManager.
Definition at line 106 of file CMManagerBase.h.
Referenced by Process().
|
inline |
A getter for input clusters.
Definition at line 76 of file CMManagerBase.h.
References _in_clusters.
Referenced by showerreco::ShowerRecoManager::Process().
|
inlineprotectedvirtual |
FMWK function called @ beginning of iterative loop inside Process()
Reimplemented in cmtool::CMergeManager, and cmtool::CMatchManager.
Definition at line 97 of file CMManagerBase.h.
References IterationProcess().
Referenced by Process().
|
inlineprotectedvirtual |
FMWK function called @ end of iterative loop inside Process()
Reimplemented in cmtool::CMergeManager, and cmtool::CMatchManager.
Definition at line 103 of file CMManagerBase.h.
Referenced by Process().
|
protectedpure virtual |
FMWK function called @ iterative loop inside Process()
Implemented in cmtool::CMergeManager, and cmtool::CMatchManager.
Referenced by IterationBegin(), and Process().
|
inline |
Switch to continue merging till converges.
Definition at line 66 of file CMManagerBase.h.
References _merge_till_converge, SetClusters(), and lar::dump::vector().
Referenced by cluster::FuzzyClusterMerger::FuzzyClusterMerger(), and cluster::SimpleClusterMerger::SimpleClusterMerger().
void cmtool::CMManagerBase::Process | ( | ) |
A method to execute the main action, to be called per event.
Definition at line 83 of file CMManagerBase.cxx.
References _debug_mode, _in_clusters, _merge_till_converge, _time_report, EventBegin(), EventEnd(), IterationBegin(), IterationEnd(), IterationProcess(), and kPerIteration.
Referenced by cluster::ClusterMergeHelper::Process(), showerreco::ShowerRecoManager::Reconstruct(), and SetMinNHits().
|
inline |
Method to enable timing profile cout.
Definition at line 57 of file CMManagerBase.h.
References _time_report, and Reset().
void cmtool::CMManagerBase::Reset | ( | ) |
Method to reset itself.
Definition at line 19 of file CMManagerBase.cxx.
References _in_clusters, _planes, _priority_algo, and cmtool::CMAlgoBase::Reset().
Referenced by CMManagerBase(), ReportTimings(), cmtool::CMergeManager::Reset(), cmtool::CMatchManager::Reset(), and SetClusters().
|
inline |
A setter for an analysis output file.
Definition at line 86 of file CMManagerBase.h.
References _fout, and ComputePriority().
void cmtool::CMManagerBase::SetClusters | ( | const std::vector< std::vector< util::PxHit > > & | clusters | ) |
A simple method to add a cluster.
Definition at line 26 of file CMManagerBase.cxx.
References _in_clusters, _min_nhits, _time_report, Initialize(), Reset(), cluster::ClusterParamsAlg::SetMinNHits(), and cluster::ClusterParamsAlg::SetVerbose().
Referenced by MergeTillConverge(), showerreco::ShowerRecoManager::Reconstruct(), and cluster::ClusterMergeHelper::SetClusters().
void cmtool::CMManagerBase::SetClusters | ( | const std::vector< cluster::ClusterParamsAlg > & | clusters | ) |
A simple method to add a cluster.
Definition at line 70 of file CMManagerBase.cxx.
References _in_clusters, and _time_report.
|
inline |
A setter for minimum # of hits ... passed onto ClusterParamsAlg.
Definition at line 80 of file CMManagerBase.h.
References _min_nhits, n, and Process().
|
protected |
Debug mode switch.
Definition at line 117 of file CMManagerBase.h.
Referenced by CMManagerBase(), DebugMode(), cmtool::CMatchManager::EventBegin(), cmtool::CMergeManager::EventBegin(), cmtool::CMergeManager::IterationBegin(), cmtool::CMergeManager::IterationEnd(), cmtool::CMatchManager::IterationProcess(), cmtool::CMergeManager::IterationProcess(), Process(), cmtool::CMergeManager::RunMerge(), and cmtool::CMergeManager::RunSeparate().
|
protected |
Output analysis plot TFile.
Definition at line 126 of file CMManagerBase.h.
Referenced by CMManagerBase(), cmtool::CMergeManager::EventBegin(), and SetAnaFile().
|
protected |
Input clusters.
Definition at line 120 of file CMManagerBase.h.
Referenced by cmtool::CMatchManager::EventBegin(), cmtool::CMergeManager::EventBegin(), GetInputClusters(), cmtool::CMatchManager::IterationBegin(), cmtool::CMergeManager::IterationBegin(), cmtool::CMatchManager::IterationProcess(), cmtool::CMergeManager::IterationProcess(), Process(), Reset(), and SetClusters().
|
protected |
Iteration loop switch.
Definition at line 132 of file CMManagerBase.h.
Referenced by CMManagerBase(), cmtool::CMergeManager::IterationEnd(), MergeTillConverge(), and Process().
|
protected |
Minimum number of hits: the limit set for ClusterParamsAlg.
Definition at line 114 of file CMManagerBase.h.
Referenced by CMManagerBase(), SetClusters(), and SetMinNHits().
|
protected |
A holder for # of unique planes in the clusters, computed in ComputePriority() function.
Definition at line 135 of file CMManagerBase.h.
Referenced by ComputePriority(), cmtool::CMatchManager::IterationProcess(), cmtool::CMergeManager::IterationProcess(), and Reset().
|
protected |
Priority record.
Definition at line 129 of file CMManagerBase.h.
Referenced by ComputePriority(), cmtool::CMatchManager::IterationProcess(), and cmtool::CMergeManager::RunMerge().
|
protected |
Priority algorithm.
Definition at line 123 of file CMManagerBase.h.
Referenced by AddPriorityAlgo(), CMManagerBase(), ComputePriority(), cmtool::CMatchManager::EventBegin(), cmtool::CMergeManager::EventBegin(), cmtool::CMatchManager::EventEnd(), cmtool::CMergeManager::EventEnd(), cmtool::CMatchManager::IterationBegin(), cmtool::CMergeManager::IterationBegin(), cmtool::CMatchManager::IterationEnd(), cmtool::CMergeManager::IterationEnd(), cmtool::CMatchManager::IterationProcess(), cmtool::CMatchManager::Reset(), and Reset().
|
protected |
Timing verbosity flag.
Definition at line 111 of file CMManagerBase.h.
Referenced by CMManagerBase(), ComputePriority(), Process(), ReportTimings(), and SetClusters().