SetMaxEntryLoop in TTree::Process

Hi all,

I have a selector generated using TTree::MakeSelector.
Then I process a chain of files containing this tree with chain->Process(“selector.C++”).
Everything works fine but the Loop stops at ~10^9 events. I saw that the default
value for nentries is:
Long64_t Process(void* selector, Option_t* option = “”, Long64_t nentries = 1000000000, Long64_t firstentry = 0)

so I thought that typing:
chain->Process(“selector.C++”,"",(double)chain->GetEntries(),0)
would solve the problem but it still stops, although chain->GetEntries()
in CINT gives me the total entries which is more than 10^9.

I have also tried adding in the Init(TTree *tree) function the following line:
fChain->SetMaxEntryLoop((Long64_t)10000000000);
but it still stops. fChain->GetMaxEntryLoop() returns the number that I set but
still does not process all the events.

using: root version:5.21/03

thanks.

Hi,

Did you try:chain->Process("selector.C++","",chain->GetEntries(),0);?

Cheers,
Philippe.

Hi,

Do you mean without the (double) at the front, yes I also tried this.

Hi,

[quote]chain->Process(“selector.C++”,"",chain->GetEntries(),0);
Do you mean without the (double) at the front, yes I also tried this.
[/quote]Yes I did as the double may cut some of the precision of the long long.

Anyway, this is really strange as I can not reproduce that behavior; I tried with both 5.21/04 and the trunk with a file with 10^10 entries.

Cheers,
Philippe.

PS. MaxEntryLoop is only used by TTree::Draw (and not by TTree::Process).

Hi Philippe,

I can reproduce the problem with a very simple tree.
The processing stops at :
2.14748364800000000e+09 which is 2**31.
Are you testing it on a 64 bit machine?
I am on a 32 bit machine running Ubuntu8.04.

Thanks

Hi,

I tested on 64 bits. I will retest on 32bits.

Cheers,
Philippe

Instead of

fChain->SetMaxEntryLoop((Long64_t)10000000000); do

fChain->SetMaxEntryLoop(10000000000L);
Rene

Hi,

I confirm that t->Process("counter.C+","",t->GetEntries()); works both on 64 bits and 32 bits build (I tested the trunk and v5.20).

Cheers,
Philippe.

Hi,

I still get the same limitation even when trying in 2 other machines with different root versions. I am sending you the exact files that I use in case you can spot something
obviously wrong. If not I guess it will be a very personal bug! ;( Thanks for your time.

I do:
root -l
root [0] .x filltree.C++
root [3] .q
root -l testselector.root
root [1] mytree->GetEntries()
(const Long64_t)4291697904
root [3] mytree->MakeSelector(“mytree.C”)
root [3] .q

edit a little bit the autogenerated files ot get the ones attached.

root -l
root [0] TFile *_file0 = TFile::Open(“testselector.root”)
root [1] mytree->Process(“mytree.C++”,"",mytree->GetEntries())


processing event 2110000000
processing event 2120000000
processing event 2130000000
processing event 2140000000
(Long64_t)0
root [2] .q
root -l processed.root
root [3] hehi->GetEntries()
(const Double_t)2.14748364800000000e+09
mytree.h (2.47 KB)
mytree.C (3.44 KB)
filltree.C (427 Bytes)

I noticed one more thing that may help resolve this issue.
In one of the machines that I tried the exact files that I sent you we have a
root verstion 5.22/00b
which supports proof-Lite.

Although it stops at 2**31 if I run it with:
root [1] mytree->Process(“mytree.C++”,"",mytree->GetEntries())

If I run it with the following commands it processes all events!!

root [0] p = TProof::Open("")
+++ Starting PROOF-Lite with 8 workers +++
Opening connections to workers: OK (8 workers)
Setting up worker servers: OK (8 workers)
PROOF set to parallel mode (8 workers)
(class TProof*)0x85f0b90
root [1] TDSet *set;
root [2] set = new TDSet(“TTree”,“mytree”);
root [3] set->Add(“testselector.root”)
(Bool_t)1
root [4] set->Process(“mytree.C+”)

[quote]I still get the same limitation even when trying in 2 other machines with different root versions.[/quote]Can you be more specific on the configuration which fails (I.e. ROOT version number, OS, etc.)

Thanks,
Philippe

Hi ,

I am sending you 3 configurations from machines which stopped at 2**31
and 1 from a machine that processed all events.
Note the last one is a 64bit machine and using the exact same code, commands and root version as in the 3rd (which failed) it run all the events!!!

1st) CONFIGURATION THAT FAILED:

root-config --version
5.21/03

g++ --version
g++ (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)

uname -a
Linux t60p 2.6.24-24-generic #1 SMP Tue Aug 18 17:04:53 UTC 2009 i686 GNU/Linux

2nd) CONFIGURATION THAT FAILED (successful when run it under Proof-Lite):

root-config --version
5.22/00b

g++ --version
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)

uname -a
Linux a1.gam.lbl.gov 2.6.18-128.7.1.el5PAE #1 SMP Mon Aug 24 08:59:38 EDT 2009 i686 i686 i386 GNU/Linux

3rd ) CONFIGURATION THAT FAILED:

root-config --version
5.23/04

g++ --version
g++ (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

uname -a
Linux lxi012 2.6.24-etchnhalf.1-686 #1 SMP Sat Aug 15 16:51:49 UTC 2009 i686 GNU/Linux

4th) CONFIGURATION THAT SUCCEEDED (it’s a 64bit machine)

root-config --version
5.23/04

g++ --version
g++ (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

uname -a
Linux lxi020 2.6.24-etchnhalf.1-amd64 #1 SMP Sat Aug 15 20:38:41 UTC 2009 x86_64 GNU/Linux

thanks

Hi,

The problem is fixed by revision 30895 of the trunk.

Thanks for the detailed report.
Philippe.