6 if ( nStations != 3 && nStations != 4 ) {
7 cout <<
"WRONG number of stations (" << nStations <<
"), only 3 or 4 allowed." << endl;
15 baseName.Form(
"Gem_MvdStt_%dStations_DPM_n%d_orig",nStations,
nEvents);
17 baseName.Form(
"Gem_MvdStt_%dStations_DPM_n%d",nStations,
nEvents);
21 TString trackFile = baseName + Form(
"_CluHiTrack_a%d_c%dx%d.root",anaEv,nofC,cWid);
22 TString rEventFile = baseName + Form(
"_RecoEvents_a%d_c%dx%d.root",anaEv,nofC,cWid);
24 std::cout <<
"Output File: " << rEventFile.Data()<< std::endl;
32 FairRunAna *
fRun=
new FairRunAna();
33 fRun->SetInputFile(trackFile);
34 fRun->SetOutputFile(rEventFile);
38 if ( nStations == 4 ) allDigiFile = sysFile+
"/macro/params/gem_4Stations.digi.par";
40 FairRuntimeDb*
rtdb = fRun->GetRuntimeDb();
41 FairParRootFileIo*
parInput1 =
new FairParRootFileIo();
42 parInput1->open(parFile.Data());
44 FairParAsciiFileIo*
parIo1 =
new FairParAsciiFileIo();
45 parIo1->open(allDigiFile.Data(),
"in");
47 rtdb->setFirstInput(parInput1);
48 rtdb->setSecondInput(parIo1);
53 fRun->AddTask(eventBuilder);
56 eventBuilder->AddEventBuilder(eBOnMCEvents);
58 eventBuilder->AddEventBuilder(gemEBOnTracks);
71 cout <<
"Macro finished succesfully." << endl;
72 cout <<
"Output file is " << rEventFile << endl;
73 cout <<
"Parameter file is " << parFile << endl;
74 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
Int_t TB_gem_eventBuild(Int_t nEvents=1000, Int_t anaEv=1000, Int_t nofC=1000, Int_t cWid=10, Int_t nStations=3, int verboseLevel=0)
FairParRootFileIo * parInput1
FairParAsciiFileIo * parIo1
virtual InitStatus Init()