#include #include "TROOT.h" #include "TSystem.h" #include "TChain.h" #include "TTree.h" //_____________________ void FemtoDstQA_pp200_y2012(const char *flist = "test.list", const char *ofile = "femtoQA_pp200_y2012.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("StFemtoDstMaker"); 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); maker->SetRunIdParameters(33886, 13038134, 13072020); // pp200 - production_pp200_2012 maker->AddTrigId(370011); // vpdmb -nobsmd maker->AddTrigId(370001); // vpdmb maker->AddTrigId(370022); // bbcmb maker->AddTrigId(370501); // bht0 -vpdmb maker->AddTrigId(370511); // bht1 -vpdmb maker->AddTrigId(370531); // bht2 maker->AddTrigId(370542); // bht0 -bbcmb -tof0 maker->AddTrigId(370546); // bht1 -bbcmb -tof0 maker->AddTrigId(370522); // bht2 -bbcmb maker->AddTrigId(370601); // jp0 maker->AddTrigId(370611); // jp1 maker->AddTrigId(370621); // jp2 maker->AddTrigId(370641); // ajp maker->AddTrigId(370301); // bbcmb -tof0 maker->AddTrigId(370361); // tofmult3 -vpd maker->AddTrigId(370341); // tofmult4 maker->SetTrigger(370011, 1); // VPDMB triggers maker->SetTrigger(370001, 1); 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; }