10 #include <xercesc/dom/DOM.hpp>
21 XERCES_CPP_NAMESPACE_USE
23 using namespace PhysicsTools;
33 virtual ~ProcMultiply();
35 virtual void configure(DOMElement *
elem)
override;
39 typedef std::vector<unsigned int>
Config;
40 std::vector<Config>
config;
45 ProcMultiply::ProcMultiply(
const char *
name,
const AtomicId *
id,
51 ProcMultiply::~ProcMultiply()
55 void ProcMultiply::configure(DOMElement *
elem)
57 unsigned int nInputs = getInputs().size();
59 for(DOMNode *node = elem->getFirstChild(); node;
60 node = node->getNextSibling()) {
61 if (node->getNodeType() != DOMNode::ELEMENT_NODE)
64 if (std::strcmp(
XMLSimpleStr(node->getNodeName()),
"product") != 0)
66 <<
"Expected product tag in config section."
73 for(
size_t pos = 0,
next = 0;
74 next != std::string::npos; pos =
next + 1) {
75 next = data.find(
'*', pos);
77 std::istringstream
ss(data.substr(pos,
next - pos));
80 if (
ss.bad() ||
ss.peek() !=
81 std::istringstream::traits_type::eof())
83 <<
"Expected list of indices separated"
84 <<
"by asterisks" << std::endl;
87 <<
"Variable index " << index
88 <<
" out of range." << std::endl;
89 indices.push_back(index);
101 calib->
in = getInputs().size();
MVATrainerComputer * calib
char data[epos_bytes_allocation]