Alessio, I can only repeat once more that pointers passed to TTree::Branch MUST BE INITIALIZED. In your case, replace: TVector *ch; TVector *hit; by TVector *ch=0; TVector *hit=0; Rene Brun Alessio Sarti wrote: > > On Fri, 24 Sep 2004, Rene Brun wrote: > > > Hi Alessio, > > > > Move to a more recent version, eg 4.01/02 > > After switching to version 4.01/02 I have encountered now a more severe > problem: at run time my code causes a bad crash. > > I'm trying to fill an ntuple with TVectors: > TVector *ch; > TVector *hit; > > ntpT->Branch("hit","TVector",&hit,32000,0); > ntpT->Branch("ch", "TVector",&ch ,32000,0); > > This code did ran just fine with Version 3.05/07. > Do I need to use a different syntax? > > Thanks again for your help. > Alessio > > > > > Rene Brun > > > > Alessio Sarti wrote: > > > > > > Hi all, > > > I'm trying to merge some ntuples with Version 3.05/07 and I'm having > > > problems with the produced ntuple. > > > The merging of the trees shows no problem: > > > the macro runs fine and I can open the "merged" file. > > > I can even call the Draw() function on the merged TTree. > > > But when I try to use the Scan() function or the Show or the Loop one I > > > have problems. > > > > > > The merged ntuple contains TVectors (below I show the content of my > > > ntuple...) > > > > > > //Declaration of leaves types > > > Int_t evt; > > > Int_t nadc; > > > Int_t ntdc; > > > Int_t ntdc128; > > > Int_t adcM[8][1]; > > > Int_t tdcM[8][1]; > > > TVector *Shit; > > > TVector *Sch; > > > > > > //List of branches > > > TBranch *b_evt; //! > > > TBranch *b_nadc; //! > > > TBranch *b_ntdc; //! > > > TBranch *b_ntdc128; //! > > > TBranch *b_adcM; //! > > > TBranch *b_tdcM; //! > > > TBranch *b_Shit; //! > > > TBranch *b_Sch; //! > > > > > > Here's my problem.. > > > > > > root [1] ((TTree*)gDirectory->Get("data"))->Scan(); > > > ************************************************************************************************************ > > > * Row * evt * nadc * ntdc * ntdc128 * adcM * > > > tdcM * Shit * Sch * > > > ************************************************************************************************************ > > > > > > *** Break *** segmentation violation > > > Generating stack trace... > > > /usr/bin/c++filt: unknown demangling style `gnu-new-abi' > > > Root > > > > > > > I've used the merging routine to merge other root files and everything > > > works fine: am I doing something wrong or there's a problem merging > > > TVectors? > > > > > > Thanks for any advice or help, > > > alessio > > > > > > ______________________________________________________ > > > Alessio Sarti INFN Frascati > > > > > > >>>I'm in Frascati<<< > > > > > > Cell +39-06-94038166 > > > Office +39-06-94032776 > > > Fax +39-06-94032427 > > > > > > "... e a un Dio 'fatti il culo' non credere mai..." > > > (F. De Andre') > > > > > > "He was turning over in his mind an intresting new concept in > > > Thau-dimensional physics which unified time, space, magnetism, gravity > > > and, for some reason, broccoli". (T. Pratchett: "Pyramids") > >
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET