diff --git a/Framework/Core/include/Framework/HistogramRegistry.h b/Framework/Core/include/Framework/HistogramRegistry.h index 4243c97781e64..97a65a5b29f7a 100644 --- a/Framework/Core/include/Framework/HistogramRegistry.h +++ b/Framework/Core/include/Framework/HistogramRegistry.h @@ -93,6 +93,7 @@ class HistogramRegistry HistPtr add(const HistogramSpec& histSpec); HistPtr add(char const* const name, char const* const title, const HistogramConfigSpec& histConfigSpec, bool callSumw2 = false); HistPtr add(char const* const name, char const* const title, HistType histType, const std::vector& axes, bool callSumw2 = false); + HistPtr add(const std::string& name, char const* const title, HistType histType, const std::vector& axes, bool callSumw2 = false); template std::shared_ptr add(char const* const name, char const* const title, const HistogramConfigSpec& histConfigSpec, bool callSumw2 = false); diff --git a/Framework/Core/src/HistogramRegistry.cxx b/Framework/Core/src/HistogramRegistry.cxx index a5a5c74985b72..5bc73e0a63a3c 100644 --- a/Framework/Core/src/HistogramRegistry.cxx +++ b/Framework/Core/src/HistogramRegistry.cxx @@ -114,6 +114,11 @@ HistPtr HistogramRegistry::add(char const* const name, char const* const title, return insert({name, title, {histType, axes}, callSumw2}); } +HistPtr HistogramRegistry::add(const std::string& name, char const* const title, HistType histType, const std::vector& axes, bool callSumw2) +{ + return insert({name.c_str(), title, {histType, axes}, callSumw2}); +} + // store a copy of an existing histogram (or group of histograms) under a different name void HistogramRegistry::addClone(const std::string& source, const std::string& target) {