21 : m_cfg(default_configuration())
25 ConfigDumper::~ConfigDumper()
38 cfg[
"filename"] =
"/dev/stdout";
39 cfg[
"components"] = Json::arrayValue;
48 std::vector<std::string> comps;
49 for (
auto jone :
m_cfg[
"components"]) {
50 comps.push_back(jone.asString());
53 comps = Factory::known_types<IConfigurable>();
56 for (
auto c : comps) {
63 auto cfgobj = Factory::lookup<IConfigurable>(
type,
name);
64 cfg = cfgobj->default_configuration();
67 warn(
"failed lookup component: \"{}\":\"{}\"", type, name);
71 cm.
add(cfg, type, name);
std::pair< std::string, std::string > parse_pair(const std::string &in, const std::string &delim=":")
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
Configuration all() const
Return top-level, aggregate configuration.
virtual void execute()
Implement to run something.
int add(Configuration &cfg)
virtual void configure(const WireCell::Configuration &config)
Accept a configuration.
WireCell::Configuration m_cfg
Json::Value Configuration
void dump(const IFrame::pointer frame)
#define WIRECELL_FACTORY(NAME, CONCRETE,...)