Skip to content

Commit

Permalink
Use getRecursive
Browse files Browse the repository at this point in the history
  • Loading branch information
awegrzyn authored and Barthelemy committed Oct 18, 2018
1 parent 9602a0b commit e7d1f49
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Framework/src/TaskRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,15 @@ void TaskRunner::populateConfig(std::string taskName)
std::string taskDefinitionName = mConfigFile->get<std::string>(prefix + taskName + ".taskDefinition");

mTaskConfig.taskName = taskName;
mTaskConfig.moduleName = mConfigFile->get<std::string>(prefix + taskDefinitionName + ".moduleName");
mTaskConfig.className = mConfigFile->get<std::string>(prefix + taskDefinitionName + ".className");
auto taskConfigTree = mConfigFile->getRecursive(prefix + taskDefinitionName);
mTaskConfig.moduleName = taskConfigTree.get<std::string>("moduleName");
mTaskConfig.className = taskConfigTree.get<std::string>("className");
mTaskConfig.cycleDurationSeconds =
mConfigFile->get<int>(prefix + taskDefinitionName + ".cycleDurationSeconds", 10);
mTaskConfig.maxNumberCycles = mConfigFile->get<int>(prefix + taskDefinitionName + ".maxNumberCycles", -1);
taskConfigTree.get<int>("cycleDurationSeconds", 10);
mTaskConfig.maxNumberCycles = taskConfigTree.get<int>("maxNumberCycles", -1);

// maybe it should be moved somewhere else?
std::string taskInputsNames = mConfigFile->get<std::string>(prefix + taskDefinitionName + ".inputs");
std::string taskInputsNames = taskConfigTree.get<std::string>("inputs");
std::vector<std::string> taskInputsSplit;
boost::split(taskInputsSplit, taskInputsNames, boost::is_any_of(","));

Expand Down

0 comments on commit e7d1f49

Please sign in to comment.