00001 // NOTE - chain needs to be declared global so for StHbtEventReader 00002 //========================================================================================== 00003 #ifndef SchedulerExample_C 00004 #define SchedulerExample_C 00005 00006 00007 class StMiniEventMaker; 00008 class StMuDbReader; 00009 00010 void SchedulerExample(const char* fileList, const char* outFile="SchedulerExample.root") { 00011 gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C"); 00012 loadSharedLibraries(); 00013 00014 // create the chain" 00015 StChain * chain = new StChain("StChain"); 00016 chain->SetDebug(0); 00017 00018 // now create StMuDstMaker 00019 // agruments are: 00020 // 0 : read mode 00021 // 0 : name mode (has no effect on read mode) 00022 // "" : input directory, ignored when filename or fileList is specified 00023 // fileList : list of files to read 00024 // "" : filter 00025 // 1e9 : maximum number of files to read 00026 // MuDstMaker : name of the maker 00027 //cout << " press any key " << endl; cin.ignore(); 00028 //StMuDebug::setLevel(0); 00029 // StMuDstMaker* muDstMaker = new StMuDstMaker(0,0,"",fileList,"",10,"MuDstMaker"); 00030 00031 00032 // now add your analysis maker 00033 // SchedulerExample* analysis = new SchedulerExample(outFile); 00034 00035 // Init the chain 00036 chain->Init(); // This should call the Init() method in ALL makers 00037 chain->PrintInfo(); 00038 00039 int iret = 0; 00040 int iev =0; 00041 // now loop over events, makers are call in order of creation 00042 while ( !iret ) { 00043 cout << "SchedulerExample.C -- Working on eventNumber " << iev++ << endl; 00044 chain->Clear(); 00045 iret = chain->Make(iev); // This should call the Make() method in ALL makers 00046 } // Event Loop 00047 chain->Finish(); // This should call the Finish() method in ALL makers 00048 00049 } 00050 00051 00052 #endif 00053
1.5.9