LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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 |
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 (util::GeometryUtilities const &gser, 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 (util::GeometryUtilities const &gser) |
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 (util::GeometryUtilities const &gser)=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 41 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 44 of file CMManagerBase.h.
cmtool::CMManagerBase::CMManagerBase | ( | ) |
Default constructor.
Definition at line 16 of file CMManagerBase.cxx.
References _debug_mode, _fout, _merge_till_converge, _min_nhits, _priority_algo, _time_report, kNone, and Reset().
|
virtualdefault |
Default destructor.
|
inline |
Setter to add an algorithm for priority determination.
Definition at line 71 of file CMManagerBase.h.
Referenced by ShowerReco3D::ShowerReco3D().
|
protected |
Function to compute priority.
Definition at line 155 of file CMManagerBase.cxx.
References _planes, _priority, _priority_algo, _time_report, and cmtool::CPriorityAlgoBase::Priority().
Referenced by cmtool::CMatchManager::IterationProcess(), and cmtool::CMergeManager::IterationProcess().
|
inline |
Method to enable debug mode (lots of couts)
Definition at line 62 of file CMManagerBase.h.
|
inlineprotectedvirtual |
FMWK function called @ beginning of Process()
Reimplemented in cmtool::CMergeManager, and cmtool::CMatchManager.
Definition at line 100 of file CMManagerBase.h.
Referenced by Process().
|
inlineprotectedvirtual |
FMWK function called @ end of Process()
Reimplemented in cmtool::CMergeManager, and cmtool::CMatchManager.
Definition at line 112 of file CMManagerBase.h.
Referenced by Process().
|
inline |
A getter for input clusters.
Definition at line 84 of file CMManagerBase.h.
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 103 of file CMManagerBase.h.
Referenced by Process().
|
inlineprotectedvirtual |
FMWK function called @ end of iterative loop inside Process()
Reimplemented in cmtool::CMergeManager, and cmtool::CMatchManager.
Definition at line 109 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 Process().
|
inline |
Switch to continue merging till converges.
Definition at line 74 of file CMManagerBase.h.
References lar::dump::vector().
void cmtool::CMManagerBase::Process | ( | util::GeometryUtilities const & | gser | ) |
A method to execute the main action, to be called per event.
Definition at line 89 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(), and showerreco::ShowerRecoManager::Reconstruct().
|
inline |
Method to enable timing profile cout.
Definition at line 65 of file CMManagerBase.h.
References Reset().
void cmtool::CMManagerBase::Reset | ( | ) |
Method to reset itself.
Definition at line 27 of file CMManagerBase.cxx.
References _in_clusters, _planes, _priority_algo, and cmtool::CMAlgoBase::Reset().
Referenced by CMManagerBase(), cmtool::CMergeManager::Reset(), cmtool::CMatchManager::Reset(), and SetClusters().
|
inline |
A setter for an analysis output file.
Definition at line 93 of file CMManagerBase.h.
void cmtool::CMManagerBase::SetClusters | ( | util::GeometryUtilities const & | gser, |
const std::vector< std::vector< util::PxHit >> & | clusters | ||
) |
A simple method to add a cluster.
Definition at line 34 of file CMManagerBase.cxx.
References _in_clusters, _min_nhits, _time_report, Initialize(), Reset(), cluster::ClusterParamsAlg::SetMinNHits(), and cluster::ClusterParamsAlg::SetVerbose().
Referenced by showerreco::ShowerRecoManager::Reconstruct().
void cmtool::CMManagerBase::SetClusters | ( | const std::vector< cluster::ClusterParamsAlg > & | clusters | ) |
A simple method to add a cluster.
Definition at line 75 of file CMManagerBase.cxx.
References _in_clusters, and _time_report.
|
inline |
A setter for minimum # of hits ... passed onto ClusterParamsAlg.
Definition at line 87 of file CMManagerBase.h.
References n.
|
protected |
Debug mode switch.
Definition at line 122 of file CMManagerBase.h.
Referenced by CMManagerBase(), 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 131 of file CMManagerBase.h.
Referenced by CMManagerBase(), and cmtool::CMergeManager::EventBegin().
|
protected |
Input clusters.
Definition at line 125 of file CMManagerBase.h.
Referenced by cmtool::CMatchManager::EventBegin(), cmtool::CMergeManager::EventBegin(), cmtool::CMatchManager::IterationBegin(), cmtool::CMergeManager::IterationBegin(), cmtool::CMatchManager::IterationProcess(), cmtool::CMergeManager::IterationProcess(), Process(), Reset(), and SetClusters().
|
protected |
Iteration loop switch.
Definition at line 137 of file CMManagerBase.h.
Referenced by CMManagerBase(), cmtool::CMergeManager::IterationEnd(), and Process().
|
protected |
Minimum number of hits: the limit set for ClusterParamsAlg.
Definition at line 119 of file CMManagerBase.h.
Referenced by CMManagerBase(), and SetClusters().
|
protected |
A holder for # of unique planes in the clusters, computed in ComputePriority() function.
Definition at line 140 of file CMManagerBase.h.
Referenced by ComputePriority(), cmtool::CMatchManager::IterationProcess(), cmtool::CMergeManager::IterationProcess(), and Reset().
|
protected |
Priority record.
Definition at line 134 of file CMManagerBase.h.
Referenced by ComputePriority(), cmtool::CMatchManager::IterationProcess(), and cmtool::CMergeManager::RunMerge().
|
protected |
Priority algorithm.
Definition at line 128 of file CMManagerBase.h.
Referenced by 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 116 of file CMManagerBase.h.
Referenced by CMManagerBase(), ComputePriority(), Process(), and SetClusters().