FairRoot/PandaRoot
thailand2017/solution/tut_ana_task.C
Go to the documentation of this file.
1 
2 // **** some auxilliary functions in auxtut.C ****
3 // - FairRunAna* initrun(TString prefix, TString outfile, int min=-1, int max=-1) --> Init FairRunAna
4 // - plotmyhistos() --> Plots all histograms in current TDirectory on a autosized canvas
5 // - writemyhistos() --> Writes all histos in current TFile
6 // - fillM(RhoCandList l, TH1* h) --> Fill mass histogram h with masses of candidates in l
7 // - RemoveGeoManager() --> Temporary fix for error on macro exit
8 // **** some auxilliary functions in auxtut.C ****
9 #include "auxtut.C"
10 
11 void tut_ana_task(int nevts = 0, TString prefix = "signal")
12 {
13  // *** Initialize FairRunAna with defaults
14  TString OutFile="out_dummy.root";
15  FairRunAna* fRun = initrun(prefix, OutFile);
16 
17  // *** HERE OUR TASK GOES!
18  PndTutThaiTask *anaTask = new PndTutThaiTask();
19  fRun->AddTask(anaTask);
20 
21  // *** and run analysis
22  fRun->Init();
23  fRun->Run(0,nevts);
24 
25  // *** temporaty fix to avoid error on macro exit
27 }
FairRunAna * initrun(TString prefix, TString outfile, int min=-1, int max=-1)
Definition: QA/auxi.C:32
void RemoveGeoManager()
Definition: auxtut.C:11
void tut_ana_task(int nevts=0, TString prefix="signal")
FairRunAna * fRun
Definition: hit_dirc.C:58