From 57b5adcb4a605869e87dba9f5821b247ba874f8b Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 17 Apr 2024 11:38:19 +0200 Subject: [PATCH] only print event entries if error --- root/tree/index/index64.ref | 13 ------------- root/tree/index/runindex64.C | 10 ++++++++-- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/root/tree/index/index64.ref b/root/tree/index/index64.ref index 85e9140d35..b134f27148 100644 --- a/root/tree/index/index64.ref +++ b/root/tree/index/index64.ref @@ -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: diff --git a/root/tree/index/runindex64.C b/root/tree/index/runindex64.C index 2b6e1e4d4c..bb61235a38 100644 --- a/root/tree/index/runindex64.C +++ b/root/tree/index/runindex64.C @@ -40,10 +40,16 @@ int runindex64(){ for (size_t i=0; iGetEntryNumberWithIndex(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; iGetEntryNumberWithIndex(run, event) << endl; + } + } test(tree); file.Close();