13 #ifndef LARDATA_ARTDATAHELPER_CHARGEDSPACEPOINTCREATOR_H 14 #define LARDATA_ARTDATAHELPER_CHARGEDSPACEPOINTCREATOR_H 27 #include <type_traits> 32 class ProducesCollector;
257 std::string
const& instanceName = {});
298 void addAll(std::vector<recob::SpacePoint>&& spacePoints,
299 std::vector<recob::PointCharge>&& charges);
300 void addAll(std::vector<recob::SpacePoint>
const& spacePoints,
301 std::vector<recob::PointCharge>
const& charges);
324 bool empty()
const {
return spent() || fSpacePoints->empty(); }
327 std::size_t
size()
const {
return spent() ? 0U : fSpacePoints->size(); }
333 bool spent()
const {
return !fSpacePoints; }
397 std::string
const& instanceName = {});
412 std::unique_ptr<std::vector<recob::PointCharge>>
fCharges;
425 #endif // LARDATA_ARTDATAHELPER_CHARGEDSPACEPOINTCREATOR_H std::size_t size() const
Returns the number of space points currently in the collection.
Reconstruction base classes.
art::Event & fEvent
The event this object is bound to.
recob::PointCharge const & charge(std::size_t i) const
Returns the last inserted charge; undefined behaviour if empty().
std::size_t lastIndex() const
Returns the index of the last element (undefined if empty).
art::Ptr< recob::SpacePoint > lastSpacePointPtr() const
Returns an art pointer to the last inserted space point (no check!).
std::unique_ptr< std::vector< recob::SpacePoint > > fSpacePoints
Space point data.
std::string fInstanceName
Instance name of all the data products.
std::unique_ptr< art::PtrMaker< recob::SpacePoint > > fSpacePointPtrMaker
Space point pointer maker.
Information about charge reconstructed in the active volume.
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
art::Ptr< recob::PointCharge > lastChargePtr() const
Returns an art pointer to the inserted charge (no check!).
bool spent() const
Returns whether put() has already been called.
recob::PointCharge const & lastCharge() const
Returns the last inserted charge; undefined behaviour if empty().
bool empty() const
Returns whether there are currently no space points in the collection.
recob::SpacePoint const & lastSpacePoint() const
Returns the last inserted space point; undefined behaviour if empty().
Creates a collection of space points with associated charge.
std::unique_ptr< std::vector< recob::PointCharge > > fCharges
Charge data.
bool canMakePointers() const
Returns whether art pointer making is enabled.
recob::SpacePoint const & spacePoint(std::size_t i) const
Returns the specified space point; undefined behaviour if not there.
Event finding and building.
std::unique_ptr< art::PtrMaker< recob::PointCharge > > fChargePtrMaker
Charge pointer maker.
Charge reconstructed in the active volume.