Namespaces | Classes | Typedefs | Enumerations | Functions
fhicl Namespace Reference

Namespaces

 comment_detail
 
 detail
 
 has_insertion_operator_impl
 
 sequence_detail
 
 tuple_detail
 

Classes

struct  ass_parser
 
class  Atom
 
struct  bin_parser
 
struct  binding_parser
 
struct  Comment
 
struct  CondConfig
 
class  ConfigurationTable
 
struct  dbid_parser
 
class  DelegatedParameter
 
struct  dss_parser
 
class  extended_value
 
struct  has_insertion_operator
 
struct  hex_parser
 
class  intermediate_table
 
class  KeyMap
 
struct  KeysToIgnore
 
struct  MaybeUseFunction
 
struct  Name
 
class  NameStackRegistry
 
struct  NoInsert
 
class  OptionalAtom
 
class  OptionalDelegatedParameter
 
class  OptionalSequence
 
class  OptionalSequence< T,-1ull >
 
class  OptionalTable
 
class  OptionalTableAs
 
class  OptionalTuple
 
class  OptionalTupleAs
 
class  OptionalTupleAs< T(ARGS...)>
 
class  ParameterSet
 
class  ParameterSetID
 
class  ParameterSetRegistry
 
class  ParameterSetWalker
 
class  Printer
 
class  PrinterFor
 
class  PrinterForTypes
 
struct  real_parser
 
class  Sequence
 
class  Sequence< T,-1ull >
 
class  SHA1
 
class  Table
 
class  TableAs
 
class  TableFragment
 
class  Tuple
 
class  TupleAs
 
class  TupleAs< T(ARGS...)>
 
struct  uint_parser
 
class  Vec
 
class  WrappedTable
 
struct  YesInsert
 

Typedefs

using exception = cet::coded_exception< error, detail::translate >
 
template<typename T >
using NullaryConfigPredicate_t = bool(T::*)() const
 

Enumerations

enum  error {
  cant_find, cant_happen, cant_insert, number_is_too_large,
  parse_error, type_mismatch, protection_violation, cant_open_db,
  sql_error, unimplemented, other
}
 
enum  value_tag {
  UNKNOWN, NIL, BOOL, NUMBER,
  COMPLEX, STRING, SEQUENCE, TABLE,
  TABLEID
}
 
enum  Protection : unsigned char { Protection::NONE, Protection::PROTECT_IGNORE, Protection::PROTECT_ERROR }
 
enum  par_type {
  par_type::ATOM, par_type::TABLE, par_type::SEQ_VECTOR, par_type::SEQ_ARRAY,
  par_type::TUPLE, par_type::DELEGATE, par_type::NTYPES
}
 
enum  par_style {
  par_style::REQUIRED, par_style::REQUIRED_CONDITIONAL, par_style::DEFAULT, par_style::DEFAULT_CONDITIONAL,
  par_style::OPTIONAL, par_style::OPTIONAL_CONDITIONAL, par_style::NTYPES
}
 

Functions

void decompose_parameterset (fhicl::ParameterSet const &top, std::vector< std::string > &records, std::vector< std::string > &hashes)
 
void decompose_fhicl (std::string const &filename, std::vector< std::string > &records, std::vector< std::string > &hashes)
 
void parse_file_and_fill_db (std::string const &filename, sqlite3 *db)
 
void make_ParameterSet (intermediate_table const &tbl, ParameterSet &ps)
 
void make_ParameterSet (extended_value const &xval, ParameterSet &ps)
 
void make_ParameterSet (std::string const &str, ParameterSet &ps)
 
void make_ParameterSet (std::string const &filename, cet::filepath_maker &maker, ParameterSet &ps)
 
std::ostream & operator<< (std::ostream &, ParameterSetID const &)
 
bool parse_value_string (std::string const &s, extended_value &v, std::string &unparsed)
 
intermediate_table parse_document (std::string const &filename, cet::filepath_maker &maker)
 
intermediate_table parse_document (std::istream &is, cet::filepath_maker &maker)
 
intermediate_table parse_document (std::string const &s)
 
std::string to_string (Protection p)
 
