1 /***************************************************************************
2 * This macros collects into a common Tree sets of ESD objects
3 * saved individually in separate files given by "fnames".
5 * root [0] .L $ALICE_ROOT/STEER/AliESD2Tree.C
6 * root [1] char * names[] = {"rfio:///castor/cern.ch/user/a/aliprod/AliEn-1.0/data/00001/00205.1077678127","rfio:///castor/cern.ch/user/a/aliprod/AliEn-1.0/data/00001/00467.1077678996"}
7 * root [2] AliESD2Tree(names,2)
9 **************************************************************************/
11 #if !defined(__CINT__) || defined(__MAKECINT__)
13 #include <Riostream.h>
21 static const Char_t *names[]={"AliESDs.root"};
22 static Int_t n=sizeof(names)/sizeof(Char_t *);
24 Int_t AliESD2Tree(const Char_t *fnames[]=names, Int_t nf=n) {
25 TFile out("AliESDtree.root","recreate");
27 TTree *esdTree=new TTree("esdTree","Tree with ESD objects");
29 esdTree->Branch("ESD","AliESD",&event);
31 for (Int_t i=0; i<nf; i++) {
32 TFile * in = TFile::Open(fnames[i]);
34 ::Error("AliESD2Tree.C","Can't open file %s",fnames[i]);
38 TIter next(in->GetListOfKeys());
39 while ((key=(TKey*)next())!=0) {
40 event=(AliESD*)key->ReadObj();