LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
geo::part::PartitionBase Class Reference

Non-template definitions and data for Partition class hierarchy. More...

#include "Partitions.h"

Inheritance diagram for geo::part::PartitionBase:
geo::part::AreaOwner geo::part::Partition< Data > geo::part::PartitionWithData< Data > geo::part::PartitionContainer< Data > geo::part::PartitionElement< Data > geo::part::GridPartition< Data > geo::part::SortedPartition< Data, Sorter > geo::part::SortedPartition< Data, details::PartitionSorterByAreaRangeLower< Range > > geo::part::PartitionSortedByRange< Data, Range > geo::part::PartitionSortedByRange< Data,&PartitionBase::Area_t::depth > geo::part::PartitionSortedByRange< Data,&PartitionBase::Area_t::width > geo::part::DepthPartition< Data > geo::part::WidthPartition< Data >

Public Types

using Area_t = AreaOwner::Area_t
 
using AreaRangeMember_t = AreaOwner::AreaRangeMember_t
 

Public Member Functions

 PartitionBase (Area_t const &area)
 Constructor: sets the covered area and no subpartitions. More...
 
bool contains (double w, double d) const
 Returns whether the specified point is covered by this object. More...
 
Area_t const & area () const
 Returns the covered area. More...
 
template<typename Stream >
void dumpArea (Stream &&out) const
 Output the owned area into an output stream. More...
 

Protected Member Functions

std::string describeArea (std::string indent, std::string firstIndent) const
 Returns a description of the partition area. More...
 

Detailed Description

Non-template definitions and data for Partition class hierarchy.

The partition base class provides a common non-templated ground for all Partition hierarchies. The class defines an area that the partition cover, as a rectangle. The dimensions of this rectangle, called "width" and "depth", don't have to match any axis from any 3D coordinate system.

Definition at line 140 of file Partitions.h.

Member Typedef Documentation

Constructor & Destructor Documentation

geo::part::PartitionBase::PartitionBase ( Area_t const &  area)
inline

Constructor: sets the covered area and no subpartitions.

Definition at line 148 of file Partitions.h.

References art::detail::indent().

148 : AreaOwner(area) {}
AreaOwner(Area_t const &area)
Constructor: sets the covered area and no subpartitions.
Definition: Partitions.h:47
Area_t const & area() const
Returns the covered area.
Definition: Partitions.h:53

Member Function Documentation

bool geo::part::AreaOwner::contains ( double  w,
double  d 
) const
inlineinherited

Returns whether the specified point is covered by this object.

Definition at line 50 of file Partitions.h.

References geo::part::AreaOwner::area(), and lar::util::simple_geo::Rectangle< Data >::contains().

50 { return area().contains(w, d); }
bool contains(Data_t w, Data_t d) const
Returns whether the specified point is in the area.
Definition: SimpleGeo.h:442
Float_t d
Definition: plot.C:235
Area_t const & area() const
Returns the covered area.
Definition: Partitions.h:53
Float_t w
Definition: plot.C:20
std::string geo::part::PartitionBase::describeArea ( std::string  indent,
std::string  firstIndent 
) const
inlineprotected

Returns a description of the partition area.

Definition at line 575 of file Partitions.h.

References geo::part::AreaOwner::dumpArea(), and part.

Referenced by geo::part::Partition< Data >::doDescribe().

577 {
578  std::ostringstream sstr;
579  sstr << firstIndent << "partition covers ";
580  dumpArea(sstr);
581  return sstr.str();
582 } // geo::part::PartitionBase::describeArea()
void dumpArea(Stream &&out) const
Output the owned area into an output stream.
Definition: Partitions.h:57
template<typename Stream >
void geo::part::AreaOwner::dumpArea ( Stream &&  out) const
inlineinherited

Output the owned area into an output stream.

Definition at line 57 of file Partitions.h.

References geo::part::AreaOwner::area().

Referenced by describeArea().

58  {
59  std::forward<Stream>(out) << area();
60  }
Area_t const & area() const
Returns the covered area.
Definition: Partitions.h:53

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