void errors() { Double_t points[4] = {2.3,1.2,4.3,5.5}; Double_t weights[4] = {10.1,12.4,11.5,16.5}; TProfile *profile = new TProfile("","",1,0,1); for(Int_t i=0;i<4;i++) { profile->Fill(0.5,points[i],weights[i]); } // print mean and statistical error from profile: cout<<"Profile calculation:"<