DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TimingNode.cpp
Go to the documentation of this file.
1
10
11#include <map>
12#include <string>
13
14namespace dunedaq {
15namespace timing {
16
17//-----------------------------------------------------------------------------
18TimingNode::TimingNode(const uhal::Node& node)
19 : uhal::Node(node)
20{}
21//-----------------------------------------------------------------------------
22
23//-----------------------------------------------------------------------------
25//-----------------------------------------------------------------------------
26
27//-----------------------------------------------------------------------------
28std::map<std::string, uhal::ValWord<uint32_t>> // NOLINT(build/unsigned)
29TimingNode::read_sub_nodes(const uhal::Node& node, bool dispatch) const
30{
31 auto node_names = node.getNodes();
32
33 std::map<std::string, uhal::ValWord<uint32_t>> node_name_value_pairs; // NOLINT(build/unsigned)
34
35 for (auto it = node_names.begin(); it != node_names.end(); ++it)
36 node_name_value_pairs[*it] = node.getNode(*it).read();
37 if (dispatch)
38 getClient().dispatch();
39 return node_name_value_pairs;
40}
41//-----------------------------------------------------------------------------
42
43//-----------------------------------------------------------------------------
44void
45TimingNode::reset_sub_nodes(const uhal::Node& node, uint32_t aValue, bool dispatch) const // NOLINT(build/unsigned)
46{
47
48 auto node_names = node.getNodes();
49
50 for (auto it = node_names.begin(); it != node_names.end(); ++it)
51 node.getNode(*it).write(aValue);
52
53 if (dispatch)
54 getClient().dispatch();
55}
56//-----------------------------------------------------------------------------
57
58} // namespace timing
59} // namespace dunedaq
void reset_sub_nodes(const uhal::Node &node, uint32_t aValue=0x0, bool dispatch=true) const
Reset subnodes.
TimingNode(const uhal::Node &node)
std::map< std::string, uhal::ValWord< uint32_t > > read_sub_nodes(const uhal::Node &node, bool dispatch=true) const
Read subnodes.
Including Qt Headers.