41 #include "WireCellUtil/NamedFactory.h" 50 : OmniChannelNoiseDB()
51 , m_bad_channel_policy(kNothing)
52 , m_misconfig_channel_policy(kNothing)
69 auto const& gc = *lar::providerFrom<geo::Geometry>();
70 auto nchans = gc.Nchannels();
76 std::vector<int> bad_channels;
77 for(
size_t ich=0; ich<nchans; ++ich) {
78 if (csvc.IsBad(ich)) {
79 bad_channels.push_back(ich);
82 OmniChannelNoiseDB::set_bad_channels(bad_channels);
88 std::vector<int> mc_channels;
89 for(
size_t ich=0; ich<nchans; ++ich) {
90 if (esvc.ExtraInfo(ich).GetBoolData(
"is_misconfigured")) {
91 mc_channels.push_back(ich);
102 THROW(ValueError() << errmsg{
"ChannelNoiseDB: empty override policy given"});
107 if (pol ==
"union") {
111 if (pol ==
"replace") {
115 THROW(ValueError() << errmsg{
"ChannelNoiseDB: unknown override policy given: " + pol});
121 OmniChannelNoiseDB::configure(cfg);
123 auto jbc = cfg[
"bad_channel"];
128 auto jmc = cfg[
"misconfig_channel"];
133 m_fgstgs[0] = jmc[
"from"][
"gain"].asDouble();
134 m_fgstgs[1] = jmc[
"from"][
"shaping"].asDouble();
135 m_fgstgs[2] = jmc[
"to"][
"gain"].asDouble();
136 m_fgstgs[3] = jmc[
"to"][
"shaping"].asDouble();
OverridePolicy_t m_bad_channel_policy
virtual void configure(const WireCell::Configuration &config)
IConfigurable.
OverridePolicy_t m_misconfig_channel_policy
virtual ~ChannelNoiseDB()
art framework interface to geometry description
OverridePolicy_t
All IChannelNoiseDatabase interface is defered to parent.
Interface for experiment-specific service for pmt gain info.
OverridePolicy_t parse_policy(const WireCell::Configuration &jpol)
WIRECELL_FACTORY(wclsChannelNoiseDB, wcls::ChannelNoiseDB, wcls::IArtEventVisitor, WireCell::IChannelNoiseDatabase) using namespace WireCell
Interface for experiment-specific channel quality info provider.
Interface for experiment-specific service for channel quality info.
virtual void visit(art::Event &event)
IArtEventVisitor.
Event finding and building.