Skip to content

Commit

Permalink
Ability to read from INI file; Option naming adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
sawenzel committed Nov 29, 2023
1 parent 73dae49 commit e6bf9e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions run/dpl_eventgen.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
using namespace o2::framework;

struct GeneratorTask {
Configurable<std::string> params{"confKeyValues", "", "configurable params - configuring event generation internals"};
Configurable<std::string> generator{"generator", "boxgen", "Name of generator"};
Configurable<int> eventNum{"nEvents", 1, "Number of events"};
Configurable<std::string> trigger{"trigger", "", "Trigger type"}; //
Configurable<int> eventNum{"nevents", 1, "Number of events"};
Configurable<std::string> iniFile{"configFile", "", "INI file containing configurable parameters"};
Configurable<std::string> params{"configKeyValues", "", "configurable params - configuring event generation internals"};
Configurable<long> seed{"seed", 0, "(TRandom) Seed"};
Configurable<int> aggregate{"aggregate-timeframe", 300, "Number of events to put in a timeframe"};
Configurable<std::string> vtxModeArg{"vertexMode", "kDiamondParam", "Where the beam-spot vertex should come from. Must be one of kNoVertex, kDiamondParam, kCCDB"};
Expand All @@ -48,6 +49,7 @@ struct GeneratorTask {
}

// update config key params
o2::conf::ConfigurableParam::updateFromFile(iniFile);
o2::conf::ConfigurableParam::updateFromString((std::string)params);
// initialize the service
if (vtxmode == o2::conf::VertexMode::kDiamondParam) {
Expand Down

0 comments on commit e6bf9e6

Please sign in to comment.