|
ATLAS Offline Software
|
Go to the documentation of this file.
12 using namespace Eigen;
17 typedef std::vector<std::pair<std::string, IP*> > Preprocs;
20 typedef std::vector<std::pair<std::string, IVP*> > VecPreprocs;
24 class LazySource:
public ISource
28 const Preprocs&,
const VecPreprocs&);
29 virtual VectorXd at(
size_t index)
const override;
30 virtual MatrixXd matrix_at(
size_t index)
const override;
34 const Preprocs& m_preprocs;
35 const VecPreprocs& m_vec_preprocs;
39 const Preprocs&
p,
const VecPreprocs&
v):
40 m_nodes(
n), m_seqs(
s), m_preprocs(
p), m_vec_preprocs(
v)
43 VectorXd LazySource::at(
size_t index)
const
46 if (!m_nodes.count(
proc.first)) {
49 const auto& preproc = *
proc.second;
50 return preproc(m_nodes.at(
proc.first));
52 MatrixXd LazySource::matrix_at(
size_t index)
const
54 const auto&
proc = m_vec_preprocs.at(
index);
55 if (!m_seqs.count(
proc.first)) {
58 const auto& preproc = *
proc.second;
59 return preproc(m_seqs.at(
proc.first));
69 const std::string& default_output):
76 for (
const auto&
node:
config.input_sequences) {
86 if (default_output.size() > 0) {
91 }
else if (output_n == 1) {
101 delete preproc.second;
105 delete preproc.second;
116 const std::string&
output)
const {
128 std::map<std::string, double>
output;
129 for (
size_t iii = 0; iii <
labels.size(); iii++) {
141 const std::string&
output)
const {
153 std::map<std::string, std::vector<double> >
output;
154 for (
size_t iii = 0; iii <
labels.size(); iii++) {
156 std::vector<double> out_vector(
row.data(),
row.data() +
row.size());
seq
filter configuration ## -> we use the special sequence 'AthMasterSeq' which is run before any other a...
std::map< std::string, double > ValueMap
std::map< std::string, std::vector< double > > VectorMap
LightweightGraph::NodeMap NodeMap
std::vector< std::pair< size_t, std::vector< std::string > > > m_outputs
ValueMap compute(const NodeMap &, const SeqNodeMap &={}) const
std::map< std::string, VectorMap > SeqNodeMap
std::map< std::string, ValueMap > NodeMap
void name(const std::string &n)
LightweightGraph(const GraphConfig &config, const std::string &default_output="")
VecPreprocs m_vec_preprocs
VectorMap scan(const NodeMap &, const SeqNodeMap &={}) const
VectorXd compute(const ISource &, size_t node_number) const
std::map< std::string, size_t > m_output_indices
MatrixXd scan(const ISource &, size_t node_number) const