ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
lwtDev::InputPreprocessor Class Reference

#include <InputPreprocessor.h>

Collaboration diagram for lwtDev::InputPreprocessor:

Public Member Functions

 InputPreprocessor (const std::vector< Input > &inputs)
 
VectorXd operator() (const ValueMap &) const
 

Private Attributes

VectorXd m_offsets
 
VectorXd m_scales
 
std::vector< std::string > m_names
 

Detailed Description

Definition at line 29 of file InputPreprocessor.h.

Constructor & Destructor Documentation

◆ InputPreprocessor()

lwtDev::InputPreprocessor::InputPreprocessor ( const std::vector< Input > &  inputs)

Definition at line 12 of file InputPreprocessor.cxx.

12  :
13  m_offsets(inputs.size()),
14  m_scales(inputs.size())
15  {
16  size_t in_num = 0;
17  for (const auto& input: inputs) {
18  m_offsets(in_num) = input.offset;
19  m_scales(in_num) = input.scale;
20  m_names.push_back(input.name);
21  in_num++;
22  }
23  }

Member Function Documentation

◆ operator()()

VectorXd lwtDev::InputPreprocessor::operator() ( const ValueMap in) const

Definition at line 24 of file InputPreprocessor.cxx.

24  {
25  VectorXd invec(m_names.size());
26  size_t input_number = 0;
27  for (const auto& in_name: m_names) {
28  if (!in.count(in_name)) {
29  throw NNEvaluationException("can't find input: " + in_name);
30  }
31  invec(input_number) = in.at(in_name);
32  input_number++;
33  }
34  return (invec + m_offsets).cwiseProduct(m_scales);
35  }

Member Data Documentation

◆ m_names

std::vector<std::string> lwtDev::InputPreprocessor::m_names
private

Definition at line 38 of file InputPreprocessor.h.

◆ m_offsets

VectorXd lwtDev::InputPreprocessor::m_offsets
private

Definition at line 36 of file InputPreprocessor.h.

◆ m_scales

VectorXd lwtDev::InputPreprocessor::m_scales
private

Definition at line 37 of file InputPreprocessor.h.


The documentation for this class was generated from the following files:
lwtDev::InputPreprocessor::m_scales
VectorXd m_scales
Definition: InputPreprocessor.h:37
postInclude.inputs
inputs
Definition: postInclude.SortInput.py:15
lwtDev::InputPreprocessor::m_names
std::vector< std::string > m_names
Definition: InputPreprocessor.h:38
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
lwtDev::InputPreprocessor::m_offsets
VectorXd m_offsets
Definition: InputPreprocessor.h:36