Skip to content

Commit

Permalink
Update InputSpec usage to changes in O2 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
knopers8 authored Oct 25, 2018
1 parent 5d292ed commit d0b95b6
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions Framework/src/TaskRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,26 @@ void TaskRunner::populateConfig(std::string taskName)
boost::split(taskInputsSplit, taskInputsNames, boost::is_any_of(","));

for (auto&& input : taskInputsSplit) {
InputSpec inputSpec;
inputSpec.binding = mConfigFile->get<std::string>(prefix + input + ".inputName");
inputSpec.origin.runtimeInit(mConfigFile->get<std::string>(prefix + input + ".dataOrigin").c_str());
inputSpec.description.runtimeInit(mConfigFile->get<std::string>(prefix + input + ".dataDescription").c_str());
size_t len = strlen(inputSpec.description.str);
if (len < inputSpec.description.size - 2) {
inputSpec.description.str[len] = '_';
inputSpec.description.str[len + 1] = 'S';
std::string binding;
header::DataOrigin origin;
header::DataDescription description;

binding = mConfigFile->get<std::string>(prefix + input + ".inputName");
std::string originStr = mConfigFile->get<std::string>(prefix + input + ".dataOrigin");
std::string descriptionStr = mConfigFile->get<std::string>(prefix + input + ".dataDescription");

originStr.copy(origin.str, (size_t)origin.size);
descriptionStr.copy(description.str, (size_t)description.size);

size_t len = strlen(description.str);
if (len < description.size - 2) {
description.str[len] = '_';
description.str[len + 1] = 'S';
} else {
BOOST_THROW_EXCEPTION(AliceO2::Common::FatalException() << AliceO2::Common::errinfo_details(
std::string("Too long description name: ") + inputSpec.description.str));
std::string("Too long description name: ") + description.str));
}
inputSpec.subSpec = 0;
mInputSpecs.push_back(inputSpec);
mInputSpecs.push_back(InputSpec{binding, origin, description, 0 });
}

mMonitorObjectsSpec.origin.runtimeInit("QC");
Expand Down

0 comments on commit d0b95b6

Please sign in to comment.