Re: [ROOT] Copy branch pb

From: Sebastien Greder (greder@in2p3.fr)
Date: Thu Oct 03 2002 - 16:24:45 MEST


Hi Rene,


Thanks for quick reply but ...........
ok I have the same output when printing the tree content
but if you check the value for each leaves  of Gtr401atDCA branch, it
is set to 0 but wasn't in the input root file, that's my problem.
I loose all the data just for this branch.

seb


On Thu, 3 Oct 2002, Rene Brun wrote:

> Hi Sebastien,
> 
> I can run your simple example without problems using the PRO
> version 3.03/09. I believe that the ouput is correct.
> See the result of TTree::Print below.
> I suggest to try with version 3.03/09 and let me know.
> 
> Rene Brun
> 
> root [0] TFile f("out.root")
> root [1] .ls
> TFile**         out.root
>  TFile*         out.root
>   KEY: TTree    Global;1        Global
> root [2] Global.Print()
> ******************************************************************************
> *Tree    :Global    : Global
> *
> *Entries :       13 : Total =          126477 bytes  File  Size =
> 66252 *
> *        :          : Tree compression factor =   1.37
> *
> ******************************************************************************
> *Br    0 :GTRACK    : ngtrk/I:chi_2[ngtrk]/F:dca0[ngtrk]/F:dca1[ngtrk]/F:
> *
> *         |
> dcaerr0[ngtrk]/F:dcaerr1[ngtrk]/F:dedx[ngtrk]/F:dphidir[ngtrk]/F:*
> *         | dpq[ngtrk]/F:dpt[ngtrk]/F:dqoverpt[ngtrk]/F:drmin[ngtrk]/F:
> *
> *         | drp[ngtrk]/F:drq[ngtrk]/F:drsig[ngtrk]/F:drt[ngtrk]/F:
> *
> *         | drz[ngtrk]/F:dtanl[ngtrk]/F:dtq[ngtrk]/F:dzca[ngtrk]/F:
> *
> *         | dzp[ngtrk]/F:dzq[ngtrk]/F:dzt[ngtrk]/F:ededx[ngtrk]/F:
> *
> *         | gtindex[ngtrk]/I:mcidx[ngtrk]/I:ncft[ngtrk]/I:nsmt[ngtrk]/I:
> *
> *         | phidir[ngtrk]/F:qoverpt[ngtrk]/F:rc[ngtrk]/F:rsig[ngtrk]/F:
> *
> *         |
> tanl[ngtrk]/F:tanth[ngtrk]/F:xc[ngtrk]/F:yc[ngtrk]/F:zc[ngtrk]/F:*
> *         | zca[ngtrk]/F
> *
> *Entries :       13 : Total  Size=      54697 bytes  File Size  =
> 26962 *
> *Baskets :        1 : Basket Size=      32000 bytes  Compression=   1.20
> *
> *............................................................................*
> *Br    1 :Gtr401atDCA : ntrk401DCA/I:chsq[ntrk401DCA]/F:cid/I:
> *
> *         | err00[ntrk401DCA]/F:err10[ntrk401DCA]/F:err11[ntrk401DCA]/F:
> *
> *         | err20[ntrk401DCA]/F:err21[ntrk401DCA]/F:err22[ntrk401DCA]/F:
> *
> *         | err30[ntrk401DCA]/F:err31[ntrk401DCA]/F:err32[ntrk401DCA]/F:
> *
> *         | err33[ntrk401DCA]/F:err40[ntrk401DCA]/F:err41[ntrk401DCA]/F:
> *
> *         | err42[ntrk401DCA]/F:err43[ntrk401DCA]/F:err44[ntrk401DCA]/F:
> *
> *         | hmaskw1[ntrk401DCA]/I:hmaskw2[ntrk401DCA]/I:
> *
> *         | hmaskw3[ntrk401DCA]/I:nhit[ntrk401DCA]/I:nmeas[ntrk401DCA]/I:
> *
> *         | par0[ntrk401DCA]/F:par1[ntrk401DCA]/F:par2[ntrk401DCA]/F:
> *
> *         | par3[ntrk401DCA]/F:par4[ntrk401DCA]/F:parsrf/F
> *
> *Entries :       13 : Total  Size=      71262 bytes  File Size  =
> 18746 *
> *Baskets :        1 : Basket Size=      32000 bytes  Compression=   1.61
> *
> *............................................................................*
> 
> 
> On Thu, 3 Oct 2002, Sebastien Greder wrote:
> 
> > Hi Rooters,
> > 
> > I'm encountering some problems while copying a tree.
> > I put an examplein :
> > 
> > /afs/in2p3.fr/home/g/greder/public/testnew.tar.gz
> > 
> > To sum up , I want to do som selection on events in a tree.
> > Also I want to remove some branches I don't use. 
> > I wrote a small macro to do this but there's a problem when copying one
> > branch : Gtr401atDCA, it's completely empty in the output except for one
> > variable ntrk401DCA. All the other branches are correctly copyed.
> > 
> > I don't know if it's a branch pb, I don't think my code does something
> > wrong since the other branches are ok, but I don't know how to check the
> > branch "state"
> > 
> > sebastien.
> > 
> > pd : to use the prog :
> > 
> > root
> > .L teststream.C
> > main("out.root") ==> output file.
> > 
> > I'm running on RH 6.4 with version 03.02.07 compiled with gcc 2.91
> > 
> > 
> > 
> > 
> 
> 



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