Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GdmlMaterialRecording.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GdmlMaterialRecording.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 
14 
15 #include <boost/program_options.hpp>
16 
17 using namespace ActsExamples;
18 
19 int main(int argc, char* argv[]) {
20  // Setup and parse options
21  auto desc = Options::makeDefaultOptions();
23  Options::addOutputOptions(desc, OutputFormat::Root);
27  desc.add_options()(
28  "gdml-file",
29  boost::program_options::value<std::string>()->default_value(""),
30  "GDML detector file.");
31 
32  auto vm = Options::parse(desc, argc, argv);
33 
34  if (vm.empty()) {
35  return EXIT_FAILURE;
36  }
37  auto gdmlFile = vm["gdml-file"].as<std::string>();
38 
39  return runMaterialRecording(
40  vm, std::make_unique<GdmlDetectorConstructionFactory>(gdmlFile));
41 }