Public Member Functions | Private Attributes | List of all members
cmtool::CPAlgoPolyArea Class Reference

#include <CPAlgoPolyArea.h>

Inheritance diagram for cmtool::CPAlgoPolyArea:
cmtool::CPriorityAlgoBase cmtool::CMAlgoBase

Public Member Functions

 CPAlgoPolyArea ()
 Default constructor. More...
 
virtual float Priority (const ::cluster::ClusterParamsAlg &cluster)
 
void SetMinArea (double area)
 Setter for minimum area. More...
 
- Public Member Functions inherited from cmtool::CPriorityAlgoBase
 CPriorityAlgoBase ()
 Default constructor. More...
 
virtual ~CPriorityAlgoBase ()
 Default destructor. More...
 
virtual float Priority (const cluster::ClusterParamsAlg &cluster)
 
- Public Member Functions inherited from cmtool::CMAlgoBase
 CMAlgoBase ()
 
virtual ~CMAlgoBase ()=default
 
virtual void Reset ()
 Function to reset the algorithm instance called within CMergeManager/CMatchManager's Reset() ... maybe implemented via child class. More...
 
virtual void EventBegin (const std::vector< cluster::ClusterParamsAlg > &)
 
virtual void EventEnd ()
 
virtual void IterationBegin (const std::vector< cluster::ClusterParamsAlg > &)
 
virtual void IterationEnd ()
 
virtual void Report ()
 
void SetAnaFile (TFile *fout)
 Setter function for an output plot TFile pointer. More...
 
virtual void SetVerbose (bool doit=true)
 Setter function for verbosity. More...
 

Private Attributes

double _area_cut
 

Additional Inherited Members

- Protected Attributes inherited from cmtool::CMAlgoBase
TFile * _fout
 TFile pointer to an output file. More...
 
bool _verbose
 Boolean to choose verbose mode. Turned on if CMergeManager/CMatchManager's verbosity level is >= kPerMerging. More...
 

Detailed Description

Simple algorithm to determine priority based on area of 2D polygon. If area < set cut value by a user, returns -1.

Definition at line 25 of file CPAlgoPolyArea.h.

Constructor & Destructor Documentation

cmtool::CPAlgoPolyArea::CPAlgoPolyArea ( )

Default constructor.

Definition at line 6 of file CPAlgoPolyArea.cxx.

7  //----------------------------------------------------------
8  {
9  _area_cut = 0;
10  }
CPriorityAlgoBase()
Default constructor.

Member Function Documentation

float cmtool::CPAlgoPolyArea::Priority ( const ::cluster::ClusterParamsAlg cluster)
virtual

Core function: given the CPAN input, return a float which indicates the user-defined priority for analysis.

Definition at line 13 of file CPAlgoPolyArea.cxx.

15  {
16 
17  auto area = cluster.GetParams().PolyObject.Area();
18 
19  return ( area < _area_cut ? -1 : area);
20  }
Cluster finding and building.
void cmtool::CPAlgoPolyArea::SetMinArea ( double  area)
inline

Setter for minimum area.

Definition at line 39 of file CPAlgoPolyArea.h.

39 { _area_cut = area; }

Member Data Documentation

double cmtool::CPAlgoPolyArea::_area_cut
private

Definition at line 43 of file CPAlgoPolyArea.h.


The documentation for this class was generated from the following files: