@@ -65,7 +65,7 @@ HBFUtilsInitializer::HBFUtilsInitializer(const o2f::ConfigContext& configcontext
6565 upstream = true ;
6666 continue ;
6767 }
68- HBFOpt opt = getOptType (optStr);
68+ HBFOpt opt = getOptType (optStr, !helpasked); // do not throw on unknown opt if help-opt was given
6969 nopts++;
7070 if ((opt == HBFOpt::INI || opt == HBFOpt::JSON) && !helpasked) {
7171 o2::conf::ConfigurableParam::updateFromFile (optStr, " HBFUtils" , true ); // update only those values which were not touched yet (provenance == kCODE)
@@ -78,8 +78,6 @@ HBFUtilsInitializer::HBFUtilsInitializer(const o2f::ConfigContext& configcontext
7878 hbfuInput = optStr;
7979 } else if (opt == HBFOpt::ROOT) {
8080 rootFileInput = optStr;
81- } else if (!helpasked) {
82- LOGP (fatal, " uknown hbfutils-config option {}" , optStr);
8381 }
8482 }
8583 if (!nopts && !helpasked) {
@@ -125,7 +123,7 @@ HBFUtilsInitializer::HBFUtilsInitializer(const o2f::ConfigContext& configcontext
125123}
126124
127125// _________________________________________________________
128- HBFUtilsInitializer::HBFOpt HBFUtilsInitializer::getOptType (const std::string& optString)
126+ HBFUtilsInitializer::HBFOpt HBFUtilsInitializer::getOptType (const std::string& optString, bool throwOnFailure )
129127{
130128 // return type of the file provided via HBFConfOpt
131129 HBFOpt opt = HBFOpt::NONE;
@@ -138,7 +136,7 @@ HBFUtilsInitializer::HBFOpt HBFUtilsInitializer::getOptType(const std::string& o
138136 opt = HBFOpt::ROOT;
139137 } else if (optString == HBFUSrc) {
140138 opt = HBFOpt::HBFUTILS;
141- } else if (optString != " none" ) {
139+ } else if (optString != " none" && throwOnFailure ) {
142140 throw std::runtime_error (fmt::format (" invalid option {} for {}" , optString, HBFConfOpt));
143141 }
144142 }
0 commit comments