Skip to content

Commit ed85b4c

Browse files
authored
Avoid doing one iteration when the tree has no entries (#13388)
1 parent b8782ae commit ed85b4c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Detectors/EMCAL/simulation/src/RawCreator.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ int main(int argc, const char** argv)
122122
rawwriter.init();
123123

124124
// Loop over all entries in the tree, where each tree entry corresponds to a time frame
125-
for (auto en : *treereader) {
125+
while (treereader->Next()) {
126126
rawwriter.digitsToRaw(*digitbranch, *triggerbranch);
127127
}
128128
rawwriter.getWriter().writeConfFile("EMC", "RAWDATA", o2::utils::Str::concat_string(outputdir, "/EMCraw.cfg"));

Detectors/PHOS/simulation/src/RawCreator.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int main(int argc, const char** argv)
109109
rawwriter.init();
110110

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

0 commit comments

Comments
 (0)