std::ostream & boost_test_print_type (std::ostream &os, ParameterSet const &pset)
 
std::ostream & boost_test_print_type (std::ostream &os, Protection const protection)
 
std::ostream & operator<< (std::ostream &os, Vec const &v)
 
bool maximally_munched (char const ch)
 
bool maximally_munched_number (char const ch)
 
bool maximally_munched_ass (char const ch)
 
bool maximally_munched_dss (char const ch)
 
template<typename T >
std::function< bool()> use_if (T *p, NullaryConfigPredicate_t< T > f)
 
template<typename T >
std::function< bool()> use_unless (T *p, NullaryConfigPredicate_t< T > f)
 
bool is_table (par_type const pt)
 
bool is_sequence (par_type const pt)
 
bool is_atom (par_type const pt)
 
std::string get_regex_replace_str (std::string const &str)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, OptionalTable< T > const &t)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, Table< T > const &t)
 

Detailed Description

Title: RFFHitFinderAlg Class Author: Wes Ketchum (wketc.nosp@m.hum@.nosp@m.lanl..nosp@m.gov)

Description: Class that runs the RFF HitFinder. Implements an RFFHitFitter, and takes the result and stores it in recob::Hit objects.

Input: recob::Wire Output: recob::Hit

Typedef Documentation

using fhicl::exception = typedef cet::coded_exception<error, detail::translate>

Definition at line 33 of file exception.h.

template<typename T >
using fhicl::NullaryConfigPredicate_t = typedef bool (T::*)() const

Definition at line 17 of file ConfigPredicate.h.

Enumeration Type Documentation

Enumerator
cant_find 
cant_happen 
cant_insert 
number_is_too_large 
parse_error 
type_mismatch 
protection_violation 
cant_open_db 
sql_error 
unimplemented 
other 

Definition at line 15 of file exception.h.

enum fhicl::par_style
strong
Enumerator
REQUIRED 
REQUIRED_CONDITIONAL 
DEFAULT 
DEFAULT_CONDITIONAL 
OPTIONAL 
OPTIONAL_CONDITIONAL 
NTYPES 

Definition at line 37 of file ParameterArgumentTypes.h.

enum fhicl::par_type
strong
Enumerator
ATOM 
TABLE 
SEQ_VECTOR 
SEQ_ARRAY 
TUPLE 
DELEGATE 
NTYPES 

Definition at line 8 of file ParameterArgumentTypes.h.

enum fhicl::Protection : unsigned char
strong
Enumerator
UNKNOWN 
NIL 
BOOL 
NUMBER 
COMPLEX 
STRING 
SEQUENCE 
TABLE 
TABLEID 

Definition at line 22 of file extended_value.h.

Function Documentation

std::ostream& fhicl::boost_test_print_type ( std::ostream &  os,
ParameterSet const &  pset 
)
inline

Definition at line 15 of file boost_test_print_pset.h.

16  {
17  return os << pset.to_indented_string();
18  }
std::ostream& fhicl::boost_test_print_type ( std::ostream &  os,
Protection const  protection 
)

Definition at line 20 of file parse_document_test.cc.

21  {
22  return os << to_string(protection);
23  }
Protection protection
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
void fhicl::decompose_fhicl ( std::string const &  filename,
std::vector< std::string > &  records,
std::vector< std::string > &  hashes 
)

Definition at line 8 of file DatabaseSupport.cc.

11 {
12  // Parse file into a ParameterSet.
14  auto const top = ParameterSet::make(filename, fpm);
15  decompose_parameterset(top, records, hashes);
16 }
string filename
Definition: train.py:213
void decompose_parameterset(fhicl::ParameterSet const &top, std::vector< std::string > &records, std::vector< std::string > &hashes)
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
void fhicl::decompose_parameterset ( fhicl::ParameterSet const &  top,
std::vector< std::string > &  records,
std::vector< std::string > &  hashes 
)

Definition at line 19 of file DatabaseSupport.cc.

