AllowedConfiguration.h
Go to the documentation of this file.
1 #ifndef art_Framework_Art_detail_AllowedConfiguration_h
2 #define art_Framework_Art_detail_AllowedConfiguration_h
3 
4 /*
5  The functions below:
6 
7  void print_available_plugins
8  void print_description
9  void print_descriptions
10  bool supports_key
11 
12  are the driving functions for the art program options:
13 
14  art --print-available=(module|plugin|service|source)
15  art --print-available-modules
16  art --print-available-services
17  art --print-description <specs>...
18 
19  ===============
20  Developer notes
21  ===============
22 
23  A primary design consideration for this system is that
24  'PluginSuffixes' provides an enumerator for each supported plugin
25  suffix. This allows template programming to be used. However, the
26  necessity of looping over entries implies needing to use inheritance
27  as well.
28 
29  For each plugin, the following information is stored as in a
30  'LibraryInfo' object:
31 
32  - .so name
33  - specs (long and short)
34  - source file path
35  - allowed configuration -- pointer to allowed configuration
36  - provider ("art" or "user")
37  - plugin type
38 
39  Some of the data members may be empty if the associated info is not
40  relevant (e.g. plugin type for services).
41 
42  There are 3 get_* functions that are plugin-specific:
43 
44  1. get_LibraryInfoCollection(suffix_type)
45  2. get_MetadataSummary (suffix_type, LibraryInfoCollection const&)
46  3. get_MetadataCollector(suffix_type)
47 
48  Function 1 is used for returning the LibraryInfo objects associated
49  with a given plugin suffix.
50 
51  Function 2 returns the 'MetadataSummary', which is used for
52  presenting one-line information for the --print-available* program
53  options.
54 
55  Function 3 return the 'MetadataCollector', which is used for
56  presenting more detailed information for '--print-description'.
57 
58  Both 'MetadataSummary' and 'MetadataCollector' are abstract base
59  classes, whose derived classes are template instantiations of
60  'MetadataSummaryFor<suffix_type>' or
61  'MetadataCollectorFor<suffix_type>', respectively.
62 
63  For the '--print-description' option, the 'PluginMetadata' class is
64  used to encapsulate the "header", "details", and "allowed
65  configuration" of each plugin.
66 
67  KK, October 2015
68 */
69 
73 
74 #include <string>
75 #include <vector>
76 
77 namespace art {
78  namespace detail {
79 
81  bool const verbose,
82  std::string const& spec);
83 
84  inline void
85  print_available_plugins(suffix_type st, bool const verbose)
86  {
88  }
89 
90  bool supports_key(suffix_type st,
91  std::string const& spec,
92  std::string const& key);
93  void print_description(std::vector<PluginMetadata> const& matches);
94  void print_descriptions(std::vector<std::string> const& plugins);
95  }
96 }
97 
98 #endif /* art_Framework_Art_detail_AllowedConfiguration_h */
99 
100 // Local variables:
101 // mode: c++
102 // End:
constexpr const char * dflt_spec_pattern()
void print_available_plugins(suffix_type st, bool const verbose, std::string const &spec)
void print_descriptions(std::vector< std::string > const &plugins)
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
void print_description(std::vector< PluginMetadata > const &matches)
bool supports_key(suffix_type st, std::string const &spec, std::string const &key)
enum BeamMode string