All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
geoalgo::GeoObjCollection Class Reference

#include <GeoObjCollection.h>

Public Member Functions

void Clear ()
 
void Add (const Point_t &pt, std::string label="", std::string c="")
 
void Add (const AABox_t &box, std::string label="", std::string c="")
 
void Add (const LineSegment_t &seg, std::string label="", std::string c="")
 
void Add (const HalfLine_t &seg, std::string label="", std::string c="")
 
void Add (const Trajectory_t &trj, std::string label="", std::string c="")
 
void Add (const Cone_t &cone, std::string label="", std::string c="")
 
void Add (const Sphere_t &sphere, std::string label="", std::string c="")
 
const std::vector
< geoalgo::Point_t > & 
Point () const
 
const std::vector< std::string > & PointColor () const
 
const std::vector
< geoalgo::AABox_t > & 
AABox () const
 
const std::vector< std::string > & AABoxColor () const
 
const std::vector
< geoalgo::LineSegment_t > & 
LineSegment () const
 
const std::vector< std::string > & LineSegmentColor () const
 
const std::vector
< geoalgo::HalfLine_t > & 
HalfLine () const
 
const std::vector< std::string > & HalfLineColor () const
 
const std::vector
< geoalgo::Trajectory_t > & 
Trajectory () const
 
const std::vector< std::string > & TrajectoryColor () const
 
const std::vector
< geoalgo::Cone_t > & 
Cone () const
 
const std::vector< std::string > & ConeColor () const
 
const std::vector
< geoalgo::Sphere_t > & 
Sphere () const
 
const std::vector< std::string > & SphereColor () const
 
const std::map
< geoalgo::Point_t,
std::string > & 
Labels () const
 
 GeoObjCollection ()
 Default constructor. More...
 
virtual ~GeoObjCollection ()
 Default destructor. More...
 
void Clear ()
 
void Add (const Point_t &pt, std::string label="", std::string c="")
 
void Add (const AABox_t &box, std::string label="", std::string c="")
 
void Add (const LineSegment_t &seg, std::string label="", std::string c="")
 
void Add (const HalfLine_t &seg, std::string label="", std::string c="")
 
void Add (const Trajectory_t &trj, std::string label="", std::string c="")
 
void Add (const Cone_t &cone, std::string label="", std::string c="")
 
void Add (const Sphere_t &sphere, std::string label="", std::string c="")
 
const std::vector
< geoalgo::Point_t > & 
Point () const
 
const std::vector< std::string > & PointColor () const
 
const std::vector
< geoalgo::AABox_t > & 
AABox () const
 
const std::vector< std::string > & AABoxColor () const
 
const std::vector
< geoalgo::LineSegment_t > & 
LineSegment () const
 
const std::vector< std::string > & LineSegmentColor () const
 
const std::vector
< geoalgo::HalfLine_t > & 
HalfLine () const
 
const std::vector< std::string > & HalfLineColor () const
 
const std::vector
< geoalgo::Trajectory_t > & 
Trajectory () const
 
const std::vector< std::string > & TrajectoryColor () const
 
const std::vector
< geoalgo::Cone_t > & 
Cone () const
 
const std::vector< std::string > & ConeColor () const
 
const std::vector
< geoalgo::Sphere_t > & 
Sphere () const
 
const std::vector< std::string > & SphereColor () const
 
const std::map
< geoalgo::Point_t,
std::string > & 
Labels () const
 

Protected Member Functions

const Point_t_Point_ (size_t i) const
 
const AABox_t_AABox_ (size_t i) const
 
const LineSegment_t_LineSegment_ (size_t i) const
 
const Trajectory_t_Trajectory_ (size_t i) const
 
const Cone_t_Cone_ (size_t i) const
 
const Sphere_t_Sphere_ (size_t i) const
 
void _AddLabel_ (const Point_t &pt, std::string label)
 
const Point_t_Point_ (size_t i) const
 
const AABox_t_AABox_ (size_t i) const
 
const LineSegment_t_LineSegment_ (size_t i) const
 
const Trajectory_t_Trajectory_ (size_t i) const
 
const Cone_t_Cone_ (size_t i) const
 
const Sphere_t_Sphere_ (size_t i) const
 
void _AddLabel_ (const Point_t &pt, std::string label)
 

Protected Attributes

std::vector< geoalgo::Point_t_pt_v
 
std::vector< std::string > _pt_col
 
std::vector< geoalgo::AABox_t_box_v
 
std::vector< std::string > _box_col
 
