forked from acts-project/traccc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e89017a
commit 7bcdb1a
Showing
19 changed files
with
319 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
examples/options/include/traccc/options/detector_input_options.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2023 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
// Boost | ||
#include <boost/program_options.hpp> | ||
|
||
namespace traccc { | ||
|
||
namespace po = boost::program_options; | ||
|
||
struct detector_input_options { | ||
std::string detector_file; | ||
std::string material_file; | ||
std::string grid_file; | ||
|
||
detector_input_options(po::options_description& desc); | ||
void read(const po::variables_map& vm); | ||
}; | ||
|
||
} // namespace traccc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2023 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
// options | ||
#include "traccc/options/detector_input_options.hpp" | ||
|
||
traccc::detector_input_options::detector_input_options( | ||
po::options_description& desc) { | ||
desc.add_options()("detector_file", po::value<std::string>()->required(), | ||
"specify detector file"); | ||
desc.add_options()("material_file", po::value<std::string>(), | ||
"specify material file"); | ||
desc.add_options()("grid_file", po::value<std::string>(), | ||
"specify surface grid file"); | ||
} | ||
|
||
void traccc::detector_input_options::read(const po::variables_map& vm) { | ||
|
||
detector_file = vm["detector_file"].as<std::string>(); | ||
if (vm.count("material_file")) { | ||
material_file = vm["material_file"].as<std::string>(); | ||
} | ||
if (vm.count("grid_file")) { | ||
grid_file = vm["grid_file"].as<std::string>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.