FieldResponse.cxx
Go to the documentation of this file.
3 
5 
6 WIRECELL_FACTORY(FieldResponse,
9 
10 using namespace WireCell;
11 
12 
13 
14 SigProc::FieldResponse::FieldResponse(const char* frfilename)
15  : m_fname(frfilename)
16 {
17 }
18 
19 SigProc::FieldResponse::~FieldResponse()
20 {
21 }
22 
23 
24 WireCell::Configuration SigProc::FieldResponse::default_configuration() const
25 {
27  cfg["filename"] = m_fname;
28  return cfg;
29 }
30 
32 {
33  m_fname = get(cfg, "filename", m_fname);
34  if (m_fname.empty()) {
35  THROW(ValueError() << errmsg{"must give field response filename"});
36  }
37  m_fr = Response::Schema::load(m_fname.c_str());
38 }
39 
40 
41 
42 const Response::Schema::FieldResponse& SigProc::FieldResponse::field_response() const
43 {
44  return m_fr;
45 }
WIRECELL_FACTORY(FieldResponse, WireCell::SigProc::FieldResponse, WireCell::IFieldResponse, WireCell::IConfigurable) using namespace WireCell
boost::error_info< struct tag_errmsg, std::string > errmsg
Definition: Exceptions.h:54
cfg
Definition: dbjson.py:29
def configure(cfg)
Definition: cuda.py:34
#define THROW(e)
Definition: Exceptions.h:25
Thrown when a wrong value has been encountered.
Definition: Exceptions.h:37
Definition: Main.h:22
Json::Value Configuration
Definition: Configuration.h:50
Hold info about multiple plane responses in the detector.
Definition: Response.h:75
def load(filename, jpath="depos")
Definition: depos.py:34