GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Strange behaviour of CINT
Strange behaviour of CINT [message #11881] Wed, 25 May 2011 15:23 Go to previous message
Simone Bianco is currently offline  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

root -l 'test.C(10)'


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:

j: 0 - nEv: 10


The problem disappears if I comment out the rootlogon call.

Any idea about why this is happening?

Cheers,

Simone
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: TPC geometry fixed
Next Topic: Vertex smearing in FairPrimaryGenerator
Goto Forum:
  


Current Time: Wed Dec 04 23:08:11 CET 2024

Total time taken to generate the page: 0.00844 seconds