FairRoot/PandaRoot
runGEANE.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("libGen");
17  gSystem->Load("libGeaneExEmc");
18 
19  gSystem->Load("libStt");
20  gSystem->Load("libEmc");
21  gSystem->Load("libDrcProp");
22  gSystem->Load("libDrc");
23  gSystem->Load("libtpc");
24  gSystem->Load("libMvd");
25 
26  FairRunAna *fRun = new FairRunAna();
27 
28  fRun->SetInputFile("mc.root");
29  fRun->SetOutputFile("geane.root");
30 
31  //FairGeane *Geane = new FairGeane();
32  FairGeane *Geane = new FairGeane("mc.root");
33 
35  fRun->AddTask(tr);
36 
37  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
38  FairParRootFileIo* parInput1 = new FairParRootFileIo();
39  parInput1->open("params.root");
40  rtdb->setFirstInput(parInput1);
41  new FairTrajFilter();
42 
43  fRun->Init();
44 
45  rtdb->print();
46  // Set the field(if any) to Geane
47  Geane->SetField(fRun->GetField());
48 
49  // Transport nEvents
50  // -----------------
51  TStopwatch timer;
52  timer.Start();
53 
54  Int_t nEvents = 0;
55  fRun->Run(0,nEvents);
56  timer.Stop();
57 
58  Double_t rtime = timer.RealTime();
59  Double_t ctime = timer.CpuTime();
60  printf("RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
61 }
62 
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
basiclibs()
FairGeaneTrEmc * tr
Definition: runGEANE.C:34
FairRunAna * fRun
Definition: runGEANE.C:26
FairGeane * Geane
Definition: runGEANE.C:32
FairRuntimeDb * rtdb
Definition: runGEANE.C:37
Double_t ctime
Definition: runGEANE.C:59
Double_t
gDebug
Definition: sim_emc_apd.C:6
Double_t rtime
Definition: runGEANE.C:58
new FairTrajFilter()
FairParRootFileIo * parInput1
Definition: runGEANE.C:38
Int_t nEvents
Definition: runGEANE.C:54
TStopwatch timer
Definition: runGEANE.C:51