FairRoot/PandaRoot
runDIGI2.C
Go to the documentation of this file.
1 {
2 
3  // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
4  Int_t iVerbose = 1;
5 
6  // Input file (MC events)
7  TString inFile = "ex2.root";
8 
9  // Number of events to process
10  Int_t nEvents = 1000;
11 
12  // Parameter file
13  TString parFile = "ex2params.root";
14 
15  // Output file
16  TString outFile = "ex2d.root";
17 
18  // In general, the following parts need not be touched
19  // ========================================================================
20 
21  // ---- Load libraries -------------------------------------------------
22  gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
23  basiclibs();
24  gSystem->Load("libGeoBase");
25  gSystem->Load("libParBase");
26  gSystem->Load("libBase");
27  gSystem->Load("libPndData");
28  gSystem->Load("libField");
29  gSystem->Load("libPassive");
30  gSystem->Load("libStt");
31  gSystem->Load("libPlane");
32  // ------------------------------------------------------------------------
33 
34  // ----- Timer --------------------------------------------------------
35  TStopwatch timer;
36  timer.Start();
37  // ------------------------------------------------------------------------
38 
39  // ----- Reconstruction run -------------------------------------------
40  FairRunAna *fRun = new FairRunAna();
41  fRun->SetInputFile(inFile);
42  fRun->SetOutputFile(outFile);
43  fRun->LoadGeometry();
44  // ------------------------------------------------------------------------
45 
46  // ----- STT analysis tasks --------------------------------------------
47  // digitize ....
48 
50  // CbmSttHitProducerReal* sttHitProducer = new CbmSttHitProducerReal();
51  fRun->AddTask(sttHitProducer);
52  // ------------------------------------------------------------------------
53 
54  // ----- Initialize and run --------------------------------------------
55  fRun->Init();
56  fRun->Run(0, nEvents);
57  // ------------------------------------------------------------------------
58 
59  // ----- Finish -------------------------------------------------------
60  timer.Stop();
61  Double_t rtime = timer.RealTime();
62  Double_t ctime = timer.CpuTime();
63  cout << endl << endl;
64  cout << "Macro finished succesfully." << endl;
65  cout << "Output file is " << outFile << endl;
66  cout << "Parameter file is " << parFile << endl;
67  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
68  cout << endl;
69  // ------------------------------------------------------------------------
70 }
FairRunAna * fRun
Definition: runDIGI2.C:40
basiclibs()
Double_t ctime
Definition: runDIGI2.C:62
TString outFile
Definition: runDIGI2.C:16
Double_t
Int_t nEvents
Definition: runDIGI2.C:10
TStopwatch timer
Definition: runDIGI2.C:35
PndSttHitProducerIdeal * sttHitProducer
Definition: runDIGI2.C:49
Int_t iVerbose
Double_t rtime
Definition: runDIGI2.C:61
TString parFile
Definition: runDIGI2.C:13
TString inFile
Definition: runDIGI2.C:7