FairRoot/PandaRoot
Functions
tools/MVA/macro/scripts/treeMerge.C File Reference
#include "Riostream.h"

Go to the source code of this file.

Functions

int treeMerge (Char_t *treename, Char_t *infilelist, Char_t *outfile)
 

Function Documentation

int treeMerge ( Char_t *  treename,
Char_t *  infilelist,
Char_t *  outfile 
)

Definition at line 3 of file tools/MVA/macro/scripts/treeMerge.C.

References filename, nlines, and printf().

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
TString outfile
const string filename