FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
macro
detectors
drc
hit.C
Go to the documentation of this file.
1
int
hit
(Int_t
nEvents
= 0,
TString
inFile
=
"sim.root"
,
TString
parFile
=
"par.root"
,
TString
inDigi =
"digi.root"
,
TString
outFile
=
"hit.root"
, Int_t timeBased=0){
2
Int_t
verbose
= 0;
3
4
// ----- Timer --------------------------------------------------------
5
TStopwatch
timer
;
6
timer.Start();
7
8
// ----- Reconstruction run -------------------------------------------
9
FairRunAna *
fRun
=
new
FairRunAna();
10
fRun->SetGenerateRunInfo(kFALSE);
11
fRun->SetInputFile(
inFile
);
12
fRun->AddFriend(inDigi);
13
fRun->SetOutputFile(
outFile
);
14
fRun->SetUseFairLinks(kTRUE);
15
if
(timeBased) fRun->RunWithTimeStamps();
16
17
// ----- Parameter database --------------------------------------------
18
FairRuntimeDb*
rtdb
= fRun->GetRuntimeDb();
19
FairParRootFileIo*
parInput
=
new
FairParRootFileIo();
20
21
if
(
parFile
==
"batch"
){
22
TList* parlist =
new
TList();
23
for
(Int_t
i
=0;
i
<4;
i
++) parlist->Add(
new
TObjString(Form(
"par_b%d.root"
,
i
)));
24
parInput->open(parlist);
25
}
else
{
26
parInput->open(
parFile
.Data());
27
}
28
rtdb->setFirstInput(parInput);
29
30
// ----- DRC hit producer --------------------------------------------
31
PndDrcHitFinder
*
hitfind
=
new
PndDrcHitFinder
(0);
32
fRun->AddTask(hitfind);
33
34
// ----- Initialize and run -------------------------------------------
35
fRun->Init();
36
fRun->Run(0,
nEvents
);
37
38
// ----- Finish -------------------------------------------------------
39
timer.Stop();
40
Double_t
rtime
= timer.RealTime();
41
Double_t
ctime
= timer.CpuTime();
42
cout << endl << endl;
43
cout <<
"Macro finished succesfully."
<< endl;
44
cout <<
"Output file is "
<<
outFile
<< endl;
45
cout <<
"Parameter file is "
<<
parFile
<< endl;
46
cout <<
"Real time "
<< rtime <<
" s, CPU time "
<< ctime <<
" s"
<< endl;
47
cout << endl;
48
return
0;
49
}
i
Int_t i
Definition:
run_full.C:25
outFile
TString outFile
Definition:
hit_dirc.C:17
verbose
#define verbose
Definition:
PndRadMapBoxMesh.cxx:15
inFile
TString inFile
Definition:
hit_dirc.C:8
fRun
FairRunAna * fRun
Definition:
hit_dirc.C:58
hitfind
PndDrcHitFinder * hitfind
Definition:
hit_dirc.C:97
Double_t
Double_t
Definition:
SimCompleteLinkDef.h:6
parFile
TString parFile
Definition:
hit_dirc.C:14
PndDrcHitFinder
Definition:
PndDrcHitFinder.h:28
nEvents
Int_t nEvents
Definition:
hit_dirc.C:11
timer
TStopwatch timer
Definition:
hit_dirc.C:51
rtdb
FairRuntimeDb * rtdb
Definition:
hit_dirc.C:66
TString
TString
Definition:
SimCompleteLinkDef.h:6
ctime
Double_t ctime
Definition:
hit_dirc.C:114
hit
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition:
hit.C:1
parInput
FairParAsciiFileIo * parInput
Definition:
apvClusterReco.C:36
rtime
Double_t rtime
Definition:
hit_dirc.C:113
Generated on Sun Aug 18 2019 03:01:13 for FairRoot/PandaRoot by
1.8.8