convertF19.C 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #include "TROOT.h"
  2. #include "TSystem.h"
  3. #include "TChain.h"
  4. #include "TFile.h"
  5. #include "TString.h"
  6. #include <iostream>
  7. const Char_t* defaultInFile = "test.list";
  8. const Char_t *defaultOutFile = "test"; // extension will be assigned automatically
  9. using namespace std;
  10. class StO97DstMaker;
  11. StO97DstMaker *O97Maker = NULL;
  12. void convertF19(const Char_t* inFileList = defaultInFile,
  13. const Char_t* outFileName = defaultOutFile)
  14. {
  15. //Load libraries
  16. cout << "Loading libraries..." << endl;
  17. gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
  18. loadSharedLibraries();
  19. gSystem->Load("libMinuit");
  20. gSystem->Load("StRefMultCorr");
  21. gSystem->Load("StFlowMaker"); // should be placed before HBT
  22. gSystem->Load("StHbtMaker");
  23. gSystem->Load("StarClassLibrary");
  24. gSystem->Load("libgsl");
  25. gSystem->Load("libgslcblas");
  26. gSystem->Load("StPicoDstMakerRun12");
  27. gSystem->Load("StarClassLibrary");
  28. gSystem->Load("libgsl");
  29. gSystem->Load("libgslcblas");
  30. gSystem->Load("libVMC.so");
  31. gSystem->Load("libStDb_Tables.so");
  32. gSystem->Load("libgen_Tables.so");
  33. gSystem->Load("libgeometry_Tables.so");
  34. gSystem->Load("libsim_Tables.so");
  35. gSystem->Load("libStarMagField.so");
  36. gSystem->Load("libSt_db_Maker.so");
  37. gSystem->Load("libSt_g2t.so");
  38. gSystem->Load("libSt_geant_Maker.so");
  39. gSystem->Load("StarGeneratorUtil.so");
  40. gSystem->Load("StarGeneratorEvent.so");
  41. gSystem->Load("StarGeneratorBase.so");
  42. gSystem->Load("StFemtoDstMaker");
  43. cout << "Libraries have been successfully loaded" << endl;
  44. //
  45. // Create chain
  46. //
  47. StChain *mChain = new StChain("StChain");
  48. O97Maker = new StO97DstMaker(inFileList, outFileName);
  49. //
  50. // Chain initialization and loop over events
  51. //
  52. mChain->Init();
  53. Int_t iReturn = 0;
  54. Int_t mNEventsProcessed = 0;
  55. while (1)
  56. {
  57. mChain->Clear();
  58. iReturn = mChain->Make();
  59. if (O97Maker->IsStop()) break;
  60. }
  61. mChain->Finish();
  62. delete mChain;
  63. }