Go to the source code of this file.
Int_t gem_hits |
( |
Int_t |
nStations, |
|
|
Double_t |
momentum = 15. , |
|
|
Int_t |
nEvents = 1000 , |
|
|
int |
verboseLevel = 0 |
|
) |
| |
Definition at line 4 of file gem_hits.C.
References allDigiFile, ctime, Double_t, fRun, gemFindHits, MCFile, nEvents, outFile, parFile, parInput1, parIo1, rtdb, rtime, sysFile, timer, TString, and verboseLevel.
6 if ( nStations != 3 && nStations != 4 ) {
7 cout <<
"WRONG number of stations, only 3 or 4 allowed." << endl;
15 baseName.Form(
"Gem_%dStations_%gGeV_n%d",nStations,momentum,
nEvents);
19 TString digFile = baseName +
"_digi.root";
22 std::cout <<
"Output File: " << outFile.Data()<< std::endl;
30 FairRunAna *
fRun=
new FairRunAna();
31 fRun->SetInputFile(digFile);
32 fRun->AddFriend(MCFile);
33 fRun->SetOutputFile(outFile);
34 fRun->SetUseFairLinks(kTRUE);
39 if ( nStations == 4 ) allDigiFile = sysFile+
"/macro/params/gem_4Stations.digi.par";
41 FairRuntimeDb*
rtdb = fRun->GetRuntimeDb();
42 FairParRootFileIo*
parInput1 =
new FairParRootFileIo();
43 parInput1->open(parFile.Data());
45 FairParAsciiFileIo*
parIo1 =
new FairParAsciiFileIo();
46 parIo1->open(allDigiFile.Data(),
"in");
48 rtdb->setFirstInput(parInput1);
49 rtdb->setSecondInput(parIo1);
54 fRun->AddTask(gemFindHits);
67 cout <<
"Macro finished succesfully." << endl;
68 cout <<
"Output file is " << outFile << endl;
69 cout <<
"Parameter file is " << parFile << endl;
70 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
PndGemFindHits * gemFindHits
FairParRootFileIo * parInput1
FairParAsciiFileIo * parIo1