CbmRoot
Loading...
Searching...
No Matches
sim/response/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: Frederic Linz [committer], Volker Friese */
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());
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::sim::digitization
Application(ProgramOptions const &opt)
Standard constructor, initialises the application.
ProgramOptions const & fOpt
Program options object.
void LoadYaml(const std::string &filename)
Load from YAML file.
const std::string & ParFile() const
Get parameter file name.
const std::vector< std::string > & TraFiles() const
Get transport file name.
const std::string & ConfigFile() const
Get configuration file name (YAML format)
const std::string & SetupTag() const
Get geometry setup tag.
const std::string & OutputFile() const
Get output file name (.root format)
void SetTraFiles(const std::vector< std::string > files)
Set transport file name.
void SetParFile(const char *fileName)
Set parameter file name.
void SetConfig(const Config &config)
Set configuration.
void AllowOverwrite()
Allow overwriting if output file already exists.
void SetOutput(const char *fileName)
Set output file name.
void SetGeoSetupTag(const char *tag)
Set geometry setup tag.