Public Member Functions | Private Attributes | List of all members
WireCell::SigProc::Protodune::RelGainCalib Class Reference

#include <Protodune.h>

Inheritance diagram for WireCell::SigProc::Protodune::RelGainCalib:
WireCell::IChannelFilter WireCell::IConfigurable WireCell::IComponent< IChannelFilter > WireCell::IComponent< IConfigurable > WireCell::Interface WireCell::Interface

Public Member Functions

 RelGainCalib (const std::string &anode_tn="AnodePlane", const std::string &noisedb="OmniChannelNoiseDB", float gain_def=1.0, float gain_min_cut=0.8, float gain_max_cut=1.25)
 
virtual ~RelGainCalib ()
 
virtual WireCell::Waveform::ChannelMaskMap apply (int channel, signal_t &sig) const
 
virtual WireCell::Waveform::ChannelMaskMap apply (channel_signals_t &chansig) const
 
virtual void configure (const WireCell::Configuration &config)
 Accept a configuration. More...
 
virtual WireCell::Configuration default_configuration () const
 Optional, override to return a hard-coded default configuration. More...
 
- Public Member Functions inherited from WireCell::IChannelFilter
virtual ~IChannelFilter ()
 
- Public Member Functions inherited from WireCell::IComponent< IChannelFilter >
virtual ~IComponent ()
 
- Public Member Functions inherited from WireCell::Interface
virtual ~Interface ()
 
- Public Member Functions inherited from WireCell::IConfigurable
virtual ~IConfigurable ()
 
- Public Member Functions inherited from WireCell::IComponent< IConfigurable >
virtual ~IComponent ()
 

Private Attributes

std::string m_anode_tn
 
std::string m_noisedb_tn
 
IAnodePlane::pointer m_anode
 
IChannelNoiseDatabase::pointer m_noisedb
 
float m_gain_def
 
float m_gain_min_cut
 
float m_gain_max_cut
 
std::vector< float > m_rel_gain
 

Additional Inherited Members

- Public Types inherited from WireCell::IChannelFilter
typedef Waveform::realseq_t signal_t
 
typedef std::map< int, signal_tchannel_signals_t
 
- Public Types inherited from WireCell::IComponent< IChannelFilter >
typedef std::shared_ptr< IChannelFilterpointer
 Access subclass facet by pointer. More...
 
typedef std::vector< pointervector
 Vector of shared pointers. More...
 
- Public Types inherited from WireCell::Interface
typedef std::shared_ptr< Interfacepointer
 
- Public Types inherited from WireCell::IComponent< IConfigurable >
typedef std::shared_ptr< IConfigurablepointer
 Access subclass facet by pointer. More...
 
typedef std::vector< pointervector
 Vector of shared pointers. More...
 

Detailed Description

Definition at line 120 of file Protodune.h.

Constructor & Destructor Documentation

Protodune::RelGainCalib::RelGainCalib ( const std::string anode_tn = "AnodePlane",
const std::string noisedb = "OmniChannelNoiseDB",
float  gain_def = 1.0,
float  gain_min_cut = 0.8,
float  gain_max_cut = 1.25 
)

Definition at line 1034 of file Protodune.cxx.

1036  : m_anode_tn(anode)
1037  , m_noisedb_tn(noisedb)
1038  , m_gain_def(gain_def)
1039  , m_gain_min_cut(gain_min_cut)
1040  , m_gain_max_cut(gain_max_cut)
1041 {
1042 }
Protodune::RelGainCalib::~RelGainCalib ( )
virtual

Definition at line 1043 of file Protodune.cxx.

1044 {
1045 }

Member Function Documentation

virtual WireCell::Waveform::ChannelMaskMap WireCell::SigProc::Protodune::RelGainCalib::apply ( int  channel,
signal_t sig 
) const
virtual

Filter in place the signal sig from given channel.

Implements WireCell::IChannelFilter.

