LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
ValidateThenSet.h
Go to the documentation of this file.
1 #ifndef fhiclcpp_types_detail_ValidateThenSet_h
2 #define fhiclcpp_types_detail_ValidateThenSet_h
3 
4 #include "cetlib/exempt_ptr.h"
8 
9 #include <set>
10 #include <string>
11 #include <vector>
12 
13 namespace fhicl {
14  namespace detail {
15 
17  : public ParameterWalker<tt::const_flavor::require_non_const> {
18  public:
20  std::set<std::string> const& keysToIgnore)
21  : pset_{pset}
22  , ignorableKeys_{keysToIgnore}
23  , userKeys_{pset.get_all_keys()}
25  {
26  cet::sort_all(userKeys_);
27  }
28 
29  void check_keys();
30 
31  private:
32  bool before_action(ParameterBase& p) override;
33  void after_action(ParameterBase& p) override;
34  void enter_sequence(SequenceBase& p) override;
35  void delegated_parameter(DelegateBase&) override;
36 
37  void
39  {}
40  void
41  atom(AtomBase&) override
42  {}
43 
45  std::set<std::string> ignorableKeys_;
46  std::vector<std::string> userKeys_;
47  std::vector<cet::exempt_ptr<ParameterBase>> missingParameters_;
48  };
49  }
50 }
51 
52 #endif /* fhiclcpp_types_detail_ValidateThenSet_h */
53 
54 // Local variables:
55 // mode: c++
56 // End:
void enter_sequence(SequenceBase &p) override
void enter_table(TableBase &) override
std::set< std::string > ignorableKeys_
std::vector< std::string > userKeys_
ParameterSet const & pset_
parameter set interface
void delegated_parameter(DelegateBase &) override
std::vector< cet::exempt_ptr< ParameterBase > > missingParameters_
void atom(AtomBase &) override
void after_action(ParameterBase &p) override
bool before_action(ParameterBase &p) override
ValidateThenSet(fhicl::ParameterSet const &pset, std::set< std::string > const &keysToIgnore)