GetNbinX() problem

Hi, I have a program that was running in lxplus, now I have it in my local computer with root 4.02. I am initiallizing TH1F class as new TH1F(“title”, “title”, 500, 0, 500);

When I try to get the number of bins in the next step with GetNbinX();
I get 142907872 in twice of 500.

The only difference with afs version and local version is that in afs I was using shift.h library to access castor.

Any idea?

Thanks

Please send the shortest possible RUNNING script reproducing this problem.

Rene

Here is a small program with the same output

#include

#include
using namespace std;

int main()
{

TH1F *h = new TH1F("height", "", 500, 0, 500);
cout <<h>GetNbinsX() << endl;
delete h;

}

I compile it with the next command:

g++ -I$ROOTSYS/include -L$ROOTSYS/lib -lCore -lCint -lHist -lMatrix -ldl file.cxx

And the output:

Error in : Integral = zero
140873448

You must have something very wrong in your environment.
It could be that your test program was truncated when posting it.
Always use the “Code” option and disable html when posting code.
Could you run the following test? If it still does not work,
I suggest to remove your installation of ROOT and take the current pro version 5.14

Rene

[code]#include <TH1F.h>

#include
using namespace std;

int main()
{

TH1F *h = new TH1F(“height”, “”, 500, 0, 500);
cout <GetNbinsX() << endl;
delete h;
return 0;
} [/code]