void SimpleAnalysis(Int_t nEvents, Int_t nFiles, TString InputFileList, TString OutputDir, TString JobIdName ) { // Load libraries load() ; // See details below gSystem -> Load("StPicoEvent") ; gSystem -> Load("StPicoDstMaker") ; gSystem -> Load("SimpleAnalysis.so") ; // List of member links in the chain StChain* chain = new StChain ; StPicoDstMaker* picoDstMaker = new StPicoDstMaker(StPicoDstMaker::IoRead,InputFileList,"picoDst") ; SimpleAnalysisMaker* AnalysisCode = new SimpleAnalysisMaker(picoDstMaker) ; // Turn off everything but Primary and Global tracks in order to speed up the analysis and eliminate IO picoDstMaker -> SetStatus("*",0) ; // Turn off all branches picoDstMaker -> SetStatus("Event*",1) ; // Turn on the Event data (esp. Event number) picoDstMaker -> SetStatus("Track*",1) ; // Turn on the track data (global and primary tracks included in this selection) // Miscellaneous things we need before starting the chain TString Name = JobIdName ; Name.Append(".histograms.root") ; AnalysisCode -> SetOutputFileName(Name) ; // Name the output file for histograms if ( nEvents == 0 ) nEvents = 10000000 ; // Take all events in nFiles if nEvents = 0 // Loop over the links in the chain chain -> Init() ; chain -> EventLoop(1,nEvents) ; chain -> Finish() ; // Cleanup delete chain ; } void load() { gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C") ; loadSharedLibraries() ; gSystem->Load("StDetectorDbMaker.so") ; gSystem->Load("StTpcDb") ; gSystem->Load("StEvent") ; gSystem->Load("StMcEvent") ; gSystem->Load("StMcEventMaker") ; gSystem->Load("StDaqLib") ; gSystem->Load("libgen_Tables") ; gSystem->Load("libsim_Tables") ; gSystem->Load("libglobal_Tables") ; gSystem->Load("StMagF") ; gSystem->Load("StDbUtilities") ; gSystem->Load("StEEmcUtil") ; gSystem->Load("StEEmcDbMaker") ; gSystem->Load("St_g2t.so") ; gSystem->Load("St_geant_Maker.so") ; gSystem->Load("StAssociationMaker") ; gSystem->Load("StMcAnalysisMaker") ; gSystem->Load("libgeometry_Tables") ; gSystem->Load("StTriggerUtilities") ; gSystem->Load("StEmcUtil") ; gSystem->Load("StEmcRawMaker") ; gSystem->Load("StEmcADCtoEMaker") ; gSystem->Load("StPreEclMaker") ; gSystem->Load("StEpcMaker") ; gSystem->Load("StEmcSimulatorMaker") ; gSystem->Load("StDbLib") ; gSystem->Load("StDbBroker") ; gSystem->Load("StDetectorDbMaker") ; gSystem->Load("St_db_Maker") ; gSystem->Load("StBTofUtil") ; gSystem->Load("StMtdHitMaker") ; gSystem->Load("StMtdUtil") ; gSystem->Load("StMtdMatchMaker") ; gSystem->Load("StVpdCalibMaker") ; gSystem->Load("StBTofCalibMaker") ; gSystem->Load("StMtdCalibMaker") ; }