FairRoot/PandaRoot
runKalStt.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();
37  fRun->AddTask(tr);
38 
39  // FairGeaneTrP *trP= new FairGeaneTrP();
40  // fRun->AddTask(trP);
41  // ----- Parameter database --------------------------------------------
42 
43  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
44  FairParRootFileIo* parInput1 = new FairParRootFileIo();
45  parInput1->open("ex2params.root");
46  rtdb->setFirstInput(parInput1);
47 
48  // ------------------------------------------------------------------------
49 
50  fRun->Init();
51 
52  rtdb->print();
53  // Set the field(if any) to Geane
54  Geane->SetField(fRun->GetField());
55 
56  // Transport nEvents
57  // -----------------
58  TStopwatch timer;
59  timer.Start();
60 
61 
62  Int_t nEvents = 1000;
63  fRun->Run(0,nEvents);
64  // fRun->Run();
65  timer.Stop();
66 
67  Double_t rtime = timer.RealTime();
68  Double_t ctime = timer.CpuTime();
69  printf("RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
70 }
71 
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