FemtoDstQA_pau200_y2015.C 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #include <TFile.h>
  2. #include "TROOT.h"
  3. #include "TSystem.h"
  4. #include "TChain.h"
  5. #include "TTree.h"
  6. //_____________________
  7. void FemtoDstQA_pau200_y2015(const char *flist = "test.list",
  8. const char *ofile = "femtoQA_pau200_y2015.root") {
  9. std::cout << "Input file list = " << flist << '\n';
  10. if (!flist) {
  11. std::cout << "Input file list = NULL!\n";
  12. return;
  13. }
  14. //
  15. // Load libraries
  16. //
  17. gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
  18. loadSharedLibraries();
  19. gSystem->Load("libMinuit");
  20. gSystem->Load("StMuDSTMaker");
  21. gSystem->Load("StChain");
  22. gSystem->Load("StRefMultCorr");
  23. gSystem->Load("StFlowMaker");
  24. gSystem->Load("StFlowAnalysisMaker");
  25. gSystem->Load("StHbtMaker");
  26. gSystem->Load("StFemtoDstMaker");
  27. StChain *chain = 0;
  28. StFemtoDstQAMaker *maker = 0;
  29. //
  30. // List of member links in the chain
  31. //
  32. chain = new StChain("StChain");
  33. maker = new StFemtoDstQAMaker("", flist, ".", 12000);
  34. maker->SetOutFileName(ofile);
  35. maker->SetRunIdParameters(1292, 16124017, 16159024); // pAu200 - production_pAu200_2015
  36. chain->Init();
  37. //
  38. // Loop over the links in the chain
  39. //
  40. int iret = 0;
  41. int nEvents = maker->GetNEvents();
  42. std::cout << "Entries in chain = " << nEvents << std::endl;
  43. for(int iev = 0; iev < nEvents; iev++) {
  44. chain->Clear();
  45. iret = chain->Make(iev);
  46. if(iret) {
  47. std::cout << "Error in Make occured. Error code: " << iret << std::endl;
  48. std::cout << "iev = " << iev << '\n';
  49. break;
  50. }
  51. }
  52. chain->Finish();
  53. //Cleanup
  54. delete maker;
  55. delete chain;
  56. }