14 #include "WireCellApps/Main.h" 15 #include "WireCellUtil/String.h" 16 #include "WireCellUtil/Logging.h" 18 #include "WireCellUtil/NamedFactory.h" 44 "\nThey are located w.r.t. the WCT load path.") };
46 fhicl::Comment(
"List of one or more WCT application objects to execute.")};
49 "They are located w.r.t. the OS library load path")};
52 fhicl::Comment(
"Optional list of file system paths to add to the WCT " 53 "configuration file load path." 54 "\nThis augments the WIRECELL_PATH environment variable.")};
56 fhicl::Comment(
"Optional table giving external variables to inject into WCT configuration.")};
58 fhicl::Comment(
"Optional table giving external Jsonnet code to inject into WCT configuration.")};
62 fhicl::Comment(
"List of WCT components which act as WCT sources.\n" 63 "They are called before WCT executes on each Art Event object") };
66 "They are called after WCT executes on each Art Event object.") };
70 "Eg the strings 'stdout', 'stderr' or a file name.\n" 71 "An optional log level may be appended with ':<level>'.") };
74 "Specify as '<logger>:<level>' or as just '<level>' for default.") };
87 for (
auto iaev : m_outputers) {
88 iaev->produces(collector);
106 const auto& wclscfg = params();
109 if (wclscfg.logsinks(slist)) {
110 for (
auto logsink : slist) {
113 if (ls.size() == 2) {
122 if (wclscfg.loglevels(slist)) {
123 for (
auto loglevel : slist) {
126 if (ll.size() == 2) {
127 m_wcmain.set_loglevel(ll[0], ll[1]);
135 WireCell::Log::set_pattern(
"[%H:%M:%S.%03e] %L [%^%=8n%$] %v");
141 for (
auto cfg : wclscfg.configs()) {
145 for (
auto app : wclscfg.apps()) {
149 for (
auto plugin : wclscfg.plugins()) {
155 if (wclscfg.paths(slist)) {
156 for (
auto path : slist) {
165 if (wclscfg.params.get_if_present(wcps)) {
174 if (wclscfg.structs.get_if_present(wcps)) {
187 std::cerr <<
"Wire Cell Toolkit threw an exception\n";
188 auto msg = errstr(e);
195 if (wclscfg.inputers(slist)) {
196 for (
auto inputer : slist) {
197 auto iaev = WireCell::Factory::find_tn<IArtEventVisitor>(inputer);
199 std::cerr <<
"Inputer: \"" << inputer <<
"\"\n";
203 if (wclscfg.outputers(slist)) {
204 for (
auto outputer : slist) {
205 auto iaev = WireCell::Factory::find_tn<IArtEventVisitor>(outputer);
207 std::cerr <<
"Outputer: \"" << outputer <<
"\"\n";
wcls::IArtEventVisitor::vector m_outputers
fhicl::OptionalSequence< std::string > optional_string_list_t
void msg(const char *fmt,...)
std::array< tt::return_type< std::string >,-1ull > value_type
std::set< std::string > operator()()
fhicl::Sequence< std::string > string_list_t
ChannelGroupService::Name Name
void produces(art::ProducesCollector &collector)
T get(std::string const &key) const
fhicl::OptionalDelegatedParameter generic_pset_t
void process(art::Event &event)
Accept an event to process.
static constexpr double ps
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
wcls::IArtEventVisitor::vector m_inputers
std::vector< std::string > get_names() const
WCLS(Parameters const &ps)
void split(std::string const &s, char c, OutIter dest)
cet::coded_exception< error, detail::translate > exception
QTextStream & endl(QTextStream &s)
Event finding and building.