Skip to content

Commit

Permalink
Remove unnecessary copies using podio::Frame
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Aug 9, 2024
1 parent 2425b55 commit 4f6fe0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/include/edm4hep2json.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int read_frames(const std::string& filename, const std::string& jsonFile, const

auto collList = splitString(requestedCollections);
if (collList.empty()) {
auto frame = podio::Frame(reader.readFrame(frameName, 0));
auto frame = reader.readFrame(frameName, 0);
collList = frame.getAvailableCollections();
}
if (collList.empty()) {
Expand Down Expand Up @@ -267,13 +267,13 @@ int read_frames(const std::string& filename, const std::string& jsonFile, const
std::cout << "INFO: Reading event " << i << std::endl;
}

auto frame = podio::Frame(reader.readFrame(frameName, i));
auto frame = reader.readFrame(frameName, i);
auto eventDict = processEvent(frame, collList, reader.currentFileVersion());
allEventsDict["Event " + std::to_string(i)] = eventDict;
}
} else {
for (auto& i : eventVec) {
auto frame = podio::Frame(reader.readFrame(frameName, i));
auto frame = reader.readFrame(frameName, i);
auto eventDict = processEvent(frame, collList, reader.currentFileVersion());
allEventsDict["Event " + std::to_string(i)] = eventDict;
}
Expand Down

0 comments on commit 4f6fe0c

Please sign in to comment.