Skip to content

Commit

Permalink
Merge pull request #314 from cms-analysis/fix_extArg_path
Browse files Browse the repository at this point in the history
More fixes for extArg parsing
  • Loading branch information
ajgilbert authored Dec 7, 2023
2 parents c69b108 + 9385244 commit 0f22c7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CombineTools/src/CombineHarvester_Datacards.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,10 @@ void CombineHarvester::WriteDatacard(std::string const& name,
RooRealVar *y = dynamic_cast<RooRealVar*>(**v);
if (y && y->getAttribute("extArg") && all_fn_param_args.count(std::string(y->GetName()))) {
if (!params_.count(y->GetName()) && y->getStringAttribute("wspSource")) {
std::vector<std::string> tokens;
boost::split(tokens, y->getStringAttribute("wspSource"), boost::is_any_of(":"));
std::string wsp_name_extArg = tokens[1];
y->setStringAttribute("wspSource", (std::string(root_file.GetName()) + ":" + tokens[1]).c_str());
txt_file << format("%-" + sys_str_short +
"s %-10s %-20s\n") %
y->GetName() % "extArg" % std::string(y->getStringAttribute("wspSource"));
Expand Down

0 comments on commit 0f22c7b

Please sign in to comment.