Re: [ROOT] problem with chaining ntuples

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Nov 27 2002 - 23:40:50 MET


Hi Masoud,

I have the impression that you have generated myfile.h,C
with one of your files (eg the first Root file).
In the code generated, there are arrays like;
   Float_t         en1[4];   //[mul1]
   Float_t         en2[3];   //[mul2]
   Float_t         thg[83];   //[mulg]
   Float_t         phg[83];   //[mulg]
   Float_t         delta[83];   //[mulg]
   Float_t         energy[83];   //[mulg]
   Float_t         id[83];   //[mulg]
   Float_t         tdc[83];   //[mulg]

for which the maximum size is based on the maximum value
of the lements mul1,mul2, etc for the entries in the first file.
It could be that in other files, mul1,2 have values
greater than the ones above.
Could you increase the size of these arrays to the maximum you expect
over all files and let me know.

Rene Brun

On Wed, 27 Nov 2002, Masoud M.Shafiei wrote:

> Dear Root users,
> 
>         I have 27 ntuple files of  about 6 Mbytes.  When I call them one
> by one on a root session everything goes well.
> What I want to do is to chain them all, make a class out of them ( using
> MakeClass command)
> and analyze my data. But, apparently the class made of a chain of more
> than 4 ntuples leads to
> segmentation violation while looping over the data!!
> 
> ***********************************************
> Compiled for linux with thread support.
> 
> CINT/ROOT C/C++ Interpreter version 5.15.50, July 7 2002
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> root [0] TChain ch("t");
> root [1] ch.Add("*.root");
> root [2] ch.MakeClass("myfile")
> Info in <TTreePlayer::MakeClass>: Files: myfile.h and myfile.C generated
> from Tree: t
> (Int_t)0
> root [0] .L myfile.C
> root [1] myfile t
> root [2] t.Loop();
> 
>  *** Break *** segmentation violation
> Root >
> ******************************************************************
> 
> I have attached the  "myfile.C and myfile.h" created by  MakeClass()
> command, in case you may have look at them.
> 
> any help is appreciated.
> 
> Best Regards
> Masoud
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:21 MET