24 std::shared_ptr<const FW::RandomNumbers> randomNumberSvc) {
29 auto evgenInput = vm[
"evg-input-type"].template as<std::string>();
30 if (evgenInput ==
"gun") {
32 evgCfg.output =
"event_generated";
33 evgCfg.randomNumbers = randomNumberSvc;
34 sequencer.
addReader(std::make_shared<FW::EventGenerator>(evgCfg, logLevel));
36 }
else if (evgenInput ==
"pythia8") {
38 evgCfg.output =
"event_generated";
39 evgCfg.randomNumbers = randomNumberSvc;
40 sequencer.
addReader(std::make_shared<FW::EventGenerator>(evgCfg, logLevel));
43 throw std::runtime_error(
"unknown event generator input: " + evgenInput);
50 sequencer.
addAlgorithm(std::make_shared<FW::FlattenEvent>(flatten, logLevel));
53 std::string outputDir = vm[
"output-dir"].template as<std::string>();
56 if (vm[
"output-csv"].
template as<bool>()) {
60 pWriterCsvConfig.
outputStem =
"particles_generated";
62 std::make_shared<FW::CsvParticleWriter>(pWriterCsvConfig, logLevel));
66 if (vm[
"output-root"].
template as<bool>()) {
72 std::make_shared<FW::RootParticleWriter>(pWriterRootConfig, logLevel));