std::vector
< geoalgo::LineSegment_t
_seg_v
 
std::vector< std::string > _seg_col
 
std::vector< geoalgo::HalfLine_t_lin_v
 
std::vector< std::string > _lin_col
 
std::vector
< geoalgo::Trajectory_t
_trj_v
 
std::vector< std::string > _trj_col
 
std::vector< geoalgo::Cone_t_cone_v
 
std::vector< std::string > _cone_col
 
std::vector< geoalgo::Sphere_sphere_v
 
std::vector< std::string > _sphere_col
 
std::map< geoalgo::Point_t,
std::string > 
_labels
 

Detailed Description

Definition at line 35 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

Constructor & Destructor Documentation

geoalgo::GeoObjCollection::GeoObjCollection ( )

Default constructor.

Definition at line 8 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoObjCollection.cxx.

9  {}
virtual geoalgo::GeoObjCollection::~GeoObjCollection ( )
inlinevirtual

Default destructor.

Definition at line 39 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoObjCollection.h.

39 {}

Member Function Documentation

const AABox_t& geoalgo::GeoObjCollection::_AABox_ ( size_t  i) const
inlineprotected

Definition at line 83 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

84  { return _box_v[i]; }
const AABox_t& geoalgo::GeoObjCollection::_AABox_ ( size_t  i) const
inlineprotected
void geoalgo::GeoObjCollection::_AddLabel_ ( const Point_t pt,
std::string  label 
)
protected

Definition at line 29 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.cxx.

30  {
31  auto const iter = _labels.find(pt);
32  if(iter==_labels.end())
33 
34  _labels.insert(std::make_pair(pt,Form("%s\n",label.c_str())));
35 
36  else {
37 
38  label = Form("%s%s\n",(*iter).second.c_str(),label.c_str());
39 
40  _labels[pt] = label;
41  }
42  }
std::map< geoalgo::Point_t, std::string > _labels
void geoalgo::GeoObjCollection::_AddLabel_ ( const Point_t pt,
std::string  label 
)
protected
const Cone_t& geoalgo::GeoObjCollection::_Cone_ ( size_t  i) const
inlineprotected

Definition at line 92 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

93  { return _cone_v[i]; }
const Cone_t& geoalgo::GeoObjCollection::_Cone_ ( size_t  i) const
inlineprotected
const LineSegment_t& geoalgo::GeoObjCollection::_LineSegment_ ( size_t  i) const
inlineprotected

Definition at line 86 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

87  { return _seg_v[i]; }
const LineSegment_t& geoalgo::GeoObjCollection::_LineSegment_ ( size_t  i) const
inlineprotected

Definition at line 88 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoObjCollection.h.

89  { return _seg_v[i]; }
const Point_t& geoalgo::GeoObjCollection::_Point_ ( size_t  i) const
inlineprotected

Definition at line 80 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

81  { return _pt_v[i]; }
const Point_t& geoalgo::GeoObjCollection::_Point_ ( size_t  i) const
inlineprotected
const Sphere_t& geoalgo::GeoObjCollection::_Sphere_ ( size_t  i) const
inlineprotected

Definition at line 95 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

96  { return _sphere_v[i]; }
const Sphere_t& geoalgo::GeoObjCollection::_Sphere_ ( size_t  i) const
inlineprotected
const Trajectory_t& geoalgo::GeoObjCollection::_Trajectory_ ( size_t  i) const
inlineprotected

Definition at line 89 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

90  { return _trj_v[i]; }
const Trajectory_t& geoalgo::GeoObjCollection::_Trajectory_ ( size_t  i) const
inlineprotected

Definition at line 91 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoObjCollection.h.

92  { return _trj_v[i]; }
const std::vector< geoalgo::AABox_t >& geoalgo::GeoObjCollection::AABox ( ) const
inline

Definition at line 58 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

58 { return _box_v; }
const std::vector< geoalgo::AABox_t >& geoalgo::GeoObjCollection::AABox ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::AABoxColor ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::AABoxColor ( ) const
inline
void geoalgo::GeoObjCollection::Add ( const Point_t pt,
std::string  label = "",
std::string  c = "" 
)

Definition at line 44 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.cxx.

45  {
46  if(name.empty()) name = Form("Pt (%zu)",_pt_v.size());
47  _AddLabel_(pt,name);
48  _pt_v.push_back(pt);
49  _pt_col.push_back(c);
50  }
void _AddLabel_(const Point_t &pt, std::string label)
then echo fcl name
void geoalgo::GeoObjCollection::Add ( const Point_t pt,
std::string  label = "",
std::string  c = "" 
)
void geoalgo::GeoObjCollection::Add ( const AABox_t box,
std::string  label = "",
std::string  c = "" 
)

