FairRoot/PandaRoot
detectors/fts/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 = "points.root";
8 
9  // Number of events to process
10  Int_t nEvents = 0;
11 
12  // Parameter file
13  TString parFile = "params.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  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
37  FairParRootFileIo* parInput1 = new FairParRootFileIo();
38  parInput1->open(parFile.Data());
39  rtdb->setFirstInput(parInput1);
40 
41 
42  //fRun->LoadGeometry();
43  // ------------------------------------------------------------------------
44 
45  // ----- STT analysis tasks --------------------------------------------
46  // digitize ....
47 
49  //PndFtsHitProducerIdeal* ftsHitProducer = new PndFtsHitProducerIdeal();
50  //PndFtsHitProducerRealFull* ftsHitProducer = new PndFtsHitProducerRealFull();
51  fRun->AddTask(ftsHitProducer);
52  // ------------------------------------------------------------------------
53 
54 
55  // ----- Initialize and run --------------------------------------------
56  std::cout<<"AAAAAAAAAAAAAA "<<std::endl;
57  fRun->Init();
58  std::cout<<"AAAAAAAAAAAAAA "<<std::endl;
59  nEvents=1;
60  fRun->Run(0, nEvents);
61  // ------------------------------------------------------------------------
62 
63  // ----- Finish -------------------------------------------------------
64  timer.Stop();
65  Double_t rtime = timer.RealTime();
66  Double_t ctime = timer.CpuTime();
67  cout << endl << endl;
68  cout << "Macro finished succesfully." << endl;
69  cout << "Output file is " << outFile << endl;
70  cout << "Parameter file is " << parFile << endl;
71  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
72  cout << endl;
73  // ------------------------------------------------------------------------
74 }
Double_t ctime
Int_t nEvents
FairRuntimeDb * rtdb
TString parFile
Double_t
TStopwatch timer
FairParRootFileIo * parInput1
Double_t rtime
TString inFile
Int_t iVerbose
PndFtsHitProducerRealFast * ftsHitProducer
TString outFile
FairRunAna * fRun