Go to the source code of this file.
Int_t gem_digi |
( |
Int_t |
nStations, |
|
|
Double_t |
momentum = 15. , |
|
|
Int_t |
nEvents = 1000 , |
|
|
int |
verboseLevel = 0 |
|
) |
| |
Definition at line 4 of file gem_digi.C.
References allDigiFile, ctime, Double_t, fRun, gemDigitize, 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);
21 std::cout <<
"Output File: " << outFile.Data()<< std::endl;
29 FairRunAna *
fRun=
new FairRunAna();
30 fRun->SetInputFile(MCFile);
31 fRun->SetOutputFile(outFile);
32 fRun->SetUseFairLinks(kTRUE);
37 if ( nStations == 4 ) allDigiFile = sysFile+
"/macro/params/gem_4Stations.digi.par";
39 FairRuntimeDb*
rtdb = fRun->GetRuntimeDb();
40 FairParRootFileIo*
parInput1 =
new FairParRootFileIo();
41 parInput1->open(parFile.Data());
43 FairParAsciiFileIo*
parIo1 =
new FairParAsciiFileIo();
44 parIo1->open(allDigiFile.Data(),
"in");
46 rtdb->setFirstInput(parInput1);
47 rtdb->setSecondInput(parIo1);
52 fRun->AddTask(gemDigitize);
65 cout <<
"Macro finished succesfully." << endl;
66 cout <<
"Output file is " << outFile << endl;
67 cout <<
"Parameter file is " << parFile << endl;
68 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
FairParRootFileIo * parInput1
PndGemDigitize * gemDigitize
FairParAsciiFileIo * parIo1