FairRoot/PandaRoot
Functions
detectors/mvd/TestBeam/PrintLinks_complete.C File Reference

Go to the source code of this file.

Functions

int PrintLinks_complete (Int_t nEvents=0)
 

Function Documentation

int PrintLinks_complete ( Int_t  nEvents = 0)

Definition at line 1 of file detectors/mvd/TestBeam/PrintLinks_complete.C.

References ctime, digiFile, Double_t, emcDigiFile, fRun, Geane, iVerbose, MCFile, nEvents, parFile, parInput1, parIo1, rtdb, rtime, sysFile, timer, and TString.

2 {
3  // Macro created 20/09/2006 by S.Spataro
4  // It loads a digi file and performs tracking
5 
6  // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
7  Int_t iVerbose = 0; // just forget about it, for the moment
8 
9  // Number of events to process
10 // Int_t nEvents = 0; // if 0 all the vents will be processed
11 
12  TString MCFile = "sim_complete.root";
13  TString digiInputFile = "2014-10-27-00-06-02_50_MHz_Hits.root";
14  TString recoInput = "2014-10-27-00-06-02_50_MHz_Hits_Filtered.root";
15  TString pidInput = "pid_complete.root";
16 
17 
18  TString sysFile = gSystem->Getenv("VMCWORKDIR");
19  TString parFile = "simparams.root"; // at the moment you do not need it
20 
21  // Digitisation file (ascii)
22  TString digiFile = "all.par";
23 
24  // ----- Timer --------------------------------------------------------
25  TStopwatch timer;
26  // ------------------------------------------------------------------------
27 
28  // ----- Reconstruction run -------------------------------------------
29  FairRunAna *fRun= new FairRunAna();
30  fRun->SetInputFile(digiInputFile);
31  fRun->AddFriend(MCFile);
32  fRun->AddFriend(recoInput);
33 // fRun->AddFriend(pidInput);
34 // fRun->AddFriend("reco_complete_test.root");
35 // fRun->AddFriend(MCFile);
36  fRun->SetOutputFile("TST.root");
37  fRun->SetGenerateRunInfo(kTRUE);
38  fRun->SetUseFairLinks(kTRUE);
39  //fRun->RunWithTimeStamps();
40  FairGeane *Geane = new FairGeane();
41 // fRun->AddTask(Geane);
42 
43  // ----- Parameter database --------------------------------------------
44  TString emcDigiFile = gSystem->Getenv("VMCWORKDIR");
45  emcDigiFile += "/macro/params/";
46  emcDigiFile += digiFile;
47 
48  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
49  FairParRootFileIo* parInput1 = new FairParRootFileIo();
50  parInput1->open(parFile.Data());
51 
52  FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo();
53  parIo1->open(emcDigiFile.Data(),"in");
54 
55 // rtdb->setFirstInput(parInput1);
56 // rtdb->setSecondInput(parIo1);
57 
58  // ------------------------------------------------------------------------
59 
60  PndPrintFairLinks* printlinksTask = new PndPrintFairLinks();
61  fRun->AddTask(printlinksTask);
62 
63 // PndMCMatchPrintTask* printTask = new PndMCMatchPrintTask();
64  // fRun->AddTask(printTask);
65 
66 // PndMCMatchAnaGapTask* anaTask = new PndMCMatchAnaGapTask();
67  // fRun->AddTask(anaTask);
68 
69 
70  // ----- Intialise and run --------------------------------------------
71  // PndEmcMapper::Init(1);
72  cout << "fRun->Init()" << endl;
73 
74  fRun->Init();
75 
76  timer.Start();
77  fRun->Run(0,nEvents);
78 // fRun->Run(278140,10);
79  // ------------------------------------------------------------------------
80 
81 
82  // ----- Finish -------------------------------------------------------
83  timer.Stop();
84  Double_t rtime = timer.RealTime();
85  Double_t ctime = timer.CpuTime();
86  cout << endl << endl;
87  cout << "Macro finished successfully." << endl;
88  // cout << "Output file is " << outFile << endl;
89 // cout << "Parameter file is " << parFile << endl;
90  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
91  cout << endl;
92  // ------------------------------------------------------------------------
93  cout << " Test passed" << endl;
94  cout << " All ok " << endl;
95  // exit(0);
96  return 0;
97 }
TString digiFile
Definition: bump_emc.C:20
TString emcDigiFile
Definition: bump_emc.C:45
FairGeane * Geane
FairRunAna * fRun
Definition: hit_dirc.C:58
TString sysFile
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
FairParAsciiFileIo * parIo1
Definition: bump_emc.C:53
Int_t iVerbose
TString MCFile
Double_t rtime
Definition: hit_dirc.C:113