29 Gen::AddNoise::~AddNoise()
55 log->debug(
"AddNoise: using IRandom: \"{}\", IChannelSpectrum: \"{}\"",
69 for (
const auto& intrace : *inframe->traces()) {
70 int chid = intrace->channel();
71 const auto& spec = (*m_model)(chid);
76 auto trace = make_shared<SimpleTrace>(chid, intrace->tbin(), wave);
77 outtraces.push_back(trace);
79 outframe = make_shared<SimpleFrame>(inframe->ident(), inframe->time(),
80 outtraces, inframe->tick());
virtual void configure(const WireCell::Configuration &config)
IConfigurable.
virtual bool operator()(const input_pointer &inframe, output_pointer &outframe)
IFrameFilter.
std::vector< pointer > vector
std::shared_ptr< const IFrame > input_pointer
IChannelSpectrum::pointer m_model
WireCell::Waveform::realseq_t generate_waveform(const std::vector< float > &spec, IRandom::pointer rng, double replace=0.02)
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
std::shared_ptr< const IFrame > output_pointer
logptr_t logger(std::string name)
void log(source_loc source, level::level_enum lvl, const char *fmt, const Args &...args)
WIRECELL_FACTORY(AddNoise, WireCell::Gen::AddNoise, WireCell::IFrameFilter, WireCell::IConfigurable) using namespace std
Json::Value Configuration