FairRoot/PandaRoot
datawriter.C
Go to the documentation of this file.
1 // root macro to analyze the clusterization output
2 {
3  bool verbose = false;
4 
5  // ----- Load libraries ------------------------------------------------
6  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
7  gROOT->LoadMacro("$VMCWORKDIR/macro/mvd/Tools.C");
9 
10  // ----- Timer --------------------------------------------------------
11  TStopwatch timer;
12  timer.Start();
13  // ------------------------------------------------------------------------
14  std::string HitFileName="testhits.hit";
15  std::string CalibFileName="calib.cal";
16 
17  PndMvdConvertApv* ApvConverter= new PndMvdConvertApv(CalibFileName, HitFileName);
18 
19  int nEvents = ApvConverter->GetNofEvents();
20  if (nEvents > 1000) nEvents = 1000;
21  //nEvents = 3;
22 
23  FairRunAna *fRun= new FairRunAna();
24 
25  fRun->SetOutputFile("output.root");
26 
28  fRun->AddTask(ApvTask);
29  fRun->Init();
30  fRun->DummyRun(0, nEvents);
31 
32  // ----- Finish -------------------------------------------------------
33  timer.Stop();
34  Double_t rtime = timer.RealTime();
35  Double_t ctime = timer.CpuTime();
36  cout << endl << endl;
37  cout << "Macro finished succesfully." << endl;
38  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
39  cout << endl;
40  // ------------------------------------------------------------------------
41 
42 }
#define verbose
Convert meassured data into PndSdsDigiStrip.
Convert Task of data.
FairRunAna * fRun
Definition: hit_dirc.C:58
TString HitFileName
Double_t
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
PndMvdConvertApv * ApvConverter
Double_t ctime
Definition: hit_dirc.C:114
PndMvdConvertApvTask * ApvTask
Definition: conMvdDigi.C:34
Double_t rtime
Definition: hit_dirc.C:113
LoadPandaStyle()
TString CalibFileName