35 for (
int chid=0; chid<10; ++chid) {
40 for (
int chid=11; chid<=14; ++chid) {
49 pm.
add(
"WireCellGen");
51 auto cs = Factory::lookup<IChannelStatus>(
"StaticChannelStatus");
52 auto cscfg = Factory::lookup<IConfigurable>(
"StaticChannelStatus");
57 cfg[
"deviants"] = Json::arrayValue;
58 for (
auto it : deviants) {
60 jone[
"chid"] = it.first;
61 jone[
"gain"] = it.second.gain;
62 jone[
"shaping"] = it.second.shaping;
63 cfg[
"deviants"].append(jone);
65 cscfg->configure(cfg);
67 for (
int chid=0; chid<10; ++chid) {
72 for (
int chid=11; chid<=14; ++chid) {
77 Assert(
cs->preamp_gain(chid) == deviants[chid].gain);
78 Assert(
cs->preamp_shaping(chid) == deviants[chid].shaping);
const double other_shaping
const std::string instance
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
virtual double preamp_gain(int chid) const
std::unordered_map< int, ChannelStatus > channel_status_map_t
const double nominal_shaping
virtual double preamp_shaping(int chid) const
Json::Value Configuration
Plugin * add(const std::string &plugin_name, const std::string &libname="")
Add a plugin. If libname is not given, try to derive it.
const double nominal_gain
Gen::StaticChannelStatus::channel_status_map_t make_deviants()