1 #ifndef art_Framework_Services_System_FileCatalogMetadata_h 2 #define art_Framework_Services_System_FileCatalogMetadata_h 9 #include "cetlib/container_algorithms.h" 16 #include <unordered_map> 38 "This list specifies the metadata that is inherited\n" 39 "from the input file. Currently only the run type and\n" 40 "file type metadata can be inherited. The default list is empty."),
41 std::vector<std::string>{}};
51 fhicl::Comment(
"Can specify 'fileType' only if it is not specified\n" 52 "in the 'metadataFromInput' list."),
58 fhicl::Comment(
"Can specify 'runType' only if it is not specified\n" 59 "in the 'metadataFromInput' list."),
90 for (
auto const& pr : coll) {
91 if (cet::search_all(sortedMdToInherit, translator(pr.first))) {
93 orderedmd_.emplace_back(pr);
107 for (
auto const& [key,
value] : fromInput) {
108 auto it = inputmd_.find(key);
109 if (it ==
cend(inputmd_)) {
111 <<
"Metadata key " << key
112 <<
" missing from list of metadata to inherit from input " 114 }
else if (it->second !=
value) {
116 <<
"The value for '" << key
117 <<
"' for the current file is: " <<
value 118 <<
", which conflicts with the value from the first input file " 120 << it->second <<
"\").\n";
127 std::unordered_map<std::string, std::string>
inputmd_;
146 std::unique_ptr<InheritedMetadata>
imd_{};
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
#define DECLARE_ART_SERVICE(svc, scope)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception