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