1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #include "TROOT.h"
- #include "TSystem.h"
- #include "TChain.h"
- #include "TFile.h"
- #include "TString.h"
- #include <iostream>
- const Char_t* defaultInFile = "test.list";
- const Char_t *defaultOutFile = "test"; // extension will be assigned automatically
- using namespace std;
- class StO97DstMaker;
- StO97DstMaker *O97Maker = NULL;
- void convertF19(const Char_t* inFileList = defaultInFile,
- const Char_t* outFileName = defaultOutFile)
- {
- //Load libraries
- cout << "Loading libraries..." << endl;
- gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
- loadSharedLibraries();
- gSystem->Load("libMinuit");
- gSystem->Load("StRefMultCorr");
- gSystem->Load("StFlowMaker"); // should be placed before HBT
- gSystem->Load("StHbtMaker");
- gSystem->Load("StarClassLibrary");
- gSystem->Load("libgsl");
- gSystem->Load("libgslcblas");
- 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("StFemtoDstMaker");
- cout << "Libraries have been successfully loaded" << endl;
- //
- // Create chain
- //
- StChain *mChain = new StChain("StChain");
- O97Maker = new StO97DstMaker(inFileList, outFileName);
- //
- // Chain initialization and loop over events
- //
- mChain->Init();
- Int_t iReturn = 0;
- Int_t mNEventsProcessed = 0;
- while (1)
- {
- mChain->Clear();
- iReturn = mChain->Make();
- if (O97Maker->IsStop()) break;
- }
- mChain->Finish();
- delete mChain;
- }
|