FairRoot/PandaRoot
runGEANE1.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("ex1.root");
24  fRun->SetOutputFile("ex1g.root");
25 
26  //FairGeane *Geane = new FairGeane();
27  FairGeane *Geane = new FairGeane("ex1.root");
28 
30  fRun->AddTask(tr);
31 
32  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
33  FairParRootFileIo* parInput1 = new FairParRootFileIo();
34  parInput1->open("ex1params.root");
35  rtdb->setFirstInput(parInput1);
36 
37  fRun->Init();
38 
39  rtdb->print();
40  // Set the field(if any) to Geane
41  Geane->SetField(fRun->GetField());
42 
43  // Transport nEvents
44  // -----------------
45  TStopwatch timer;
46  timer.Start();
47 
48  Int_t nEvents = 10000;
49  fRun->Run(0,nEvents);
50  timer.Stop();
51 
52  Double_t rtime = timer.RealTime();
53  Double_t ctime = timer.CpuTime();
54  printf("RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
55 }
56 
FairRuntimeDb * rtdb
Definition: runGEANE1.C:32
FairGeane * Geane
Definition: runGEANE1.C:27
FairGeaneTr * tr
Definition: runGEANE1.C:29
Double_t
gDebug
Definition: sim_emc_apd.C:6
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
FairParRootFileIo * parInput1
Definition: runGEANE1.C:33
Double_t ctime
Definition: runGEANE1.C:53
FairRunAna * fRun
Definition: runGEANE1.C:21
TStopwatch timer
Definition: runGEANE1.C:45
Double_t rtime
Definition: runGEANE1.C:52
basiclibs()
Int_t nEvents
Definition: runGEANE1.C:48