MakeClass problem with 4.04 on Mac OsX 10.3.9

Hello,

When I use a class created from a tree (using MakeClass) with the new version (4.04) on MacOS X the Loop() function has a problem. The loop part like:

for (Long64_t jentry=0; jentry<nentries;jentry++) {
Long64_t ientry = LoadTree(jentry);

  cout << " jentry = " << jentry << endl;

  if (ientry < 0) break;
  nb = fChain->GetEntry(jentry);   nbytes += nb;
  // if (Cut(ientry) < 0) continue;

}

is only carried out once, even though the condition ‘jentry<nentries’ is not fulfilled and ientry = 0. If I run the same script with on older version e.g. 4.02 everything works fine.

Has anybody the same problem or any idea what it could be. Thanks for suggestions and

kind regards

Werner

Hi,

This is strange indeed. First make sure that the (rest of the) code is correct by compiling it (using ACLiC for example). If the compiled version works correctly then you may have incorrect a problem in CINT (try to issue the CINT command .O 0 and see if helps) in which case you should submit a complete example that we can reproduce and solve the issue.

Cheers,
Philippe.

Hi Werner and Philippe,

My answer seems to be lost after restoring the forum !

It seems that all loops of the form

for (Long64_t …) do not work in CINT on MacOSX but do
work with ACLiC .

Eddy

Hi Eddy, Philipe

I just tried a few combinations following Eddy’s example:

#include “Riostream.h”
#include “Rtypes.h”

void run(){
Long64_t nentries = 10;
for (Long64_t jentry=0; jentry<nentries;jentry++) {
cout << " jentry = " << jentry << endl;
}

for (Int_t ientry=0; ientry<nentries;ientry++) {
cout << " ientry = " << ientry << endl;
}

Int_t inentries = 10;
for (Int_t kentry=0; kentry<inentries;kentry++) {
cout << " kentry = " << kentry << endl;
}

}

All loops work correctly in ACLiC, but only the last one work in CINT. It seems that CINT on Mac OSX does not like a Long64_t type anywhere.

Werner

Indeed. I can reproduce the problem and will work on it.
In the mean-time use ACLiC :slight_smile:

Cheers,
Philippe.

This problem is now solved in the CVS repository.

Cheers,
Philippe.