virtual WireCell::Waveform::ChannelMaskMap WireCell::SigProc::Protodune::RelGainCalib::apply ( channel_signals_t chansig) const
virtual

Filter in place a group of signals together.

Implements WireCell::IChannelFilter.

void Protodune::RelGainCalib::configure ( const WireCell::Configuration config)
virtual

Accept a configuration.

Implements WireCell::IConfigurable.

Definition at line 1047 of file Protodune.cxx.

1048 {
1049  m_anode_tn = get(cfg, "anode", m_anode_tn);
1050  m_anode = Factory::find_tn<IAnodePlane>(m_anode_tn);
1051  if (!m_anode) {
1052  THROW(KeyError() << errmsg{"failed to get IAnodePlane: " + m_anode_tn});
1053  }
1054 
1055  m_noisedb_tn = get(cfg, "noisedb", m_noisedb_tn);
1056  m_noisedb = Factory::find_tn<IChannelNoiseDatabase>(m_noisedb_tn);
1057 
1058  if (cfg.isMember("gain_def")) {
1059  m_gain_def = get(cfg, "gain_def", m_gain_def);
1060  }
1061 
1062  if (cfg.isMember("gain_min_cut")){
1063  m_gain_min_cut = get(cfg, "gain_min_cut", m_gain_min_cut);
1064  }
1065 
1066  if (cfg.isMember("gain_max_cut")){
1067  m_gain_max_cut = get(cfg, "gain_max_cut", m_gain_max_cut);
1068  }
1069 
1070  m_rel_gain.clear();
1071  for (auto jch : cfg["rel_gain"]) {
1072  m_rel_gain.push_back(jch.asDouble());
1073  }
1074 
1075 }
boost::error_info< struct tag_errmsg, std::string > errmsg
Definition: Exceptions.h:54
cfg
Definition: dbjson.py:29
IChannelNoiseDatabase::pointer m_noisedb
Definition: Protodune.h:145
#define THROW(e)
Definition: Exceptions.h:25
WireCell::Configuration Protodune::RelGainCalib::default_configuration ( ) const
virtual

Optional, override to return a hard-coded default configuration.

Reimplemented from WireCell::IConfigurable.

Definition at line 1076 of file Protodune.cxx.

1077 {
1079  cfg["anode"] = m_anode_tn;
1080  cfg["noisedb"] = m_noisedb_tn;
1081  cfg["gain_def"] = m_gain_def;
1082  cfg["gain_min_cut"] = m_gain_min_cut;
1083  cfg["gain_max_cut"] = m_gain_max_cut;
1084  return cfg;
1085 }
cfg
Definition: dbjson.py:29
Json::Value Configuration
Definition: Configuration.h:50

Member Data Documentation

IAnodePlane::pointer WireCell::SigProc::Protodune::RelGainCalib::m_anode
private

Definition at line 144 of file Protodune.h.

std::string WireCell::SigProc::Protodune::RelGainCalib::m_anode_tn
private

Definition at line 143 of file Protodune.h.

float WireCell::SigProc::Protodune::RelGainCalib::m_gain_def
private

Definition at line 147 of file Protodune.h.

float WireCell::SigProc::Protodune::RelGainCalib::m_gain_max_cut
private

Definition at line 149 of file Protodune.h.

float WireCell::SigProc::Protodune::RelGainCalib::m_gain_min_cut
private

Definition at line 148 of file Protodune.h.

IChannelNoiseDatabase::pointer WireCell::SigProc::Protodune::RelGainCalib::m_noisedb
private

Definition at line 145 of file Protodune.h.

std::string WireCell::SigProc::Protodune::RelGainCalib::m_noisedb_tn
private

Definition at line 143 of file Protodune.h.

std::vector<float> WireCell::SigProc::Protodune::RelGainCalib::m_rel_gain
private

Definition at line 151 of file Protodune.h.


The documentation for this class was generated from the following files: