DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
GIBV2IONode.cpp
Go to the documentation of this file.
1
10
11#include <string>
12#include <math.h>
13
14namespace dunedaq {
15namespace timing {
16
17UHAL_REGISTER_DERIVED_NODE(GIBV2IONode)
18
19//-----------------------------------------------------------------------------
20GIBV2IONode::GIBV2IONode(const uhal::Node& node)
21 : GIBIONode(node)
22{
23}
24//-----------------------------------------------------------------------------
25
26//-----------------------------------------------------------------------------
28//-----------------------------------------------------------------------------
29
30//-----------------------------------------------------------------------------
31bool
33{
34 std::stringstream status;
35
36 auto states = read_sub_nodes(getNode("csr.stat"));
37 bool pll_lol = states.find("clk_gen_lol")->second.value();
38 //bool pll_interrupt = states.find("clk_gen_intr")->second.value();
39 bool mmcm_ok = states.find("mmcm_ok")->second.value();
40
41 TLOG_DEBUG(5) << "pll lol: " << pll_lol << ", mmcm ok: " << mmcm_ok;
42
43 return !pll_lol && mmcm_ok;
44}
45//-----------------------------------------------------------------------------
46
47
48
49} // namespace timing
50} // namespace dunedaq
Class for the timing FMC board.
Definition GIBIONode.hpp:33
Class for the timing FMC board.
bool clocks_ok() const override
Clocks ready?
std::map< std::string, uhal::ValWord< uint32_t > > read_sub_nodes(const uhal::Node &node, bool dispatch=true) const
Read subnodes.
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112
The DUNE-DAQ namespace.
Definition DataStore.hpp:57