22 {
23  assert(records.size() == hashes.size());
24 
25  // First handle the top-level ParameterSet
26  records.push_back(top.to_compact_string());
27  hashes.push_back(top.id().to_string());
28 
29  // Recurse through all parameters, dealing with ParameterSets and
30  // vectors thereof.
31  std::vector<std::string> keys = top.get_names();
32  for (auto const& key : keys) {
33  if (top.is_key_to_table(key))
34  decompose_parameterset(top.get<ParameterSet>(key), records, hashes);
35  else if (top.is_key_to_sequence(key)) {
36  try {
37  auto nestlings = top.get<std::vector<ParameterSet>>(key);
38  for (auto const& ps : nestlings)
39  decompose_parameterset(ps, records, hashes);
40  }
41  catch (fhicl::exception const&) {
42  // The vector didn't contain ParameterSets, keep going; no
43  // corrective action is needed.
44  }
45  }
46  }
47 }
void decompose_parameterset(fhicl::ParameterSet const &top, std::vector< std::string > &records, std::vector< std::string > &hashes)
def key(type, name=None)
Definition: graph.py:13
static constexpr double ps
Definition: Units.h:99
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
std::string fhicl::get_regex_replace_str ( std::string const &  str)

Definition at line 11 of file Name.cc.

12  {
13  return std::regex_replace(str, re, "\\$&");
14  }
static QCString str
bool fhicl::is_atom ( par_type const  pt)
inline

Definition at line 32 of file ParameterArgumentTypes.h.

33  {
34  return pt == par_type::ATOM;
35  }
bool fhicl::is_sequence ( par_type const  pt)
inline

Definition at line 25 of file ParameterArgumentTypes.h.

26  {
27  return pt == par_type::SEQ_VECTOR || pt == par_type::SEQ_ARRAY ||
28  pt == par_type::TUPLE;
29  }
bool fhicl::is_table ( par_type const  pt)
inline

Definition at line 19 of file ParameterArgumentTypes.h.

20  {
21  return pt == par_type::TABLE;
22  }
void fhicl::make_ParameterSet ( intermediate_table const &  tbl,
ParameterSet ps 
)

Definition at line 16 of file make_ParameterSet.cc.

17 {
18  ps = ParameterSet::make(tbl);
19 }
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
void fhicl::make_ParameterSet ( extended_value const &  xval,
ParameterSet ps 
)

Definition at line 24 of file make_ParameterSet.cc.

25 {
26  ps = ParameterSet::make(xval);
27 }
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
void fhicl::make_ParameterSet ( std::string const &  str,
ParameterSet ps 
)

Definition at line 32 of file make_ParameterSet.cc.

33 {
34  ps = ParameterSet::make(str);
35 }
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
static QCString str
void fhicl::make_ParameterSet ( std::string const &  filename,
cet::filepath_maker maker,
ParameterSet ps 
)

Definition at line 40 of file make_ParameterSet.cc.

43 {
44  ps = ParameterSet::make(filename, maker);
45 }
string filename
Definition: train.py:213
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
bool fhicl::maximally_munched ( char const  ch)
inline

Definition at line 28 of file tokens.h.

29  {
30  return !std::isgraph(ch) || ch == '#' || ch == '/' || ch == ',' ||
31  ch == ']' || ch == '}';
32  }
bool fhicl::maximally_munched_ass ( char const  ch)
inline

Definition at line 41 of file tokens.h.

42  {
43  return maximally_munched(ch) || ch == '.' || ch == '[' || ch == ':';
44  }
bool maximally_munched(char const ch)
Definition: tokens.h:28
bool fhicl::maximally_munched_dss ( char const  ch)
inline

Definition at line 47 of file tokens.h.

48  {
49  return maximally_munched(ch);
50  }
bool maximally_munched(char const ch)
Definition: tokens.h:28
bool fhicl::maximally_munched_number ( char const  ch)
inline

Definition at line 35 of file tokens.h.

36  {
37  return maximally_munched(ch) || ch == ')';
38  }
bool maximally_munched(char const ch)
Definition: tokens.h:28
ostream & fhicl::operator<< ( std::ostream &  os,
ParameterSetID const &  psid 
)

Definition at line 139 of file ParameterSetID.cc.

140 {
141  return os << psid.to_string();
142 }
std::ostream& fhicl::operator<< ( std::ostream &  os,
Vec const &  v 
)

