Home | News | Documentation | Download

Error when using TProfile::GetBinEntries

I am simply using GetBinEntries() method:

Double_t Entries = h1->GetBinEntries(2);

I got an error message:

error: no member named 'GetBinEntries' in 'TH1D'

The histogram h1 was defined earlier:

TH1D * h1 = new TH1D ("h1","h1", 71, 13.5, 13000);

How should I call TProfile or let root know I need to use Class TProfile in this case?
Or I understand wrong about this error message.

_ROOT Version: 6.22/06
_Platform: Mac

Search GetBinEntries entries in the reference guide (“search box” top right) and you will get the list of classes having this method. TH1D is not one of them.