CbmRoot
Loading...
Searching...
No Matches
reco/offline/app/Application.cxx
Go to the documentation of this file.
1/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
10#include "Application.h"
11
12#include "Config.h"
13
14using std::string;
15
17{
18
19 // ----- Constructor ----------------------------------------------------
20 Application::Application(ProgramOptions const& opt) : fOpt(opt) {}
21 // --------------------------------------------------------------------------
22
23
24 // ----- Run the reconstruction -----------------------------------------
26 {
27
28 // --- Use program options
29 fRun.SetOutput(fOpt.OutputFile().c_str());
30 fRun.SetRawFile(fOpt.RawFile().c_str());
31 fRun.SetParFile(fOpt.ParFile().c_str());
34
35 // --- Read configuration from YAML file
37 config.LoadYaml(fOpt.ConfigFile());
38 fRun.SetConfig(config);
39
40 // --- Execute reconstruction run
41 fRun.Exec();
42 }
43 // --------------------------------------------------------------------------
44
45} // namespace cbm::reco::offline
ProgramOptions const & fOpt
Program options object.
Application(ProgramOptions const &opt)
Standard constructor, initialises the application.
void LoadYaml(const std::string &filename)
Load from YAML file.
const std::string & SetupTag() const
Get geometry setup tag.
const std::string & RawFile() const
Get digitization (raw) file name.
const std::string & ParFile() const
Get parameter file name.
const std::string & OutputFile() const
Get output file name (.root format)
bool Overwrite() const
Get overwrite option.
const std::string & ConfigFile() const
Get configuration file name (YAML format)
void SetConfig(const Config &config)
Set configuration.
void SetGeoSetupTag(const char *tag)
Set geometry setup tag.
void AllowOverwrite()
Allow overwriting if output file already exists.
void SetRawFile(const char *fileName)
Set digitization (raw) file name.
void SetParFile(const char *fileName)
Set parameter file name.
void Exec()
Run reconstruction.
void SetOutput(const char *fileName)
Set output file name.