FairRoot/PandaRoot
tools/MVA/macro/scripts/treeMerge.C
Go to the documentation of this file.
1 #include "Riostream.h"
2 
3 int treeMerge(Char_t *treename, Char_t *infilelist, Char_t *outfile)
4 {
5  Int_t nlines = 0;
6  Char_t filename[64];
7 
8  ifstream in;
9  in.open(infilelist);
10 
11  TChain ch(treename);
12 
13  while (1)
14  {
15  in >> filename;
16  if (!in.good()) break;
17  printf("Adding %s\n",filename);
18  ch.AddFile(filename);
19  }
20 
21  ch.Merge(outfile);
22 
23  return 0;
24 }
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
Int_t nlines
Definition: crosstag.C:23
int treeMerge(Char_t *treename, Char_t *infilelist, Char_t *outfile)
TString outfile
const string filename