Skip to content

Commit b27696f

Browse files
Correction in ending event loop.
1 parent 479e82b commit b27696f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ramview_nidx.C

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// View a region of a RAM file.
33
//
4-
// Author: Jose Javier Gonzalez Ortiz, 5/7/2017
4+
// Author: Fons Rademakers, 7/12/2017
55
//
66

77
#include <iostream>
@@ -87,15 +87,16 @@ void ramview_nidx(const char *file, const char *query, bool cache = true, bool p
8787
t->SetBranchStatus("RAMRecord.*", 1);
8888

8989
Long64_t j;
90-
for (j = start_entry; j <= end_entry; j++) {
90+
for (j = start_entry; j < end_entry; j++) {
9191
t->GetEntry(j);
9292
r->Print();
9393
}
9494

95-
t->GetEntry(j++);
96-
while (r->GetPOS() <= range_end) {
97-
t->GetEntry(j++);
95+
t->GetEntry(j);
96+
while (r->GetPOS() < range_end) {
9897
r->Print();
98+
j++;
99+
t->GetEntry(j);
99100
}
100101

101102
stopwatch.Print();

0 commit comments

Comments
 (0)