LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 "cetlib/filepath_maker.h"
10 #include "sqlite3.h"
11 
12 namespace fhicl {
13  // Given a ParameterSet, return two vectors of strings:
14  //
15  // records: will contain the "database form" of top, and of all
16  // nested ParameterSets.
17  //
18  // hashes: will contain the (string form) of the hash for each
19  // ParameterSet in 'records', in the same order.
21  std::vector<std::string>& records,
22  std::vector<std::string>& hashes);
23 
24  // Read the file 'filename', creating a ParameterSet, and then call
25  // decompose_parameterset using that ParameterSet.
26  void decompose_fhicl(std::string const& filename,
27  std::vector<std::string>& records,
28  std::vector<std::string>& hashes);
29 
30  // Read the file 'filename', creating a ParameterSet, and then fill
31  // the given empty sqlite3 database with all the ParameterSets created
32  // by the parsing.
33  void parse_file_and_fill_db(std::string const& filename, sqlite3* db);
34 }
35 
36 #endif /* fhiclcpp_DatabaseSupport_h */
37 
38 // Local Variables:
39 // mode: c++
40 // 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)