4 // This is an example how to run a selector
6 // This script runs the AliSelector on a chain of ESD files,
7 // some debug information is printed
10 #include "CreateESDChain.C"
13 // dataDir: the directory containing subdirectories that contain the ESD files
14 // nRuns: the number of files that should be processed
15 // offset: the directory to start with
16 void testAliSelector(const Char_t* dataDir, Int_t nRuns = 5, Int_t offset = 0)
18 // load needed libraries
19 gSystem->Load("libEG");
20 gSystem->Load("libGeom");
21 gSystem->Load("libESD");
22 gSystem->Load("libPWG0base");
24 // create chain, CreateESDChain() is defined in CreateESDChain.C
25 TChain* chain = CreateESDChain(dataDir, nRuns, offset);
28 AliLog::SetClassDebugLevel("AliSelector", AliLog::kInfo);
30 // run selector on chain
31 Long64_t result = chain->Process("AliSelector.cxx+");
35 printf("ERROR: Executing process failed with %d.\n", result);
39 printf("Execution complete.\n");