LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
LibraryInfo.h
Go to the documentation of this file.
1 #ifndef art_Framework_Art_detail_LibraryInfo_h
2 #define art_Framework_Art_detail_LibraryInfo_h
3 
5 
6 #include <memory>
7 #include <string>
8 #include <utility>
9 
10 namespace art {
11  namespace detail {
12 
13  class LibraryInfo {
14  private:
15  using spec_pair_t = std::pair<std::string, std::string>;
16 
17  public:
18  LibraryInfo(std::string const& so,
19  spec_pair_t const& specs,
20  std::string const& path,
21  std::unique_ptr<fhicl::ConfigurationTable>&& config,
22  std::string const& prov,
23  std::string const& pt)
24  : soName_{so}
25  , specs_{specs}
26  , path_{path}
27  , allowedConfig_{std::move(config)}
28  , provider_{prov}
29  , pluginType_{pt}
30  {}
31 
32  bool
33  operator<(LibraryInfo const& li) const
34  {
35  return this->short_spec() < li.short_spec();
36  }
37 
38  std::string const&
39  so_name() const
40  {
41  return soName_;
42  }
43  std::string const&
44  short_spec() const
45  {
46  return specs_.first;
47  }
48  std::string const&
49  long_spec() const
50  {
51  return specs_.second;
52  }
53  std::string const&
54  path() const
55  {
56  return path_;
57  }
58  cet::exempt_ptr<fhicl::ConfigurationTable const>
60  {
61  return allowedConfig_.get();
62  }
63  std::string const&
64  provider() const
65  {
66  return provider_;
67  }
68  std::string const&
69  plugin_type() const
70  {
71  return pluginType_;
72  }
73 
74  private:
75  std::string soName_;
77  std::string path_;
78  std::unique_ptr<fhicl::ConfigurationTable> allowedConfig_;
79  std::string provider_;
80  std::string pluginType_;
81  };
82 
84  std::string val_;
85 
86  public:
87  LibraryInfoMatch(std::string const& name) : val_{name} {}
88 
89  bool
90  operator()(LibraryInfo const& li) const
91  {
92  return val_ == li.short_spec();
93  }
94  };
95  }
96 }
97 
98 #endif /* art_Framework_Art_detail_LibraryInfo_h */
99 
100 // Local variables:
101 // mode: c++
102 // End:
std::string const & so_name() const
Definition: LibraryInfo.h:39
LibraryInfo(std::string const &so, spec_pair_t const &specs, std::string const &path, std::unique_ptr< fhicl::ConfigurationTable > &&config, std::string const &prov, std::string const &pt)
Definition: LibraryInfo.h:18
bool operator<(LibraryInfo const &li) const
Definition: LibraryInfo.h:33
std::pair< std::string, std::string > spec_pair_t
Definition: LibraryInfo.h:15
cet::exempt_ptr< fhicl::ConfigurationTable const > allowed_config() const
Definition: LibraryInfo.h:59
TMarker * pt
Definition: egs.C:25
std::string const & short_spec() const
Definition: LibraryInfo.h:44
std::string const & provider() const
Definition: LibraryInfo.h:64
std::unique_ptr< fhicl::ConfigurationTable > allowedConfig_
Definition: LibraryInfo.h:78
std::string const & path() const
Definition: LibraryInfo.h:54
HLT enums.
std::string const & plugin_type() const
Definition: LibraryInfo.h:69
LibraryInfoMatch(std::string const &name)
Definition: LibraryInfo.h:87
bool operator()(LibraryInfo const &li) const
Definition: LibraryInfo.h:90
std::string const & long_spec() const
Definition: LibraryInfo.h:49