FairRoot/PandaRoot
Functions
QA/lmd/QA_LMD.C File Reference
#include "../auxi.C"

Go to the source code of this file.

Functions

int QA_LMD (const int nEvents=1000, const int startEvent=0, TString storePath="", const int verboseLevel=0)
 

Function Documentation

int QA_LMD ( const int  nEvents = 1000,
const int  startEvent = 0,
TString  storePath = "",
const int  verboseLevel = 0 
)

Definition at line 5 of file QA/lmd/QA_LMD.C.

References CloseGeoManager(), ctime, DigiFile, Double_t, fRun, PndLmdQATask::Init(), MCFile, nEvents, parFile, parInput1, rtdb, rtime, startEvent, storePath, timer, TString, and verboseLevel.

6 {
7  // ========================================================================
8  // Input file (MC events)
9  TString MCFile = storePath+"Lumi_MC_";
10  MCFile += startEvent;
11  MCFile += ".root";
12  TString DigiFile = storePath+"Lumi_digi_";
13  DigiFile += startEvent;
14  DigiFile += ".root";
15 
16  // Reco file
17  TString GeaFile = storePath+"Lumi_Geane_";
18  GeaFile += startEvent;
19  GeaFile += ".root";
20 
21 
22  // Dummy file
23  TString DumFile = storePath+"Lumi_IGNORE_";
24  DumFile += startEvent;
25  DumFile += ".root";
26  // Output file
27  TString OutFile = storePath+"Lumi_QA_";
28  OutFile += startEvent;
29  OutFile += ".root";
30  // Par file
31  TString parFile = storePath+"Lumi_Params_";
32  parFile += startEvent;
33  parFile += ".root";
34 
35 
36  std::cout << "MCFile : " << MCFile.Data()<< std::endl;
37  std::cout << "DigiFile: " << DigiFile.Data()<< std::endl;
38  std::cout << "RecoFile: " << GeaFile.Data()<< std::endl;
39 
40 
41  // ----- Timer --------------------------------------------------------
42  TStopwatch timer;
43  timer.Start();
44  // ------------------------------------------------------------------------
45 
46  FairRunAna *fRun= new FairRunAna();
47  fRun->SetInputFile(GeaFile);
48  fRun->AddFriend(DigiFile);
49  fRun->AddFriend(MCFile);
50  fRun->SetOutputFile(DumFile);
51 
52  // ----- Parameter database --------------------------------------------
53  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
54  FairParRootFileIo* parInput1 = new FairParRootFileIo(kTRUE);
55  parInput1->open(parFile.Data(),"UPDATE");
56  rtdb->setFirstInput(parInput1);
57 
58  PndLmdQATask* lmdqa = new PndLmdQATask("LMDPoint","MCTrack","LMDPixelClusterCand","LMDPixelDigis","LMDHitsMerged","LMDTrackCand","LMDPndTrackFilt","GeaneTrackFinal",OutFile);
59  lmdqa->SetVerbose(verboseLevel);
60  fRun->AddTask(lmdqa);
61  fRun->SetGenerateRunInfo(kFALSE);
62 
63  fRun->Init();
64  fRun->Run(0,nEvents);
65 
66  // ----- Finish -------------------------------------------------------
67  timer.Stop();
68  Double_t rtime = timer.RealTime();
69  Double_t ctime = timer.CpuTime();
70  cout << endl << endl;
71  cout << "Macro finished succesfully." << endl;
72  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
73  cout << endl;
74  // ------------------------------------------------------------------------
75  cout << " Test passed" << endl;
76  cout << " All ok " << endl;
78  return 0;
79 
80 }
int verboseLevel
Definition: Lars/runMvdSim.C:7
Int_t startEvent
TString storePath
void CloseGeoManager()
Definition: QA/auxi.C:11
FairRunAna * fRun
Definition: hit_dirc.C:58
TString DigiFile
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
virtual InitStatus Init()
TString MCFile
Double_t rtime
Definition: hit_dirc.C:113