Hi Rooters,
I am trying to use MakeClass function to read a .root file. Following is a typical example of what I am doing :
TFile *f = new TFile("Event_transport.root");
TTree *v = (TTree*)f->Get("VW");
f->ls();
v->MakeClass("something");
}
This generates a .C and a .h file, which works fine for me. But now my aim is to increase statistics. Therefore I have two rootfiles each of ~2 GB size, as a result I cannot merge them any further.
I wanted to ask is there anyway that I can still use MakeClass function to read these rootfiles together which would generate one .C and .h file so that I have double the statistics.
I tried doing
for(Int_t nFiles=0; nFiles<2; nFiles++) {
char fname[150]; sprintf(fname,"filename_%d.root",nFiles); cout<<endl; printf(fname,"filename_%d.root",nFiles); TFile *file = new TFile(fname,"r"); TTree *P = (TTree*)file->Get("VW"); file->ls(); }
But the above method generates .C and .h files taking the last rootfile as the input.
Thanks in advance.
Monika
Received on Mon Feb 05 2007 - 06:25:13 CET
This archive was generated by hypermail 2.2.0 : Mon Feb 05 2007 - 11:50:01 CET