CbmRoot
Loading...
Searching...
No Matches
analysis/common/analysis_tree_converter/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.SetRawFile(fOpt.RawFile().c_str());
32 fRun.SetParFile(fOpt.ParFile().c_str());
33 fRun.SetRecoFile(fOpt.RecoFile().c_str());
36
37 // --- Read configuration from YAML file
39 config.LoadYaml(fOpt.ConfigFile());
40 fRun.SetConfig(config);
41
42 // --- Execute reconstruction run
43 fRun.Exec();
44 }
45 // --------------------------------------------------------------------------
46
47} // namespace cbm::atconverter
Application(ProgramOptions const &opt)
Standard constructor, initialises the application.
void LoadYaml(const std::string &filename)
Load from YAML file.
const std::string & ParFile() const
Get parameter file name.
const std::string & ConfigFile() const
Get configuration file name (YAML format)
const std::vector< std::string > & TraFiles() const
Get vector of transport input file names.
const std::string & SetupTag() const
Get geometry setup tag.
const std::string & RawFile() const
Get digitization file name.
const std::string & OutputFile() const
Get output file name (.root format)
const std::string & RecoFile() const
Get reconstruction file name.
void SetOutput(const char *fileName)
Set output file name.
void SetTraFiles(const std::vector< std::string > files)
Set transport input files.
void SetConfig(const Config &config)
Set configuration.
void SetGeoSetupTag(const char *tag)
Set geometry setup tag.
void SetParFile(const char *fileName)
Set parameter file name.
void SetRecoFile(const char *fileName)
Set reconstruction file name.
void SetRawFile(const char *fileName)
Set digitizazion (raw) file name.
void AllowOverwrite()
Allow overwriting if output file already exists.