1 // Author: Dariusz Miskowiec <mailto:d.miskowiec@gsi.de> 2008
3 //=============================================================================
4 TChain *makechainexp(char *exp, char *path, int nfil=1000000, int nskip=0) {
6 if (strcmp(exp,"ceres3c2")==0) sprintf(treename,"T");
7 if (strcmp(exp,"aliceesd")==0) sprintf(treename,"esdTree");
8 if (strcmp(exp,"cbm")==0) sprintf(treename,"cbmsim");
9 return makechain(treename, path, nfil, nskip);
11 //=============================================================================
12 TChain *makechain(char *name, char *path, int nfil=1000000, int nskip=0) {
14 // make chain of root files
15 // if path ends with "root" then add all these files;
16 // otherwise interprete path as the list of files and add nfil files
17 // after skipping nskip
19 printf("path=%s\n",path);
21 TChain *chain = new TChain(name);
23 if (str.EndsWith("root")) chain->Add(path);
26 ascii_in.open(path, ios::in);
28 for (int i=0; i<nfil+nskip; i++) {
30 if (ascii_in.eof()) break;
31 if (i>=nskip) chain->Add(filnam);
35 chain->GetListOfFiles()->Print();
38 //=============================================================================