artdaq_utilities  v1_04_10
makeMetricPlugin.cc
1 #include "artdaq-utilities/Plugins/makeMetricPlugin.hh"
2 
3 #include "artdaq-utilities/Plugins/MetricMacros.hh"
4 #include "fhiclcpp/ParameterSet.h"
5 #include "cetlib/BasicPluginFactory.h"
6 
7 std::unique_ptr<artdaq::MetricPlugin>
8 artdaq::makeMetricPlugin(std::string const& generator_plugin_spec, fhicl::ParameterSet const& ps, std::string const& app_name)
9 {
10  static cet::BasicPluginFactory bpf("metric", "make");
11 
12  return bpf.makePlugin<std::unique_ptr<artdaq::MetricPlugin>, fhicl::ParameterSet const &, std::string const&>(generator_plugin_spec, ps, app_name);
13 }
std::unique_ptr< MetricPlugin > makeMetricPlugin(std::string const &generator_plugin_spec, fhicl::ParameterSet const &ps, std::string const &app_name)
Load a given MetricPlugin and return a pointer to it.