18 : fDescription(
"Options")
22 , fMultiThreaded(false)
23 , fOutputFile(
"sim.root")
24 , fParameterFile(
"par.root")
28 fDescription.add_options()
29 (
"help",
"Print this message")
30 (
"nevents", po::value<int>(),
"Number of events to simulate")
31 (
"engine", po::value<vector<string>>(),
"Monte Carlo engine")
32 (
"multi-threaded",
"Geant4 multi threaded")
33 (
"output-file", po::value<vector<string>>(),
"Output file")
34 (
"parameter-file", po::value<vector<string>>(),
"Parameter file")
35 (
"random-seed", po::value<int>(),
"Seed for the random number generator");
44 po::store(po::parse_command_line(argc, argv, fDescription), fMap);
47 }
catch (po::error& e) {
48 LOG(error) << e.what();
53 if (fMap.count(
"help")) {
57 if (fMap.count(
"nevents")) {
58 fnEvents = fMap[
"nevents"].as<
int>();
60 if (fMap.count(
"engine")) {
61 fEngine = fMap[
"engine"].as<vector<string>>().at(0);
63 LOG(error) <<
"Option engine can be either TGeant3 or TGeant4";
67 if (fMap.count(
"output-file")) {
68 fOutputFile = fMap[
"output-file"].as<vector<string>>().at(0);
70 if (fMap.count(
"parameter-file")) {
71 fParameterFile = fMap[
"parameter-file"].as<vector<string>>().at(0);
73 if (fMap.count(
"random-seed")) {
74 fRandomSeed = fMap[
"random-seed"].as<
int>();
76 if (fMap.count(
"multi-threaded")) {
77 LOG(info) <<
"YUPYUPYUP";
78 fMultiThreaded =
true;
int ParseCommandLine(int argc, char *argv[])
ClassImp(FairEventBuilder)
TString GetEngine() const