LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
DatabaseSupport.h
Go to the documentation of this file.
1 #ifndef fhiclcpp_DatabaseSupport_h
2 #define fhiclcpp_DatabaseSupport_h
3 
4 #include <string>
5 #include <vector>
6 
7 #include "fhiclcpp/fwd.h"
8 
9 struct sqlite3;
10 
11 namespace fhicl {
12  // Given a ParameterSet, return two vectors of strings:
13  //
14  // records: will contain the "database form" of top, and of all
15  // nested ParameterSets.
16  //
17  // hashes: will contain the (string form) of the hash for each
18  // ParameterSet in 'records', in the same order.
20  std::vector<std::string>& records,
21  std::vector<std::string>& hashes);
22 
23  // Read the file 'filename', creating a ParameterSet, and then call
24  // decompose_parameterset using that ParameterSet.
25  void decompose_fhicl(std::string const& filename,
26  std::vector<std::string>& records,
27  std::vector<std::string>& hashes);
28 
29  // Read the file 'filename', creating a ParameterSet, and then fill
30  // the given empty sqlite3 database with all the ParameterSets created
31  // by the parsing.
32  void parse_file_and_fill_db(std::string const& filename, sqlite3* db);
33 }
34 
35 #endif /* fhiclcpp_DatabaseSupport_h */
36 
37 // Local Variables:
38 // mode: c++
39 // End:
void parse_file_and_fill_db(std::string const &filename, sqlite3 *db)
void decompose_parameterset(fhicl::ParameterSet const &top, std::vector< std::string > &records, std::vector< std::string > &hashes)
parameter set interface
void decompose_fhicl(std::string const &filename, std::vector< std::string > &records, std::vector< std::string > &hashes)