13 : m_drifter_tn(drifter)
18 Gen::DepoFramer::~DepoFramer()
26 put(cfg,
"Drifter", m_drifter_tn);
27 put(cfg,
"Ductor", m_ductor_tn);
33 m_drifter = Factory::find_tn<IDrifter>(
get(
cfg,
"Drifter", m_drifter_tn));
34 m_ductor = Factory::find_tn<IDuctor>(
get(
cfg,
"Ductor", m_ductor_tn));
42 const int ident = in->ident();
45 auto sdepos = in->depos();
46 std::vector<IDepo::pointer>
depos(sdepos->begin(), sdepos->end()), drifted;
48 depos.push_back(
nullptr);
51 for (
auto depo :
depos) {
53 (*m_drifter)(depo, dq);
60 std::cerr <<
"Gen::DepoFramer: warning: failed to get null on last drifted depo\n";
61 drifted.push_back(
nullptr);
66 std::vector<IFrame::pointer> partial_frames;
68 for (
auto drifted_depo : drifted) {
70 (*m_ductor)(drifted_depo, frames);
71 for (
auto f : frames) {
72 partial_frames.push_back(
f);
76 out =
Gen::sum(partial_frames, ident);
WIRECELL_FACTORY(DepoFramer, WireCell::Gen::DepoFramer, WireCell::IDepoFramer, WireCell::IConfigurable) using namespace WireCell
void put(Configuration &cfg, const std::string &dotpath, const T &val)
Put value in configuration at the dotted path.
std::deque< output_pointer > output_queue
std::shared_ptr< const IDepoSet > input_pointer
std::shared_ptr< const IFrame > output_pointer
IFrame::pointer sum(std::vector< IFrame::pointer > frames, int ident)
bool descending_time(const WireCell::IDepo::pointer &lhs, const WireCell::IDepo::pointer &rhs)
Compare two IDepo::pointers for by time, descending. x is used to break tie.
Json::Value Configuration