Skip to content

Commit

Permalink
only print event entries if error
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdymercury authored Apr 17, 2024
1 parent c94145a commit 57b5adc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
13 changes: 0 additions & 13 deletions root/tree/index/index64.ref
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@

Processing runindex64.C...
Tree BuildIndex returns 13
0: Run 8, Event 0 found at entry number: 0
1: Run 5, Event 1 found at entry number: 1
2: Run 5, Event 3 found at entry number: 2
3: Run 5, Event 2 found at entry number: 3
4: Run 5, Event 1152921504606846975 found at entry number: 4
5: Run 5, Event 18446744073709551600 found at entry number: -1
6: Run 0, Event 5 found at entry number: 6
7: Run 4, Event 1152921504606846975 found at entry number: 7
8: Run 6, Event 3 found at entry number: 8
9: Run 18446744073709551600, Event 1152921504606846975 found at entry number: -1
10: Run 1152921504606846975, Event 18446744073709551600 found at entry number: -1
11: Run 1152921504606846975, Event 1152921504606846975 found at entry number: 11
12: Run 18446744073709551600, Event 18446744073709551600 found at entry number: -1
Entries in chain: 13
BuildIndex returns 13
Try to find the position of run=0, event=500 in the chain, as it does not exist, this should return a -1:
Expand Down
10 changes: 8 additions & 2 deletions root/tree/index/runindex64.C
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ int runindex64(){
for (size_t i=0; i<sizeof(events)/sizeof(*events); i++) {
run = runs[i];
event = events[i];
cout << i << ": Run " << run << ", Event " << event << " found at entry number: " << tree->GetEntryNumberWithIndex(run, event) << endl;
pass &= (tree->GetEntryNumberWithIndex(run, event) == i);
}
if (!pass) tree->Scan("run:event","","colsize=30");
if (!pass) {
tree->Scan("run:event","","colsize=30");
for (size_t i=0; i<sizeof(events)/sizeof(*events); i++) {
run = runs[i];
event = events[i];
cout << i << ": Run " << run << ", Event " << event << " found at entry number: " << tree->GetEntryNumberWithIndex(run, event) << endl;
}
}

test(tree);
file.Close();
Expand Down

0 comments on commit 57b5adc

Please sign in to comment.