Definition at line 29 of file CondConfig.h.

30  {
31  return os << "Half-lengths are: (" << v()[0] << ", " << v()[1] << ", "
32  << v()[2] << ")";
33  }
template<typename T >
std::ostream& fhicl::operator<< ( std::ostream &  os,
OptionalTable< T > const &  t 
)
inline

Definition at line 104 of file OptionalTable.h.

105  {
106  std::ostringstream config;
107  t.print_allowed_configuration(config);
108  return os << config.str();
109  }
static Config * config
Definition: config.cpp:1054
template<typename T >
std::ostream& fhicl::operator<< ( std::ostream &  os,
Table< T > const &  t 
)
inline

Definition at line 106 of file Table.h.

107  {
108  std::ostringstream config;
109  t.print_allowed_configuration(config);
110  return os << config.str();
111  }
static Config * config
Definition: config.cpp:1054
fhicl::intermediate_table fhicl::parse_document ( std::string const &  filename,
cet::filepath_maker maker 
)

Definition at line 720 of file parse.cc.

721 {
722  return parse_document_(cet::includer{filename, maker});
723 }
string filename
Definition: train.py:213
fhicl::intermediate_table fhicl::parse_document ( std::istream &  is,
cet::filepath_maker maker 
)

Definition at line 726 of file parse.cc.

727 {
728  return parse_document_(cet::includer(is, maker));
729 }
fhicl::intermediate_table fhicl::parse_document ( std::string const &  s)

Definition at line 732 of file parse.cc.

733 {
734  std::istringstream is{s};
736  return parse_document(is, m);
737 }
intermediate_table parse_document(std::string const &filename, cet::filepath_maker &maker)
Definition: parse.cc:720
static QCString * s
Definition: config.cpp:1042
void fhicl::parse_file_and_fill_db ( std::string const &  filename,
sqlite3 db 
)

Definition at line 50 of file DatabaseSupport.cc.

51 {
53  auto const top = ParameterSet::make(filename, fpm);
56 }
static ParameterSetID const & put(ParameterSet const &ps)
string filename
Definition: train.py:213
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
static void exportTo(sqlite3 *db)
bool fhicl::parse_value_string ( std::string const &  s,
extended_value v,
std::string unparsed 
)

Definition at line 669 of file parse.cc.

672 {
673  using ws_t = qi::rule<FwdIter>;
674  ws_t whitespace = space | lit('#') >> *(char_ - eol) >> eol |
675  lit("//") >> *(char_ - eol) >> eol;
676  value_parser<ws_t> p;
677  auto begin = s.begin();
678  auto const end = s.end();
679  bool const b =
680  qi::phrase_parse(begin, end, p >> *whitespace, whitespace, result) &&
681  begin == end;
683  return b;
684 } // parse_value_string()
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
static QCString result
std::string string
Definition: nybbler.cc:12
auto lit(char arg)
Definition: parse_shims.h:11
#define eol
p
Definition: test.py:223
static bool * b
Definition: config.cpp:1043
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
static QCString * s
Definition: config.cpp:1042
std::string fhicl::to_string ( Protection  p)

Definition at line 4 of file Protection.cc.

5 {
7  switch (p) {
8  case Protection::NONE:
9  result = "NONE";
10  break;
11  case Protection::PROTECT_IGNORE:
12  result = "PROTECT_IGNORE";
13  break;
14  case Protection::PROTECT_ERROR:
15  result = "PROTECT_ERROR";
16  break;
17  }
18  return result;
19 }
static QCString result
std::string string
Definition: nybbler.cc:12
p
Definition: test.py:223
template<typename T >
std::function<bool()> fhicl::use_if ( T *  p,
NullaryConfigPredicate_t< T >  f 
)

Definition at line 21 of file ConfigPredicate.h.

22  {
23  return [p, f]() { return (p->*f)(); };
24  }
p
Definition: test.py:223
template<typename T >
std::function<bool()> fhicl::use_unless ( T *  p,
NullaryConfigPredicate_t< T >  f 
)

Definition at line 28 of file ConfigPredicate.h.

29  {
30  return [p, f]() { return !(p->*f)(); };
31  }
p
Definition: test.py:223