Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
Alignment
CI
cmake
Core
docs
Examples
Algorithms
Detectors
Framework
Io
Python
Run
Alignment
Common
include
src
AlignedDetectorWithOptions.cpp
CommonGeometry.cpp
CommonMaterialMapping.cpp
CommonOptions.cpp
CommonSimulation.cpp
CsvOptionsReader.cpp
CsvOptionsWriter.cpp
DigitizationOptions.cpp
EmptyDetector.cpp
GenericDetectorWithOptions.cpp
GeometryExampleBase.cpp
JsonOptionsWriter.cpp
MagneticFieldOptions.cpp
MaterialValidationBase.cpp
NuclearInteractionOptions.cpp
ParticleGunOptions.cpp
ParticleSelectorOptions.cpp
ParticleSmearingOptions.cpp
PropagationExampleBase.cpp
ReconstructionBase.cpp
SpacePointMakerOptions.cpp
TelescopeDetectorWithOptions.cpp
TGeoDetectorWithOptions.cpp
TrackFindingOptions.cpp
TrackFittingOptions.cpp
TruthSeedSelectorOptions.cpp
VertexingOptions.cpp
DD4hep
Digitization
Fatras
Geant4
Generators
Geometry
HelloWorld
HepMC3
MagneticField
MaterialMapping
Misc
Propagation
Reconstruction
Show
Vertexing
Scripts
Fatras
Plugins
Tests
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
JsonOptionsWriter.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file JsonOptionsWriter.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2021 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/JsonOptionsWriter.hpp
"
10
11
#include <boost/program_options.hpp>
12
13
void
ActsExamples::Options::addJsonWriterOptions
(
14
ActsExamples::Options::Description
& desc) {
15
using namespace
boost::program_options;
16
17
desc.add_options()(
18
"json-output-precision"
,
19
value<size_t>()->default_value(std::numeric_limits<float>::max_digits10),
20
"Floating number output precision."
)(
"json-write-sf-boundaries"
,
21
bool_switch(),
22
"Write tracking boundary surfaces."
)(
23
"json-write-sf-approach"
, bool_switch(),
24
"Write tracking geometry approach surfaces."
)(
25
"json-write-sf-layer"
, bool_switch(),
26
"Write tracking geometry layer surfaces."
)(
27
"json-write-sf-sensitive"
, bool_switch(),
28
"Write tracking geometry sensitive surfaces."
)(
29
"json-write-sf-names-only"
, bool_switch(),
30
"Write only names of tracking geometry surfaces."
);
31
}
32
33
ActsExamples::JsonSurfacesWriter::Config
34
ActsExamples::Options::readJsonSurfacesWriterConfig
(
35
const
ActsExamples::Options::Variables
& vm) {
36
ActsExamples::JsonSurfacesWriter::Config
cfg
;
37
if
(not vm[
"output-dir"
].empty()) {
38
cfg.
outputDir
= vm[
"output-dir"
].as<
std::string
>();
39
}
40
cfg.
outputPrecision
= vm[
"json-output-precision"
].as<
size_t
>();
41
cfg.
writeLayer
= vm[
"json-write-sf-layer"
].as<
bool
>();
42
cfg.
writeApproach
= vm[
"json-write-sf-approach"
].as<
bool
>();
43
cfg.
writeSensitive
= vm[
"json-write-sf-sensitive"
].as<
bool
>();
44
cfg.
writeBoundary
= vm[
"json-write-sf-boundaries"
].as<
bool
>();
45
cfg.
writeOnlyNames
= vm[
"json-write-sf-names-only"
].as<
bool
>();
46
47
return
cfg
;
48
}
acts
blob
sPHENIX
Examples
Run
Common
src
JsonOptionsWriter.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:39
using
1.8.2 with
sPHENIX GitHub integration