Go to the source code of this file.
int COSYBackgroundAnalysis |
( |
TString |
Filename, |
|
|
Int_t |
StartEvent = 0 , |
|
|
Int_t |
NoOfEvents = 0 |
|
) |
| |
Definition at line 1 of file COSYBackgroundAnalysis.C.
References Bool_t, ctime, Double_t, fRun, inFile, PndHypGeCOSYBackgroundAna::Init(), iVerbose, kParameterMerged, nEvents, outFile, parFile, parInput1, rootlogon(), rtdb, rtime, timer, and TString.
6 gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/rootlogon.C");
9 gSystem->Load(
"libHyp");
10 gSystem->Load(
"libHypGe");
11 gSystem->Load(
"libSpectrum");
17 if(Filename.EndsWith(
".root",1))
19 Filename.ReplaceAll(
".root",
"");
20 cout <<
"Filename ending chopped!" << endl;
22 TString Path = getenv(
"SIMDATADIR");
31 outFile +=
"/Ana/ToCombine/";
35 outFile.ReplaceAll(
".root",
"");
37 outFile += StartEvent;
38 outFile +=
"_nEvents_";
39 outFile += NoOfEvents;
46 FairRunAna *
fRun=
new FairRunAna();
47 fRun->SetInputFile(inFile.Data());
48 fRun->SetOutputFile(outFile.Data());
52 FairRuntimeDb*
rtdb = fRun->GetRuntimeDb();
53 FairParRootFileIo*
parInput1 =
new FairParRootFileIo();
54 parInput1->open(parFile.Data());
57 rtdb->setFirstInput(parInput1);
63 COSYAna->SetVerbose(iVerbose);
69 fRun->Run(StartEvent,nEvents);
78 cout <<
"Macro finished succesfully." << endl;
79 cout <<
"Output file is " << outFile << endl;
81 cout <<
"Parameter file is " << parFile << endl;
82 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
FairParRootFileIo * parInput1
virtual InitStatus Init()