30 const std::string& name,
31 const IInterface* parent )
35 declareProperty (
"Flags",
m_flags,
36 "Specify variables to fill.\n\
37This is a collection of strings of the form FLAG:VAR:DOCSTRING.\n\
38FLAG is the name of the flag to fill.\n\
39VAR is the name of the D3PD variable to fill. If left empty,\n\
40FLAG will be used as the variable name.\n\
41DOCSTRING is the documentation string to use for this variable.");
44 "If set, this names a variable to be set to true\n\
45if any flags in this block are true.");
55 for (
const std::string& s :
m_flags) {
57 std::string::size_type ipos = s.find (
':');
58 var.key = s.substr (0, ipos);
60 std::string docstring;
61 if (ipos != std::string::npos) {
63 std::string::size_type jpos = s.find (
':', ipos);
64 if (jpos != std::string::npos) {
65 varname = s.substr (ipos, jpos-ipos);
66 docstring = s.substr (jpos+1);
69 varname = s.substr (ipos);
74 m_vars.push_back (std::move(var));
81 "True if any flags in this block were true.") );
83 return StatusCode::SUCCESS;
99 if (s->isAccepted() && s->getName() == v.key) {
108 return StatusCode::SUCCESS;
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Block filler tool for noisy FEB information.