13 #include "FairFileSource.h"
14 #include "FairFileHeader.h"
15 #include "FairParRootFileIo.h"
16 #include "FairParAsciiFileIo.h"
17 #include "FairRuntimeDb.h"
18 #include "FairSystemInfo.h"
19 #include "FairLogger.h"
20 #include "FairGeane.h"
21 #include "TGeoManager.h"
31 FairRunAna(), fInput(), fParamRootFile(), fParamAsciiFile(),
32 fOptions(), fEventCounterRate(100), fNoGeane(kTRUE),
33 fGenerateRunInfo(kFALSE), fUseFairLinks(kTRUE), fTimer()
40 if (gROOT->GetVersionInt() >= 60602 &&
gGeoManager!=NULL) {
59 if (inputName.EndsWith(
".dec")) inputName.Remove(inputName.Length()-4,4);
60 inputName.ReplaceAll(
":",
"_");
64 FairFileSource *fileSource;
66 fileSource =
new FairFileSource(
creator.GetSimFileName().data());
79 SetSource(fileSource);
90 allDigiFile +=
"/macro/params/";
93 FairRuntimeDb*
rtdb = GetRuntimeDb();
94 FairParRootFileIo*
parInput1 =
new FairParRootFileIo();
97 FairParAsciiFileIo*
parIo1 =
new FairParAsciiFileIo();
98 parIo1->open(allDigiFile.Data(),
"in");
100 rtdb->setFirstInput(parInput1);
101 rtdb->setSecondInput(parIo1);
176 if (
fOptions.Contains(
"multikalman"))
192 cout<<
"Tasks that ran just now:"<<endl;
193 TFile*
outfile=fRootManager->GetOutFile();
194 bool wasopen=outfile->IsOpen ();
197 cout<<
"file is "<< ((wasopen) ?
"" :
"not " ) <<
"open" <<endl;
198 outfile=
new TFile(outfile->GetName(),
"UPDATE");
200 FairFileHeader* outheader=(FairFileHeader*)outfile->Get(
"FileHeader");
201 for(
const auto&& os : *(outheader->GetListOfTasks()) ) cout<<
" - "<<((TObjString*)os)->GetString().Data()<<endl;
209 TFile*
outfile=fRootManager->GetOutFile();
210 bool wasopen=outfile->IsOpen ();
213 cout<<
"file is "<< ((wasopen) ?
"" :
"not " ) <<
"open" <<endl;
214 outfile=
new TFile(outfile->GetName(),
"UPDATE");
218 cout<<
"PndMasterRunAna::Finish():";
222 outoptions.Write(
"PndOptions",kOverwrite);
225 if(!wasopen) outfile->Close();
228 if (gROOT->GetVersionInt() >= 60602) {
236 FairSystemInfo sysInfo;
237 Float_t maxMemory=sysInfo.GetMaxMemory();
238 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
240 cout <<
"</DartMeasurement>" << endl;
246 Float_t cpuUsage=ctime/
rtime;
247 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
249 cout <<
"</DartMeasurement>" << endl;
252 cout <<
"Output file is\t\t" <<
fOutFile << endl;
254 cout <<
"Friend file is\t\t" <<
files << endl;
260 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime
262 cout <<
"CPU usage " << cpuUsage*100. <<
"%" << endl;
263 cout <<
"Max Memory " << maxMemory <<
" MB" << endl;
265 cout <<
"Macro finished successfully." << endl;
TString fOutFile
Name of the output file.
TString fParamRootFile
Name of the parameter root file.
Int_t fEventCounterRate
After how many events the counter will print.
void AddLocalRecoTasks(Bool_t pers=kTRUE)
Add local reconstruction tasks.
void AddDigiOnlyTasks(Bool_t pers=kTRUE)
Add digitization tasks without reconstruction.
Class for the master reconstruction chain.
TString fInput
Name of the input for the simulation.
Bool_t Setup(TString outprefix="")
Initial setup.
std::map< int, TString > files
TGeoManager * gGeoManager
virtual void SetPersistency(Bool_t pers=kTRUE)
Set the persistency of all the tasks.
TString fOptions
Options parsed to the reconstruction.
void AddRecoTasks(Bool_t pers=kTRUE)
Add reconstruction tasks.
Bool_t fNoGeane
Protect GEANE from being loaded twice.
The default local reconstruction tasks.
virtual void SetPersistency(Bool_t pers=kTRUE)
Set the persistency of all the tasks.
Bool_t fGenerateRunInfo
Switches on/off the generation of Run info.
A simple class which adds the corresponding file extensions to a given base class.
virtual void SetPersistency(Bool_t pers=kTRUE)
Set the persistency of all the tasks.
The default digitization tasks.
virtual void SetPersistency(Bool_t pers=kTRUE)
Set the persistency of all the tasks.
The default reconstruction tasks.
void AddPidTasks(Bool_t pers=kTRUE)
Add pid tasks.
Bool_t fUseFairLinks
Switches on/off the usage of FairLinks.
FairParRootFileIo * parInput1
void AddRecoIdealTasks(Bool_t pers=kTRUE)
Add ideal pattern reconstruction tasks.
FairParAsciiFileIo * parIo1
void SetParamRootFile(TString par)
Setter of the parameter root file.
virtual void SetPersistency(Bool_t pers=kTRUE)
Set the persistency of all the tasks This function has to be implemented for each master task...
PndMasterRunAna()
Default constructor.
fRun SetOutputFile(outFile)
virtual ~PndMasterRunAna()
Default destructor.
PndMvdCreateDefaultApvMap * creator
void AddDigiTasks(Bool_t pers=kTRUE)
Add digitization and local reconstruction tasks.
TString fParamAsciiFile
Name of the parameter ascii file.
void Finish()
Final diagnostics.
std::vector< TString > fFriendFiles
Name of friend files.
void SetOutput(TString par)
Tag of the output file of the macro.
fRun SetUseFairLinks(kTRUE)
The default reconstruction tasks.
The default digitization tasks.
virtual void SetPersistency(Bool_t pers=kTRUE)
Set the persistency of all the tasks.