Is possible update TFile root in the same TTree?

  • ROOT 6.13/03 Built for linuxx8664gcc From heads/master@v6-13-02-109-g95bf30d, Mar 26 2018, 19:59:29

Hi,

I’m trying to save many output in the same TTree or the same TBranch.

  1. What is happening:
TTree  Apr 20 19:00 2018 T   "Tree"
  px   "px/D"   13122
  py   "py/D"   13122
  pz   "pz/D"   13122
  pt   "pt/D"   13122
  e    "e/D"    13121
  id   "id/I"   6594
  Eta  "Eta/D"  13123
  Phi  "Phi/D"  13123
TTree  Apr 20 18:55 2018 T   "Tree"
  px   "px/D"   11474
  py   "py/D"   11474
  pz   "pz/D"   11474
  pt   "pt/D"   11474
  e    "e/D"    11473
  id   "id/I"   5770
  Eta  "Eta/D"  11475
  Phi  "Phi/D"  11475
TTree  Apr 20 19:00 2018 T1  "Tree1"
  gama        "gama/D"        869
  bx          "bx/D"          867
  by          "by/D"          867
  bz          "bz/D"          867
  Nparticles  "Nparticles/I"  475
TTree  Apr 20 18:55 2018 T1  "Tree1"
  gama        "gama/D"        869
  bx          "bx/D"          867
  by          "by/D"          867
  bz          "bz/D"          867
  Nparticles  "Nparticles/I"  475

The TTrees(T,T,T1,T1) is break in two, I would like that to be only (T,T1)one.

or I would like to put the second part in the final of the TBranch (T,T1) of the first.

this is like:

FILE *fout;
  fout = fopen(filename,"a");  

// "a" == save the output at the end of the file

What I’m using:

TFile *file = TFile::Open("pytHIa.root","UPDATE");

// UPDATE == result in what is describe in 
(1 item, above), break in two.

Is possible to do this? how can I do this?

Cheers, Andre

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.