FairRoot/PandaRoot
detectors/stt/rundigi.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 = "testrun.root";
8 
9  // Number of events to process
10  Int_t nEvents = 0;
11 
12  // Parameter file
13  TString parFile = "testparams.root";
14 
15  // Output file
16  TString outFile = "testdigi.root";
17 
18  // In general, the following parts need not be touched
19  // ========================================================================
20 
21 // // ---- Load libraries -------------------------------------------------
22 // gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
23 // rootlogon();
24 // // ------------------------------------------------------------------------
25 
26  // ----- Timer --------------------------------------------------------
27  TStopwatch timer;
28  timer.Start();
29  // ------------------------------------------------------------------------
30 
31  // ----- Reconstruction run -------------------------------------------
32  FairRunAna *fRun = new FairRunAna();
33  fRun->SetInputFile(inFile);
34  fRun->SetOutputFile(outFile);
35 
36  // ------------------------------------------------------------------------
37 
38  // ----- STT analysis tasks --------------------------------------------
39  // digitize ....
40 
41  //PndSttHitProducerIdeal* sttHitProducer = new PndSttHitProducerIdeal();
43  fRun->AddTask(sttHitProducer);
44  // ------------------------------------------------------------------------
45 
46 
47  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
48  FairParRootFileIo* parInput1 = new FairParRootFileIo();
49  parInput1->open(parFile.Data());
50  rtdb->setFirstInput(parInput1);
51  // PndGeoSttPar *sttPar = (PndGeoSttPar*) rtdb->getContainer("PndGeoSttPar");
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 }
TString outFile
Definition: hit_dirc.C:17
PndSttHitProducerRealFast * sttHitProducer
FairRunAna * fRun
Definition: hit_dirc.C:58
TString inFile
Definition: hit_dirc.C:8
Double_t
TString parFile
Definition: hit_dirc.C:14
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
FairParRootFileIo * parInput1
Definition: hit_dirc.C:67
Double_t ctime
Definition: hit_dirc.C:114
Int_t iVerbose
Double_t rtime
Definition: hit_dirc.C:113