Go to the source code of this file.
int emc_timebasedDigi |
( |
const char * |
inFile = "emc_sim.root" , |
|
|
const char * |
outFile = "emc_timebasedDigi.root" , |
|
|
Int_t |
nEvents = 0 , |
|
|
Double_t |
dt = 50 , |
|
|
const char * |
parFile = "simparams.root" |
|
) |
| |
Definition at line 1 of file emc_timebasedDigi.C.
References Bool_t, ctime, digiFile, Double_t, fRun, inFile, iVerbose, nEvents, outFile, parFile, parInput1, parIo1, rtdb, rtime, PndEmcFWEndcapTimebasedWaveforms::RunTimebased(), PndEmcFWEndcapTimebasedWaveforms::SetStorageOfData(), PndEmcFWEndcapTimebasedWaveforms::StoreDataClass(), timer, and TString.
11 std::cout <<
"will process " <<
nEvents <<
" events" << std::endl;
25 FairRunAna *
fRun=
new FairRunAna();
26 fRun->SetInputFile(
inFile);
28 fRun->SetUseFairLinks(kTRUE);
31 FairRuntimeDb*
rtdb = fRun->GetRuntimeDb();
33 FairParAsciiFileIo*
parIo1 =
new FairParAsciiFileIo();
34 parIo1->open(digiFile.Data(),
"in");
35 rtdb->setFirstInput(parIo1);
37 FairParRootFileIo*
parInput1 =
new FairParRootFileIo();
39 rtdb->setSecondInput(parInput1);
44 Bool_t storeWfDataClass = kTRUE;
51 Bool_t storeUnsortedDigis = kTRUE;
60 sorterTask->SetVerbose(iVerbose);
64 cout <<
"TIMEBASED DIGITAZATION" << endl;
65 FairRootManager::Instance()->SetEventMeanTime(dt);
67 fRun->AddTask(wfTask);
68 fRun->AddTask(digiTask);
69 fRun->AddTask(sorterTask);
71 cout <<
"IDEAL DIGITAZATION (eventbased)" << endl;
72 fRun->AddTask(idealDigiTask);
74 cout <<
"EVENTBASED SIMULATION" << endl;
75 fRun->AddTask(wfTask);
76 fRun->AddTask(digiTask);
83 cout <<
"fRun->Init()" << endl;
96 cout <<
"Macro finished successfully." << endl;
97 cout <<
"Output file is " <<
outFile << endl;
98 cout <<
"Parameter file is " <<
parFile << endl;
99 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
Task to create digis from waveforms.
FairParRootFileIo * parInput1
FairParAsciiFileIo * parIo1
Task to create PndEmcDigi from PndEmcHit.