Skip to content

Commit 3ab2514

Browse files
committed
Make dereferencing work
1 parent fa6d0fc commit 3ab2514

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

sbncode/CAFMaker/CAFMaker_module.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ template <class T, class U>
13081308
art::FindOneP<T> CAFMaker::FindOnePStrictSingle(const U& from,
13091309
const art::Event& evt,
13101310
const art::InputTag& tag) const {
1311-
return FindOnePStrict(std::vector{ from }, evt, tag);
1311+
return FindOnePStrict<T>(std::vector{ from }, evt, tag);
13121312
}
13131313

13141314
//......................................................................
@@ -1811,7 +1811,7 @@ void CAFMaker::produce(art::Event& evt) noexcept {
18111811
for (unsigned i = 0; i < crtspacepoints.size(); i++) {
18121812
srcrtspacepoints.emplace_back();
18131813
const art::Ptr<sbnd::crt::CRTCluster> crtcluster = foCRTCluster.at(i);
1814-
FillCRTSpacePoint(crtspacepoints[i], crtcluster, srcrtspacepoints.back());
1814+
FillCRTSpacePoint(crtspacepoints[i], *crtcluster, srcrtspacepoints.back());
18151815
}
18161816
}
18171817

@@ -2538,7 +2538,7 @@ void CAFMaker::produce(art::Event& evt) noexcept {
25382538
const art::Ptr<sbnd::crt::CRTCluster>& crtcluster = foCRTCluster.at(0);
25392539

25402540
if(crtspacepoint.isNonnull())
2541-
FillTrackCRTSpacePoint(foCRTSpacePointMatch.data(iPart).ref(), crtspacepoint, crtcluster, trk);
2541+
FillTrackCRTSpacePoint(foCRTSpacePointMatch.data(iPart).ref(), *crtspacepoint, *crtcluster, trk);
25422542
}
25432543
if(foSBNDCRTTrackMatch.isValid() && fDet == kSBND)
25442544
{

sbncode/CAFMaker/FillReco.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ namespace caf
164164
}
165165

166166
void FillCRTSpacePoint(const sbnd::crt::CRTSpacePoint &spacepoint,
167-
const art::Ptr<sbnd::crt::CRTCluster> &cluster,
167+
const sbnd::crt::CRTCluster &cluster,
168168
caf::SRCRTSpacePoint &srspacepoint,
169169
bool allowEmpty)
170170
{
@@ -174,8 +174,8 @@ namespace caf
174174
srspacepoint.time = spacepoint.Ts0();
175175
srspacepoint.time_err = spacepoint.Ts0Err();
176176
srspacepoint.complete = spacepoint.Complete();
177-
srspacepoint.nhits = cluster->NHits();
178-
srspacepoint.tagger = cluster->Tagger();
177+
srspacepoint.nhits = cluster.NHits();
178+
srspacepoint.tagger = cluster.Tagger();
179179
}
180180

181181
void FillSBNDCRTTrack(const sbnd::crt::CRTTrack &track,
@@ -816,15 +816,15 @@ namespace caf
816816
}
817817

818818
void FillTrackCRTSpacePoint(const anab::T0 &t0match,
819-
const art::Ptr<sbnd::crt::CRTSpacePoint> &spacepointmatch,
820-
const art::Ptr<sbnd::crt::CRTCluster> &cluster,
819+
const sbnd::crt::CRTSpacePoint &spacepointmatch,
820+
const sbnd::crt::CRTCluster &cluster,
821821
caf::SRTrack &srtrack,
822822
bool allowEmpty)
823823
{
824824
srtrack.crtspacepoint.matched = true;
825825
srtrack.crtspacepoint.score = t0match.fTriggerConfidence;
826826

827-
FillCRTSpacePoint(*spacepointmatch, cluster, srtrack.crtspacepoint.spacepoint);
827+
FillCRTSpacePoint(spacepointmatch, cluster, srtrack.crtspacepoint.spacepoint);
828828
}
829829

830830
void FillTrackSBNDCRTTrack(const anab::T0 &t0match,

sbncode/CAFMaker/FillReco.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ namespace caf
206206
bool allowEmpty = false);
207207

208208
void FillTrackCRTSpacePoint(const anab::T0 &t0match,
209-
const art::Ptr<sbnd::crt::CRTSpacePoint> &spacepointmatch,
210-
const art::Ptr<sbnd::crt::CRTCluster> &cluster,
209+
const sbnd::crt::CRTSpacePoint &spacepointmatch,
210+
const sbnd::crt::CRTCluster &cluster,
211211
caf::SRTrack &srtrack,
212212
bool allowEmpty = false);
213213

@@ -279,7 +279,7 @@ namespace caf
279279
bool allowEmpty = false);
280280

281281
void FillCRTSpacePoint(const sbnd::crt::CRTSpacePoint &spacepoint,
282-
const art::Ptr<sbnd::crt::CRTCluster> &cluster,
282+
const sbnd::crt::CRTCluster &cluster,
283283
caf::SRCRTSpacePoint &srspacepoint,
284284
bool allowEmpty = false);
285285

0 commit comments

Comments
 (0)