Skip to content

Commit bc9f262

Browse files
martenoledavidrohr
authored andcommitted
Accept configKeyValues in TRAPsim workflow
1 parent 0a67992 commit bc9f262

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Detectors/TRD/workflow/src/TRDTrapSimulatorWorkFlow.cxx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowoptions)
6767
// std::string trapsimconfighelp("Specify the Trap config to use from CCDB yes those long names like cf_pg-fpnp32_zs-s16-deh_tb24_trkl-b2p-fs1e24-ht200-qs0e24s24e23-pidlinear-pt100_ptrg.r5585");
6868
// workflowoptions.push_back(ConfigParamSpec{"trapconfigname", VariantType::Int, -1, {trapsimconfighelp}});
6969

70+
// option allowing to set parameters
71+
std::string keyvaluehelp("Semicolon separated key=value strings (e.g.: 'TRDSimParams.digithreads=4;...')");
72+
workflowoptions.push_back(
73+
ConfigParamSpec{"configKeyValues", VariantType::String, "", {keyvaluehelp}});
74+
workflowoptions.push_back(
75+
ConfigParamSpec{"configFile", VariantType::String, "", {"configuration file for configurable parameters"}});
76+
7077
// json output
7178
// run2 input
7279
// trap configuration
@@ -83,6 +90,8 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
8390
// at the end. This places the processor at the beginning of the
8491
// workflow in the upper left corner of the GUI.
8592
//
93+
using namespace o2::conf;
94+
ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
8695
WorkflowSpec specs;
8796
auto useMC = !configcontext.options().get<bool>("disable-mc");
8897
auto disableRootInput = configcontext.options().get<bool>("disable-root-input");

0 commit comments

Comments
 (0)