Skip to content

Commit

Permalink
Rename handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Aug 1, 2023
1 parent a49daf2 commit 78b68a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct ExampleFunctionalProducerMultiple final : Gaudi::Functional::Producer<std
floatVector->push_back(125.);
floatVector->push_back(25.);
floatVector->push_back(m_event);
Float_t floatVector_dw = DataWrapper<podio::UserDataCollection<float>>(std::move(floatVector));
Float_t floatVectorDW = DataWrapper<podio::UserDataCollection<float>>(std::move(floatVector));

auto particles = std::make_unique<edm4hep::MCParticleCollection>();
auto particle = particles->create();
Expand All @@ -53,17 +53,17 @@ struct ExampleFunctionalProducerMultiple final : Gaudi::Functional::Producer<std
p4.y = m_magicNumberOffset + 6;
p4.z = m_magicNumberOffset + 7;
particle.setMass(m_magicNumberOffset + m_event + 8);
Particle_t particle_dw = DataWrapper<edm4hep::MCParticleCollection>(std::move(particles));
Particle_t particleDW = DataWrapper<edm4hep::MCParticleCollection>(std::move(particles));

auto simTrackerHits = std::make_unique<edm4hep::SimTrackerHitCollection>();
auto hit = simTrackerHits->create();
hit.setPosition({3, 4, 5});
SimTrackerHit_t simTrackerHit_dw = DataWrapper<edm4hep::SimTrackerHitCollection>(std::move(simTrackerHits));
SimTrackerHit_t simTrackerHitDW = DataWrapper<edm4hep::SimTrackerHitCollection>(std::move(simTrackerHits));

auto trackerHits = std::make_unique<edm4hep::TrackerHitCollection>();
auto trackerHit = trackerHits->create();
trackerHit.setPosition({3, 4, 5});
TrackerHit_t trackerHit_dw = DataWrapper<edm4hep::TrackerHitCollection>(std::move(trackerHits));
TrackerHit_t trackerHitDW = DataWrapper<edm4hep::TrackerHitCollection>(std::move(trackerHits));

auto tracks = std::make_unique<edm4hep::TrackCollection>();
auto track = tracks->create();
Expand All @@ -81,9 +81,9 @@ struct ExampleFunctionalProducerMultiple final : Gaudi::Functional::Producer<std
// set associatons
track.addToTrackerHits(trackerHit);
track.addToTracks(track2);
Track_t track_dw = DataWrapper<edm4hep::TrackCollection>(std::move(tracks));
Track_t trackDW = DataWrapper<edm4hep::TrackCollection>(std::move(tracks));

return std::make_tuple(floatVector_dw, particle_dw, simTrackerHit_dw, trackerHit_dw, track_dw);
return std::make_tuple(floatVectorDW, particleDW, simTrackerHitDW, trackerHitDW, trackDW);
}

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ using BaseClass_t = Gaudi::Functional::Traits::BaseClass_t<Gaudi::Algorithm>;
// Has to be wrapped in DataWrapper
using colltype = DataWrapper<podio::CollectionBase>;

// As a simple example, we'll write an integer and a collection of MCParticles
using Counter_t = DataWrapper<podio::UserDataCollection<int>>;
using Particle_t = DataWrapper<edm4hep::MCParticleCollection>;

// As a simple example, we'll write an integer and a collection of MCParticles
struct ExampleFunctionalTransformerMultiple final : Gaudi::Functional::MultiTransformer<std::tuple<Counter_t, Particle_t>(const colltype&,
const colltype&,
const colltype&,
Expand Down Expand Up @@ -63,7 +63,7 @@ struct ExampleFunctionalTransformerMultiple final : Gaudi::Functional::MultiTran
for (const auto& p : *particlesColl) {
newParticlesColl->push_back(p);
}
auto particle_dw = DataWrapper<edm4hep::MCParticleCollection>(std::move(newParticlesColl));
auto particleDW = DataWrapper<edm4hep::MCParticleCollection>(std::move(newParticlesColl));
counter->push_back(particlesColl->size());


Expand All @@ -76,9 +76,9 @@ struct ExampleFunctionalTransformerMultiple final : Gaudi::Functional::MultiTran
auto tracksColl = dynamic_cast<const edm4hep::TrackCollection*>(tracks.getData());
counter->push_back(tracksColl->size());

auto counter_dw = DataWrapper<podio::UserDataCollection<int>>(std::move(counter));
auto counterDW = DataWrapper<podio::UserDataCollection<int>>(std::move(counter));

return std::make_tuple(counter_dw, particle_dw);
return std::make_tuple(counterDW, particleDW);

}

Expand Down

0 comments on commit 78b68a2

Please sign in to comment.