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 
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
basiclibs()
FairGeane * Geane
FairRunAna * fRun
Definition: hit_dirc.C:58
Double_t
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
gDebug
Definition: sim_emc_apd.C:6
FairParRootFileIo * parInput1
Definition: hit_dirc.C:67
Double_t ctime
Definition: hit_dirc.C:114
Double_t rtime
Definition: hit_dirc.C:113