Skip to content

Commit

Permalink
Update Podio examples to only use mutable objs
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwbrei committed May 2, 2024
1 parent ba05cfa commit 4dd0e5f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/examples/PodioExample/PodioExample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ void create_hits_file() {
eventinfos1.push_back(eventinfo1);

ExampleHitCollection hits1;
hits1.push_back(ExampleHit(22, -1, -1, 0, 100, 0));
hits1.push_back(ExampleHit(49, 1, 1, 0, 15.5, 0));
hits1.push_back(ExampleHit(47, 1, 2, 0, 0.5, 0));
hits1.push_back(ExampleHit(42, 2, 1, 0, 4.0, 0));
hits1.push_back(MutableExampleHit(22, -1, -1, 0, 100, 0));
hits1.push_back(MutableExampleHit(49, 1, 1, 0, 15.5, 0));
hits1.push_back(MutableExampleHit(47, 1, 2, 0, 0.5, 0));
hits1.push_back(MutableExampleHit(42, 2, 1, 0, 4.0, 0));

podio::Frame event1;
event1.put(std::move(hits1), "hits");
Expand All @@ -43,10 +43,10 @@ void create_hits_file() {
eventinfos2.push_back(eventinfo2);

ExampleHitCollection hits2;
hits2.push_back(ExampleHit(42, 5, -5, 5, 7.6, 0));
hits2.push_back(ExampleHit(618, -3, -5, 1, 99.9, 0));
hits2.push_back(ExampleHit(27, -10, 10, 10, 22.2, 0));
hits2.push_back(ExampleHit(28, -9, 11, 10, 7.8, 0));
hits2.push_back(MutableExampleHit(42, 5, -5, 5, 7.6, 0));
hits2.push_back(MutableExampleHit(618, -3, -5, 1, 99.9, 0));
hits2.push_back(MutableExampleHit(27, -10, 10, 10, 22.2, 0));
hits2.push_back(MutableExampleHit(28, -9, 11, 10, 7.8, 0));

podio::Frame event2;
event2.put(std::move(hits2), "hits");
Expand Down
6 changes: 3 additions & 3 deletions src/examples/TimesliceExample/MyFileReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ struct MyFileReader : public JEventSource {
auto hits_out = std::make_unique<ExampleHitCollection>();

// ExampleHit(unsigned long long cellID, double x, double y, double z, double energy, std::uint64_t time);
hits_out->push_back(ExampleHit(event_nr, 0, 22, 22, 22, 0));
hits_out->push_back(ExampleHit(event_nr, 0, 49, 49, 49, 1));
hits_out->push_back(ExampleHit(event_nr, 0, 7.6, 7.6, 7.6, 2));
hits_out->push_back(MutableExampleHit(event_nr, 0, 22, 22, 22, 0));
hits_out->push_back(MutableExampleHit(event_nr, 0, 49, 49, 49, 1));
hits_out->push_back(MutableExampleHit(event_nr, 0, 7.6, 7.6, 7.6, 2));

LOG_DEBUG(GetLogger()) << "MySource: Emitted " << GetLevel() << " " << event.GetEventNumber() << "\n"
<< TabulateHits(hits_out.get())
Expand Down

0 comments on commit 4dd0e5f

Please sign in to comment.