I tried to investigate the problem a lot in my macro, but
it seems to be a very soft kind of interpreter error.
{
.....
Int_t m,k,count,hist[58];
const Int_t nplanes=1;
const Int_t ncounters=10;
char dirname[50];
char hname[20];
char htitle[80];
........// Preparing directories structure
TFile *hfile = gROOT->FindObject("dep.root");
if(hfile) hfile->Close();
hfile = new TFile("dep.root","RECREATE","ROOT file");
TDirectory *top=hfile->mkdir("top");
top->cd();
for(Int_t i=0;i<nplanes;i++)
{
sprintf(dirname,"plane%d",i);
TDirectory *plane=top->mkdir(dirname);
plane->cd();
for(Int_t j=0;j<ncounters;j++)
{
sprintf(hname,"h%d",j);
sprintf(htitle,"Histogram dla m=%d",j);
TH1S *h = new TH1S(hname,htitle,40,0,40);
}
top->cd();
}
..........
.................//Filling directories
top->cd();
plane0->cd();
if((xne[2]>4.4) && (xne[2]<4.5)) h0->Fill(m);
if((xne[2]>4.4) && (xne[2]<4.5) && (m!=12)) h1->Fill(k);
//bad if((xne[2]>4.4) && (xne[2]<4.5) && (m==12)) h2->Fill(k);
if((xne[2]>4.4) && (xne[2]<4.5) && (m==12)) hist[count++]=k;
}
for(Int_t i=0;i<58;i++) h3->Fill(hist[i]);
........
I cannot fulfill only h2 histogram with (m==2). h2 is good if I don't
include (m==something) or I don't insert h2->Fill(k).
Nevertheless, it was easy to check that condition
if((xne[2]>4.4) && (xne[2]<4.5) && (m==12)) h2->Fill(k);
has 58 events and I histogram them in h3.
My program is rather complicated and data file is big, but
I can send them if you need to investigate.
Best wishes,
Tadeusz
-- Tadeusz Pytlos mailto:pytlos@fizwe5.fic.uni.lodz.pl Lodz, Poland