Hello
I am filling 7 axis THnSparse object with MakeClass before that
And for 6 and 7-th of them I have overflows and underflows
I do not see what is wrong with it
[code]#include <THnSparse.h>
void HI_JPsi_MinBias_el::Loop()
{
if (fChain == 0) return;
int dims = 7;
int nbins[7] = {11 ,20 ,20 ,100 ,125 ,125 ,82 };
float mins[7] = {-0.5,-0.5 ,-0.5,-5 ,-25 ,-25 ,-0.05 };
float maxs[7] = {10.5,19.5 ,19.5,5 ,100 ,100 ,0.2 };
Int_t* bins = new Int_t[dims];
Double_t *xmin = new Double_t[dims];
Double_t *xmax = new Double_t[dims];
for(int i =0;i<dims;i++)
{
bins[i]=nbins[i];
xmin[i]=mins[i];
xmax[i]=maxs[i];
}
THnSparseF *hist_R30 = new THnSparseF(âhist_R30â,âhist_R30â,dims,bins,xmin,xmax);
Long64_t nentries = fChain->GetEntriesFast();
Long64_t nbytes = 0, nb = 0;
for (Long64_t jentry=0; jentry<nentries;jentry++) {
Long64_t ientry = LoadTree(jentry);
if (ientry < 0) break;
nb = fChain->GetEntry(jentry); nbytes += nb;
Double_t *vals = new Double_t[24];
vals[0]=5.0;
vals[1]=11.0;
vals[2]=12.3;
vals[3]=3.4;
vals[4]=56;
vals[5]=54;
vals[6]=0.1;
hist_R30->Fill(vals);
}//End of HI_JPsi_MinBias_el::Loop
TFile* f=new TFile(âData_electrons.rootâ,ârecreateâ);
hist_R30->Write();
f -> Close();
f -> Write();
}[/code]