Definition at line 52 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.cxx.

53  {
54  if(name.empty()) name = Form("AABox (%zu)",_box_v.size());
55  _AddLabel_(box.Min() + (box.Max() - box.Min())/2.,name);
56  _box_v.push_back(box);
57  _box_col.push_back(c);
58  }
void _AddLabel_(const Point_t &pt, std::string label)
then echo fcl name
void geoalgo::GeoObjCollection::Add ( const AABox_t box,
std::string  label = "",
std::string  c = "" 
)
void geoalgo::GeoObjCollection::Add ( const LineSegment_t seg,
std::string  label = "",
std::string  c = "" 
)

Definition at line 60 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.cxx.

61  {
62  if(name.empty()) name = Form("LSeg (%zu)",_seg_v.size());
63  _AddLabel_(seg.End(),name);
64  _seg_v.push_back(seg);
65  _seg_col.push_back(c);
66  }
void _AddLabel_(const Point_t &pt, std::string label)
then echo fcl name
void geoalgo::GeoObjCollection::Add ( const LineSegment_t seg,
std::string  label = "",
std::string  c = "" 
)
void geoalgo::GeoObjCollection::Add ( const HalfLine_t seg,
std::string  label = "",
std::string  c = "" 
)

Definition at line 69 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.cxx.

70  {
71  if(name.empty()) name = Form("Line (%zu)",_lin_v.size());
72  _AddLabel_(lin.Start()+lin.Start()*10,name);
73  _lin_v.push_back(lin);
74  _lin_col.push_back(c);
75  }
void _AddLabel_(const Point_t &pt, std::string label)
then echo fcl name
void geoalgo::GeoObjCollection::Add ( const HalfLine_t seg,
std::string  label = "",
std::string  c = "" 
)
void geoalgo::GeoObjCollection::Add ( const Trajectory_t trj,
std::string  label = "",
std::string  c = "" 
)

Definition at line 77 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.cxx.

78  {
79  if(trj.size()<2)
80  throw GeoAlgoException("Trajectory size cannot be smaller than 2!");
81  if(name.empty()) name = Form("Trj (%zu)",_trj_v.size());
82  _AddLabel_(trj.back(),name);
83  _trj_v.push_back(trj);
84  _trj_col.push_back(c);
85 
86  return;
87  }
void _AddLabel_(const Point_t &pt, std::string label)
then echo fcl name
void geoalgo::GeoObjCollection::Add ( const Trajectory_t trj,
std::string  label = "",
std::string  c = "" 
)
void geoalgo::GeoObjCollection::Add ( const Cone_t cone,
std::string  label = "",
std::string  c = "" 
)

Definition at line 89 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.cxx.

90  {
91  if(name.empty()) name = Form("Cone (%zu)",_cone_v.size());
92  _AddLabel_(cone.Start()+cone.Dir()*cone.Length(),name);
93  _cone_v.push_back(cone);
94  _cone_col.push_back(c);
95  }
void _AddLabel_(const Point_t &pt, std::string label)
then echo fcl name
void geoalgo::GeoObjCollection::Add ( const Sphere_t sphere,
std::string  label = "",
std::string  c = "" 
)

Definition at line 98 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.cxx.

99  {
100  if(name.empty()) name = Form("Sphere (%zu)",_sphere_v.size());
101  _AddLabel_(sphere.Center(),name);
102  _sphere_v.push_back(sphere);
103  _sphere_col.push_back(c);
104  }
void _AddLabel_(const Point_t &pt, std::string label)
then echo fcl name
void geoalgo::GeoObjCollection::Add ( const Cone_t cone,
std::string  label = "",
std::string  c = "" 
)
void geoalgo::GeoObjCollection::Add ( const Sphere_t sphere,
std::string  label = "",
std::string  c = "" 
)
void geoalgo::GeoObjCollection::Clear ( )

Definition at line 10 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.cxx.

11  {
12  _pt_v.clear();
13  _box_v.clear();
14  _seg_v.clear();
15  _trj_v.clear();
16  _lin_v.clear();
17  _cone_v.clear();
18  //_sphere_v.clear();
19  _pt_col.clear();
20  _box_col.clear();
21  _seg_col.clear();
22  _trj_col.clear();
23  _lin_col.clear();
24  _cone_col.clear();
25  _sphere_col.clear();
26  _labels.clear();
27  }
std::map< geoalgo::Point_t, std::string > _labels
void geoalgo::GeoObjCollection::Clear ( )
const std::vector< geoalgo::Cone_t >& geoalgo::GeoObjCollection::Cone ( ) const
inline

