FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
tutorials
geane
ex2
macro
runGEANE2.C
Go to the documentation of this file.
1
{
2
gDebug
=0;
3
// Load basic libraries
4
gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/basiclibs.C"
);
5
basiclibs
();
6
7
// Load this example libraries
8
gSystem->Load(
"libGeoBase"
);
9
gSystem->Load(
"libParBase"
);
10
gSystem->Load(
"libBase"
);
11
gSystem->Load(
"libField"
);
12
gSystem->Load(
"libPndData"
);
13
gSystem->Load(
"libPassive"
);
14
gSystem->Load(
"libTrkBase"
);
15
gSystem->Load(
"libGeane"
);
16
gSystem->Load(
"libStt"
);
17
gSystem->Load(
"libPlane"
);
18
gSystem->Load(
"libGen"
);
19
gSystem->Load(
"libGeaneEx"
);
20
21
FairRunAna *
fRun
=
new
FairRunAna();
22
23
fRun->SetInputFile(
"ex2.root"
);
24
fRun->AddFriend(
"ex2d.root"
);
25
fRun->AddFriend(
"ex2r.root"
);
26
fRun->SetOutputFile(
"ex2g.root"
);
27
28
//FairGeane *Geane = new FairGeane();
29
FairGeane *
Geane
=
new
FairGeane(
"ex2.root"
);
30
31
// FairGeaneTr *tr= new FairGeaneTr();
32
// FairGeaneTrC *tr= new FairGeaneTrC();
33
FairGeaneTrT
*
tr
=
new
FairGeaneTrT
();
34
// FairGeaneTrP *tr= new FairGeaneTrP();
35
// FairGeaneTrK *tr= new FairGeaneTrK();
36
fRun->AddTask(tr);
37
38
// FairGeaneTrP *trP= new FairGeaneTrP();
39
// fRun->AddTask(trP);
40
// ----- Parameter database --------------------------------------------
41
42
FairRuntimeDb*
rtdb
= fRun->GetRuntimeDb();
43
FairParRootFileIo*
parInput1
=
new
FairParRootFileIo();
44
parInput1->open(
"ex2params.root"
);
45
rtdb->setFirstInput(parInput1);
46
47
// ------------------------------------------------------------------------
48
49
fRun->Init();
50
51
rtdb->print();
52
// Set the field(if any) to Geane
53
Geane->SetField(fRun->GetField());
54
55
// Transport nEvents
56
// -----------------
57
TStopwatch
timer
;
58
timer.Start();
59
60
61
Int_t
nEvents
= 1000;
62
fRun->Run(0,nEvents);
63
// fRun->Run();
64
timer.Stop();
65
66
Double_t
rtime
= timer.RealTime();
67
Double_t
ctime
= timer.CpuTime();
68
printf
(
"RealTime=%f seconds, CpuTime=%f seconds\n"
,rtime,ctime);
69
}
70
tr
FairGeaneTrT * tr
Definition:
runGEANE2.C:33
nEvents
Int_t nEvents
Definition:
runGEANE2.C:61
printf
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
ctime
Double_t ctime
Definition:
runGEANE2.C:67
fRun
FairRunAna * fRun
Definition:
runGEANE2.C:21
rtdb
FairRuntimeDb * rtdb
Definition:
runGEANE2.C:42
timer
TStopwatch timer
Definition:
runGEANE2.C:57
Double_t
Double_t
Definition:
SimCompleteLinkDef.h:6
Geane
FairGeane * Geane
Definition:
runGEANE2.C:29
gDebug
gDebug
Definition:
sim_emc_apd.C:6
rtime
Double_t rtime
Definition:
runGEANE2.C:66
parInput1
FairParRootFileIo * parInput1
Definition:
runGEANE2.C:43
FairGeaneTrT
Definition:
CbmGeaneTrT.h:21
basiclibs
basiclibs()
Generated on Sun Aug 18 2019 03:02:01 for FairRoot/PandaRoot by
1.8.8