#include <JsonDepoSource.h>
|
typedef std::shared_ptr< IDepoSource > | pointer |
|
typedef IDepo | output_type |
|
typedef ISourceNode< IDepo > | signature_type |
|
typedef std::shared_ptr< signature_type > | pointer |
|
typedef std::shared_ptr< const IDepo > | output_pointer |
|
typedef std::shared_ptr< ISourceNodeBase > | pointer |
|
enum | NodeCategory {
unknown,
sourceNode,
sinkNode,
functionNode,
queuedoutNode,
joinNode,
splitNode,
faninNode,
fanoutNode,
multioutNode,
hydraNode
} |
|
typedef std::shared_ptr< INode > | pointer |
| Access subclass facet by pointer. More...
|
|
typedef std::vector< pointer > | vector |
| Vector of shared pointers. More...
|
|
typedef std::shared_ptr< Interface > | pointer |
|
typedef std::shared_ptr< IConfigurable > | pointer |
| Access subclass facet by pointer. More...
|
|
typedef std::vector< pointer > | vector |
| Vector of shared pointers. More...
|
|
Definition at line 28 of file JsonDepoSource.h.
Sio::JsonDepoSource::JsonDepoSource |
( |
| ) |
|
Sio::JsonDepoSource::~JsonDepoSource |
( |
| ) |
|
|
virtual |
Accept a configuration.
Implements WireCell::IConfigurable.
Definition at line 119 of file JsonDepoSource.cxx.
129 if (model_type ==
"electrons") {
130 double scale =
get(
cfg,
"scale",1.0);
131 cerr <<
"Sio::JsonDepoSource: using electrons with scale=" << scale <<
endl;
135 auto model = Factory::lookup_tn<IRecombinationModel>(model_tn);
137 cerr <<
"Sio::JsonDepoSource::configure: unknown recombination model: \"" << model_tn <<
"\"\n";
140 if (model_type ==
"MipRecombination") {
143 if (model_type ==
"BirksRecombination" || model_type ==
"BoxRecombination") {
150 string dotpath = get<string>(
cfg,
"jsonpath",
"depos");
151 if (filename.empty()) {
152 cerr <<
"JsonDepoSource::configure: no JSON filename given" <<
endl;
158 auto jdepos =
branch(top, dotpath);
159 for (
auto jdepo : jdepos) {
162 qtot += idepo->charge();
165 cerr <<
"Sio::JsonDepoSource::configure: " 166 <<
"slurped in " <<
m_depos.size() <<
" depositions, " JsonRecombinationAdaptor * m_adapter
static const double eplus
IDepo::pointer jdepo2idepo(Json::Value jdepo)
Configuration branch(Configuration cfg, const std::string &dotpath)
Follow a dot.separated.path and return the branch there.
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
Json::Value load(const std::string &filename, const externalvars_t &extvar=externalvars_t(), const externalvars_t &extcode=externalvars_t())
WireCell::IDepo::vector m_depos
bool descending_time(const WireCell::IDepo::pointer &lhs, const WireCell::IDepo::pointer &rhs)
Compare two IDepo::pointers for by time, descending. x is used to break tie.
std::vector< std::string > split(const std::string &in, const std::string &delim=":")
QTextStream & endl(QTextStream &s)
Definition at line 105 of file JsonDepoSource.cxx.
107 const double q = (*m_adapter)(jdepo);
108 auto idepo = std::make_shared<SimpleDepo>(
110 Point(
get(jdepo,
"x", 0.0),
111 get(jdepo,
"y", 0.0),
112 get(jdepo,
"z", 0.0)),
D3Vector< double > Point
A 3D Cartesian point in double precision.
bool WireCell::Sio::JsonDepoSource::m_eos |
|
private |
The documentation for this class was generated from the following files: