Performs the actual test.
121 auto const& expectedSpacePoints
122 = *(
event.getValidHandle<std::vector<recob::SpacePoint>>(
pointsTag));
124 auto const& expectedCharges
125 = *(
event.getValidHandle<std::vector<recob::PointCharge>>(
pointsTag));
128 <<
"Starting test on " << expectedSpacePoints.size() <<
" points and " 129 << expectedCharges.size() <<
" charges from '" 133 assert(expectedSpacePoints.size() == expectedCharges.size());
139 BOOST_TEST(points.empty() == expectedSpacePoints.empty());
140 BOOST_TEST(points.size() == expectedSpacePoints.size());
142 decltype(
auto) spacePoints = points.spacePoints();
144 (
std::addressof(spacePoints) ==
std::addressof(expectedSpacePoints));
145 BOOST_TEST(spacePoints.
size() == expectedSpacePoints.
size());
147 decltype(auto) charges = points.charges();
148 BOOST_TEST(
std::addressof(charges) ==
std::addressof(expectedCharges));
149 BOOST_TEST(charges.size() == expectedCharges.size());
151 std::
size_t iExpectedPoint = 0;
152 for (auto pointProxy: points) {
153 auto const& expectedSpacePoint = expectedSpacePoints[iExpectedPoint];
154 auto const& expectedChargeInfo = expectedCharges[iExpectedPoint];
159 (std::addressof(spacePointRef) == std::addressof(expectedSpacePoint));
161 (std::addressof(pointProxy.point()) == std::addressof(expectedSpacePoint));
163 BOOST_TEST(pointProxy.ID() == expectedSpacePoint.ID());
164 BOOST_TEST(pointProxy.hasCharge() == expectedChargeInfo.hasCharge());
165 BOOST_TEST(pointProxy.charge() == expectedChargeInfo.charge());
167 decltype(
auto) chargeInfo = pointProxy.
get<
recob::PointCharge>();
169 std::is_lvalue_reference<decltype(chargeInfo)>(),
170 "Copy of parallel
data element!"
173 (
std::addressof(chargeInfo) ==
std::addressof(expectedChargeInfo));
177 BOOST_TEST(iExpectedPoint == expectedSpacePoints.size());
auto getChargedSpacePoints(Event const &event, art::InputTag inputTag, Args &&...withArgs)
Creates and returns a proxy to space points with associated charge.
Reconstruction base classes.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
art::InputTag pointsTag
Tag for the input.
GENVECTOR_CONSTEXPR::geo::Point_t makePointFromCoords(Coords &&coords)
Creates a geo::Point_t from its coordinates (see makeFromCoords()).
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
for(std::string line;std::getline(inFile, line);)
auto const & get(AssnsNode< L, R, D > const &r)
Event finding and building.
Charge reconstructed in the active volume.