1 #ifndef BASICTOOL_GEOOBJCOLLECTION_CXX
2 #define BASICTOOL_GEOOBJCOLLECTION_CXX
32 auto const iter =
_labels.find(pt);
35 _labels.insert(std::make_pair(pt,Form(
"%s\n",label.c_str())));
39 label = Form(
"%s%s\n",(*iter).second.c_str(),label.c_str());
47 if(name.empty()) name = Form(
"Pt (%zu)",
_pt_v.size());
55 if(name.empty()) name = Form(
"AABox (%zu)",
_box_v.size());
56 _AddLabel_(box.Min() + (box.Max() - box.Min())/2.,name);
63 if(name.empty()) name = Form(
"LSeg (%zu)",
_seg_v.size());
72 if(name.empty()) name = Form(
"Line (%zu)",
_lin_v.size());
81 throw GeoAlgoException(
"Trajectory size cannot be smaller than 2!");
82 if(name.empty()) name = Form(
"Trj (%zu)",
_trj_v.size());
92 if(name.empty()) name = Form(
"Cone (%zu)",
_cone_v.size());
101 if(name.empty()) name = Form(
"Sphere (%zu)",
_sphere_v.size());
void _AddLabel_(const Point_t &pt, std::string label)
std::vector< std::string > _cone_col
GeoObjCollection()
Default constructor.
void Add(const Point_t &pt, std::string label="", std::string c="")
recob::tracking::Point_t Point_t
std::vector< geoalgo::LineSegment_t > _seg_v
std::map< geoalgo::Point_t, std::string > _labels
std::vector< geoalgo::HalfLine_t > _lin_v
LineSegment LineSegment_t
std::vector< std::string > _box_col
std::vector< geoalgo::Trajectory_t > _trj_v
std::vector< geoalgo::Sphere > _sphere_v
std::vector< geoalgo::Cone_t > _cone_v
std::vector< geoalgo::Point_t > _pt_v
std::vector< std::string > _trj_col
std::vector< std::string > _lin_col
std::vector< geoalgo::AABox_t > _box_v
std::vector< std::string > _pt_col
std::vector< std::string > _sphere_col
std::vector< std::string > _seg_col