Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
HepMC3Options.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file HepMC3Options.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2020 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#include "
ActsExamples/Options/HepMC3Options.hpp
"
10
11
#include "
ActsExamples/Utilities/Options.hpp
"
12
13
#include <string>
14
15
#include <boost/program_options.hpp>
16
17
void
ActsExamples::Options::addHepMC3WriterOptions
(
18
ActsExamples::Options::Description
& desc) {
19
using
boost::program_options::value
;
20
21
auto
opt = desc.add_options();
22
23
opt(
"hepmc3-stem"
, value<std::string>()->default_value(
"events"
),
24
"The stem of file names of the output"
);
25
}
26
27
ActsExamples::HepMC3AsciiWriter::Config
28
ActsExamples::Options::readHepMC3WriterOptions
(
29
const
ActsExamples::Options::Variables
& variables) {
30
ActsExamples::HepMC3AsciiWriter::Config
writerConfig;
31
writerConfig.
outputDir
= variables[
"output-dir"
].as<
std::string
>();
32
writerConfig.
outputStem
= variables[
"hepmc3-stem"
].as<
std::string
>();
33
34
return
writerConfig;
35
}
36
37
void
ActsExamples::Options::addHepMC3ReaderOptions
(
38
ActsExamples::Options::Description
& desc) {
39
using
boost::program_options::value
;
40
41
auto
opt = desc.add_options();
42
43
opt(
"hepmc3-stem"
, value<std::string>()->default_value(
"events"
),
44
"The stem of file names of the input"
);
45
}
46
47
ActsExamples::HepMC3AsciiReader::Config
48
ActsExamples::Options::readHepMC3ReaderOptions
(
49
const
ActsExamples::Options::Variables
& variables) {
50
ActsExamples::HepMC3AsciiReader::Config
readerConfig;
51
readerConfig.
inputDir
= variables[
"input-dir"
].as<
std::string
>();
52
readerConfig.
inputStem
= variables[
"hepmc3-stem"
].as<
std::string
>();
53
54
return
readerConfig;
55
}
acts
blob
sPHENIX
Examples
Run
HepMC3
Options
src
HepMC3Options.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:40
using
1.8.2 with
sPHENIX GitHub integration