@@ -18,8 +18,16 @@ namespace traccc::opts {
1818// / Convenience namespace shorthand
1919namespace po = boost::program_options;
2020
21+ // / Type alias for the reconstruction stage enumeration
22+ using stage_type = std::string;
23+ // / Name of the reconstruction stage option
24+ static const char * stage_option = " reco-stage" ;
25+
2126throughput::throughput () : interface(" Throughput Measurement Options" ) {
2227
28+ m_desc.add_options ()(
29+ stage_option, po::value<stage_type>()->default_value (" full" ),
30+ " Reconstruction stage to run (\" seeding\" or \" full\" )" );
2331 m_desc.add_options ()(
2432 " processed-events" ,
2533 po::value (&processed_events)->default_value (processed_events),
@@ -40,9 +48,38 @@ throughput::throughput() : interface("Throughput Measurement Options") {
4048 " File where result logs will be printed (in append mode)." );
4149}
4250
51+ void throughput::read (const po::variables_map& vm) {
52+
53+ // Decode the input data format.
54+ if (vm.count (stage_option)) {
55+ const std::string stage_string = vm[stage_option].as <stage_type>();
56+ if (stage_string == " full" ) {
57+ reco_stage = stage::full;
58+ } else if (stage_string == " seeding" ) {
59+ reco_stage = stage::seeding;
60+ } else {
61+ throw std::invalid_argument (" Unknown reconstruction stage" );
62+ }
63+ }
64+ }
65+
4366std::unique_ptr<configuration_printable> throughput::as_printable () const {
4467 auto cat = std::make_unique<configuration_category>(m_description);
4568
69+ std::string reco_stage_string;
70+ switch (reco_stage) {
71+ case stage::seeding:
72+ reco_stage_string = " seeding" ;
73+ break ;
74+ case stage::full:
75+ reco_stage_string = " full" ;
76+ break ;
77+ default :
78+ reco_stage_string = " unknown" ;
79+ break ;
80+ }
81+ cat->add_child (std::make_unique<configuration_kv_pair>(
82+ " Reconstruction stage" , reco_stage_string));
4683 cat->add_child (std::make_unique<configuration_kv_pair>(
4784 " Cold run events" , std::to_string (cold_run_events)));
4885 cat->add_child (std::make_unique<configuration_kv_pair>(
0 commit comments