MetadataManager.h
Go to the documentation of this file.
1 #ifndef METADATAMANAGER_H
2 #define METADATAMANAGER_H
3 
5 
6 #include <map>
7 #include <string>
8 #include <vector>
9 
10 namespace meta {
11 
13 
14  public:
16  static MetadataManager instance;
17  return instance;
18  }
19 
22  void DoParsing(fhicl::ParameterSet const & pset);
23 
24  /// Determines if a key came from the parameter set or was inherited
25  std::vector<std::string>& GetKeys() { return fKeys; }
26 
27  std::map< std::string, std::string >& GetMetadata();
28 
29  private:
32  void operator=(MetadataManager const&);
33 
34  /// Descends through parameter set constructing fully qualified keys
35  void ParsePSet(std::string key, fhicl::ParameterSet const & pset);
38 
39  std::vector<std::string> fKeys;
40  std::map< std::string, std::string > fPSetMetaMap;
41  std::map< std::string, std::string > fMetaMap;
42  std::map< std::string, std::string > fHighPrioMetaMap;
43 
44  };
45 } // end namespace meta
46 #endif
47 ///////////////////////////////////////////////////////////////////////
std::string ToLower(std::string str)
std::map< std::string, std::string > fPSetMetaMap
std::string CleanWhiteSpace(std::string str)
static MetadataManager & getInstance()
std::vector< std::string > & GetKeys()
Determines if a key came from the parameter set or was inherited.
std::map< std::string, std::string > & GetMetadata()
void operator=(MetadataManager const &)
const XML_Char int const XML_Char * value
Definition: expat.h:331
std::map< std::string, std::string > fMetaMap
std::vector< std::string > fKeys
Class for parsing *.fcl files for their metadata information.
void AddMetadataHighPrio(std::string key, std::string value)
void AddMetadata(std::string key, std::string value)
void ParsePSet(std::string key, fhicl::ParameterSet const &pset)
Descends through parameter set constructing fully qualified keys.
std::map< std::string, std::string > fHighPrioMetaMap
void DoParsing(fhicl::ParameterSet const &pset)
enum BeamMode string