#include #include "TROOT.h" #include "TSystem.h" #include "TChain.h" #include "TTree.h" //_____________________ void FemtoDstQA_pp200_pythia8(const char *flist = "test.list", const char *ofile = "femtoQA_pp200_pythia8.root") { std::cout << "Input file list = " << flist << '\n'; if (!flist) { std::cout << "Input file list = NULL!\n"; return; } // // Load libraries // gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C"); loadSharedLibraries(); gSystem->Load("libMinuit"); gSystem->Load("StMuDSTMaker"); gSystem->Load("StChain"); gSystem->Load("StRefMultCorr"); gSystem->Load("StFlowMaker"); gSystem->Load("StFlowAnalysisMaker"); gSystem->Load("StHbtMaker"); gSystem->Load("StPicoDstMakerRun12"); gSystem->Load("StarClassLibrary"); gSystem->Load("libgsl"); gSystem->Load("libgslcblas"); gSystem->Load("libVMC.so"); gSystem->Load("libStDb_Tables.so"); gSystem->Load("libgen_Tables.so"); gSystem->Load("libgeometry_Tables.so"); gSystem->Load("libsim_Tables.so"); gSystem->Load("libStarMagField.so"); gSystem->Load("libSt_db_Maker.so"); gSystem->Load("libSt_g2t.so"); gSystem->Load("libSt_geant_Maker.so"); gSystem->Load("StarGeneratorUtil.so"); gSystem->Load("StarGeneratorEvent.so"); gSystem->Load("StarGeneratorBase.so"); gSystem->Load("StFemtoDstMakerSph"); StChain *chain = 0; StFemtoDstQAMaker *maker = 0; // // List of member links in the chain // chain = new StChain("StChain"); maker = new StFemtoDstQAMaker("", flist, ".", 1e9); maker->SetOutFileName(ofile); chain->Init(); // // Loop over the links in the chain // int iret = 0; int nEvents = maker->GetNEvents(); std::cout << "Entries in chain = " << nEvents << std::endl; for(int iev = 0; iev < nEvents; iev++) { chain->Clear(); iret = chain->Make(iev); if(iret) { std::cout << "Error in Make occured. Error code: " << iret << std::endl; std::cout << "iev = " << iev << '\n'; break; } } chain->Finish(); //Cleanup delete maker; delete chain; }