14 : m_multiplicity(multiplicity)
18 Gen::FrameFanout::~FrameFanout()
26 cfg[
"multiplicity"] = (
int)m_multiplicity;
32 cfg[
"tag_rules"] = Json::arrayValue;
37 int m = get<int>(
cfg,
"multiplicity", (
int)m_multiplicity);
43 m_ft.configure(cfg[
"tag_rules"]);
47 std::vector<std::string> Gen::FrameFanout::output_types()
50 std::vector<std::string> ret(m_multiplicity, tname);
57 outv.resize(m_multiplicity);
60 for (
size_t ind=0; ind<m_multiplicity; ++ind) {
63 log->debug(
"FrameFanout: see EOS");
67 auto fintags = in->frame_tags();
70 fintags.push_back(
"");
73 std::stringstream taginfo;
75 for (
size_t ind=0; ind<m_multiplicity; ++ind) {
78 auto sfout =
new SimpleFrame(in->ident(), in->time(), *in->traces(), in->tick());
81 auto fouttags = m_ft.transform(ind,
"frame", fintags);
83 for (
auto ftag : fouttags) {
85 taginfo <<
" ftag:" << ftag;
88 for (
auto inttag : in->trace_tags()) {
90 if (touttags.empty()) {
93 const auto& traces = in->tagged_traces(inttag);
94 const auto&
summary = in->trace_summary(inttag);
95 for (
auto otag : touttags) {
96 sfout->tag_traces(otag, traces,
summary);
97 taginfo <<
" " << inttag <<
"->" << otag;
105 if (!tagmsg.empty()) {
106 log->debug(
"FrameFanout: tagnifo:{}", taginfo.str());
std::unordered_set< tag_t > tagset_t
boost::error_info< struct tag_errmsg, std::string > errmsg
void tag_frame(const tag_t &tag)
std::vector< output_pointer > output_vector
logptr_t logger(std::string name)
Thrown when a wrong value has been encountered.
void log(source_loc source, level::level_enum lvl, const char *fmt, const Args &...args)
std::shared_ptr< const IFrame > input_pointer
Json::Value Configuration
WIRECELL_FACTORY(FrameFanout, WireCell::Gen::FrameFanout, WireCell::IFrameFanout, WireCell::IConfigurable) using namespace WireCell
const GenericPointer< typename T::ValueType > & pointer