LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
get_MetadataCollector.cc
Go to the documentation of this file.
2 #include "art/Framework/Art/detail/md-collector/MetadataCollectorForMFPlugin.h"
3 #include "art/Framework/Art/detail/md-collector/MetadataCollectorForMFStatsPlugin.h"
4 #include "art/Framework/Art/detail/md-collector/MetadataCollectorForModule.h"
5 #include "art/Framework/Art/detail/md-collector/MetadataCollectorForPlugin.h"
6 #include "art/Framework/Art/detail/md-collector/MetadataCollectorForService.h"
7 #include "art/Framework/Art/detail/md-collector/MetadataCollectorForSource.h"
8 #include "art/Framework/Art/detail/md-collector/MetadataCollectorForTool.h"
10 
11 using namespace art;
12 using namespace art::detail;
13 
14 std::unique_ptr<MetadataCollector>
15 detail::get_MetadataCollector(std::string const& suffix)
16 {
17  if (suffix == art::Suffixes::module()) {
18  return std::make_unique<MetadataCollectorFor<suffix_type::module>>();
19  }
20  if (suffix == art::Suffixes::plugin()) {
21  return std::make_unique<MetadataCollectorFor<suffix_type::plugin>>();
22  }
23  if (suffix == art::Suffixes::service()) {
24  return std::make_unique<MetadataCollectorFor<suffix_type::service>>();
25  }
26  if (suffix == art::Suffixes::source()) {
27  return std::make_unique<MetadataCollectorFor<suffix_type::source>>();
28  }
29  if (suffix == art::Suffixes::tool()) {
30  return std::make_unique<MetadataCollectorFor<suffix_type::tool>>();
31  }
32  if (suffix == art::Suffixes::mfPlugin()) {
33  return std::make_unique<MetadataCollectorFor<suffix_type::mfPlugin>>();
34  }
35  if (suffix == art::Suffixes::mfStatsPlugin()) {
36  return std::make_unique<MetadataCollectorFor<suffix_type::mfStatsPlugin>>();
37  }
38  return std::unique_ptr<MetadataCollector>{nullptr};
39 }
static std::string const & mfStatsPlugin()
static std::string const & source()
static std::string const & plugin()
static std::string const & tool()
static std::string const & mfPlugin()
static std::string const & service()
std::unique_ptr< MetadataCollector > get_MetadataCollector(std::string const &suffix)
Definition: MVAAlg.h:12
static std::string const & module()