Error: 'Fill' is a private member of 'TProfile'


I am using RooUnfold on lxplus7 and to do so I use a specific source command:

source /cvmfs/
source build/

In the same code, I try to fill a TProfile histogram:

TProfile *h_profV2_5_gen  = new TProfile("h_profV2_5_gen","Profile v2 5 gen",5,0,40,-1,1);

And I get the error:
In file included from input_line_8:1:
/afs/ error: ‘Fill’ is a private member of ‘TProfile’
/cvmfs/ note: declared private here
Int_t Fill(Double_t) { MayNotUse(“Fill(Double_t)”); return -1;}
root [1]

I haven’t gotten this error before with TProfiles, so I assume this is specific to the ROOT setup I’m using. Is there a way around this?


Please read tips for efficient and successful posting and posting code

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.

ROOT Version: ROOT 6.24/00
Platform: Ubuntu
Compiler: Not Provided

Try TProfile::FIll(x,y), with y=1 (i.e. adding 1 event, without weight, at that bin); see other Fill methods for v.6.24 on the linked page; the one you used, Fill(x), is listed but if you see the code by clicking on the link at “Definition at line…”, it just sends the message you get.

h_profV2_5_gen->Fill(cos_2phi_gen, 1);

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.