Strange behaviour of CINT [message #11881] |
Wed, 25 May 2011 15:23 |
Simone Bianco
Messages: 29 Registered: January 2009
|
continuous participant |
From: *to.infn.it
|
|
Dear all,
if I write a macro like the following:
test.C
void test(Int_t nEv)
{
gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
for (Int_t j = 0 ; j < nEv ; j++)
{
cout << "j: " << j << " - nEv: " << nEv << endl;
}
}
and I run it with a
I correctly get:
j: 0 - nEv: 10
j: 1 - nEv: 10
j: 2 - nEv: 10
j: 3 - nEv: 10
j: 4 - nEv: 10
j: 5 - nEv: 10
j: 6 - nEv: 10
j: 7 - nEv: 10
j: 8 - nEv: 10
j: 9 - nEv: 10
But If I do:
root [0] .L test.C
root [1] test(10)
I only get the first cycle run:
The problem disappears if I comment out the rootlogon call.
Any idea about why this is happening?
Cheers,
Simone
|
|
|
|
|
|