Skip to content

Commit

Permalink
Avoid doing one iteration when the tree has no entries (AliceO2Group#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf authored Aug 15, 2024
1 parent b8782ae commit ed85b4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Detectors/EMCAL/simulation/src/RawCreator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int main(int argc, const char** argv)
rawwriter.init();

// Loop over all entries in the tree, where each tree entry corresponds to a time frame
for (auto en : *treereader) {
while (treereader->Next()) {
rawwriter.digitsToRaw(*digitbranch, *triggerbranch);
}
rawwriter.getWriter().writeConfFile("EMC", "RAWDATA", o2::utils::Str::concat_string(outputdir, "/EMCraw.cfg"));
Expand Down
2 changes: 1 addition & 1 deletion Detectors/PHOS/simulation/src/RawCreator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ int main(int argc, const char** argv)
rawwriter.init();

// Loop over all entries in the tree, where each tree entry corresponds to a time frame
for (auto en : *treereader) {
while (treereader->Next()) {
rawwriter.digitsToRaw(*digitbranch, *triggerbranch);
}
rawwriter.getWriter().writeConfFile("PHS", "RAWDATA", o2::utils::Str::concat_string(outputdir, "/PHSraw.cfg"));
Expand Down

0 comments on commit ed85b4c

Please sign in to comment.