Definition at line 70 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

70 { return _cone_v; }
const std::vector< geoalgo::Cone_t >& geoalgo::GeoObjCollection::Cone ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::ConeColor ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::ConeColor ( ) const
inline
const std::vector< geoalgo::HalfLine_t >& geoalgo::GeoObjCollection::HalfLine ( ) const
inline

Definition at line 64 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

64 { return _lin_v; }
const std::vector< geoalgo::HalfLine_t >& geoalgo::GeoObjCollection::HalfLine ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::HalfLineColor ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::HalfLineColor ( ) const
inline
const std::map<geoalgo::Point_t,std::string>& geoalgo::GeoObjCollection::Labels ( ) const
inline

Definition at line 76 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

76 { return _labels;}
std::map< geoalgo::Point_t, std::string > _labels
const std::map<geoalgo::Point_t,std::string>& geoalgo::GeoObjCollection::Labels ( ) const
inline

Definition at line 78 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoObjCollection.h.

78 { return _labels;}
std::map< geoalgo::Point_t, std::string > _labels
const std::vector< geoalgo::LineSegment_t >& geoalgo::GeoObjCollection::LineSegment ( ) const
inline

Definition at line 61 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

61 { return _seg_v; }
const std::vector< geoalgo::LineSegment_t >& geoalgo::GeoObjCollection::LineSegment ( ) const
inline

Definition at line 63 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoObjCollection.h.

63 { return _seg_v; }
const std::vector< std::string >& geoalgo::GeoObjCollection::LineSegmentColor ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::LineSegmentColor ( ) const
inline
const std::vector< geoalgo::Point_t >& geoalgo::GeoObjCollection::Point ( ) const
inline

Definition at line 55 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

55 { return _pt_v; }
const std::vector< geoalgo::Point_t >& geoalgo::GeoObjCollection::Point ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::PointColor ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::PointColor ( ) const
inline
const std::vector< geoalgo::Sphere_t >& geoalgo::GeoObjCollection::Sphere ( ) const
inline

Definition at line 73 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

73 { return _sphere_v; }
const std::vector< geoalgo::Sphere_t >& geoalgo::GeoObjCollection::Sphere ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::SphereColor ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::SphereColor ( ) const
inline
const std::vector< geoalgo::Trajectory_t >& geoalgo::GeoObjCollection::Trajectory ( ) const
inline

Definition at line 67 of file larcorealg/larcorealg/GeoAlgo/GeoObjCollection.h.

67 { return _trj_v; }
const std::vector< geoalgo::Trajectory_t >& geoalgo::GeoObjCollection::Trajectory ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::TrajectoryColor ( ) const
inline
const std::vector< std::string >& geoalgo::GeoObjCollection::TrajectoryColor ( ) const
inline

Member Data Documentation

std::vector< std::string > geoalgo::GeoObjCollection::_box_col
protected
std::vector< geoalgo::AABox_t > geoalgo::GeoObjCollection::_box_v
protected
std::vector< std::string > geoalgo::GeoObjCollection::_cone_col
protected
std::vector< geoalgo::Cone_t > geoalgo::GeoObjCollection::_cone_v
protected
std::map< geoalgo::Point_t, std::string > geoalgo::GeoObjCollection::_labels
protected
std::vector< std::string > geoalgo::GeoObjCollection::_lin_col
protected
std::vector< geoalgo::HalfLine_t > geoalgo::GeoObjCollection::_lin_v
protected
std::vector< std::string > geoalgo::GeoObjCollection::_pt_col
protected
std::vector< geoalgo::Point_t > geoalgo::GeoObjCollection::_pt_v
protected
std::vector< std::string > geoalgo::GeoObjCollection::_seg_col
protected
std::vector< geoalgo::LineSegment_t > geoalgo::GeoObjCollection::_seg_v
protected
std::vector< std::string > geoalgo::GeoObjCollection::_sphere_col
protected
std::vector< geoalgo::Sphere > geoalgo::GeoObjCollection::_sphere_v
protected
std::vector< std::string > geoalgo::GeoObjCollection::_trj_col
protected
std::vector< geoalgo::Trajectory_t > geoalgo::GeoObjCollection::_trj_v
protected

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