DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include <MonitorableObject.hpp>
Public Types | |
using | NodePtr = std::weak_ptr<MonitorableObject> |
using | NewNodePtr = std::shared_ptr<MonitorableObject> |
using | ElementId = std::string |
Public Member Functions | |
MonitorableObject (const MonitorableObject &)=delete | |
MonitorableObject & | operator= (const MonitorableObject &)=delete |
MonitorableObject (MonitorableObject &&)=delete | |
MonitorableObject & | operator= (MonitorableObject &&)=delete |
virtual | ~MonitorableObject ()=default |
auto | get_opmon_id () const noexcept |
auto | get_opmon_level () const noexcept |
Static Public Member Functions | |
static bool | publishable_metric (OpMonLevel entry, OpMonLevel system) noexcept |
Protected Member Functions | |
MonitorableObject ()=default | |
void | register_node (ElementId name, NewNodePtr) |
void | publish (google::protobuf::Message &&, CustomOrigin &&co={}, OpMonLevel l=to_level(EntryOpMonLevel::kDefault)) const noexcept |
virtual void | generate_opmon_data () |
Private Types | |
using | facility_ptr_t = std::shared_ptr<opmonlib::OpMonFacility> |
using | const_metric_counter_t |
using | metric_counter_t = std::remove_const<const_metric_counter_t>::type |
using | const_time_counter_t |
using | time_counter_t = std::remove_const<const_metric_counter_t>::type |
Private Member Functions | |
opmon::MonitoringTreeInfo | collect () noexcept |
void | set_opmon_level (OpMonLevel) noexcept |
void | inherit_parent_properties (const MonitorableObject &parent) |
MonitorableObject (ElementId name, ElementId parent_id="") | |
Private Attributes | |
std::map< ElementId, NodePtr > | m_nodes |
std::mutex | m_node_mutex |
std::atomic< facility_ptr_t > | m_facility {s_default_facility} |
dunedaq::opmon::OpMonId | m_parent_id |
std::atomic< OpMonLevel > | m_opmon_level = to_level(SystemOpMonLevel::kAll) |
ElementId | m_opmon_name |
std::atomic< metric_counter_t > | m_published_counter {0} |
std::atomic< metric_counter_t > | m_ignored_counter {0} |
std::atomic< metric_counter_t > | m_error_counter {0} |
std::atomic< time_counter_t > | m_cpu_us_counter {0} |
Static Private Attributes | |
static facility_ptr_t | s_default_facility = std::make_shared<NullOpMonFacility>() |
Friends | |
class | OpMonManager |
Definition at line 73 of file MonitorableObject.hpp.
Definition at line 179 of file MonitorableObject.hpp.
Definition at line 186 of file MonitorableObject.hpp.
using dunedaq::opmonlib::MonitorableObject::ElementId = std::string |
Definition at line 79 of file MonitorableObject.hpp.
|
private |
Definition at line 170 of file MonitorableObject.hpp.
|
private |
Definition at line 181 of file MonitorableObject.hpp.
using dunedaq::opmonlib::MonitorableObject::NewNodePtr = std::shared_ptr<MonitorableObject> |
Definition at line 78 of file MonitorableObject.hpp.
using dunedaq::opmonlib::MonitorableObject::NodePtr = std::weak_ptr<MonitorableObject> |
Definition at line 77 of file MonitorableObject.hpp.
|
private |
Definition at line 188 of file MonitorableObject.hpp.
|
delete |
copy and move constructors are deleted as they violate the linking chain
|
delete |
|
virtualdefault |
|
protecteddefault |
default constructors are ok as they set the links correctly i.e. The service points to the null and the names are not set
|
inlineprivate |
Contructor to set initial strings
Definition at line 161 of file MonitorableObject.hpp.
|
privatenoexcept |
Instructs the object to pusblish regular interval metrics. It also instruct the children to execute their collect methods.
Definition at line 101 of file MonitorableObject.cpp.
|
inlineprotectedvirtual |
Hook for customisable pubblication. The function can throw, exception will be caught by the monitoring thread
Reimplemented in dunedaq::asiolibs::SourceModel< TargetPayloadType >, dunedaq::crtmodules::SourceModel< TargetPayloadType >, dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >, dunedaq::datahandlinglibs::DataSubscriberModel< PayloadType >, dunedaq::datahandlinglibs::DefaultRequestHandlerModel< ReadoutType, LatencyBufferType >, dunedaq::datahandlinglibs::DefaultRequestHandlerModel< T, datahandlinglibs::SkipListLatencyBufferModel< T > >, dunedaq::datahandlinglibs::DefaultRequestHandlerModel< TriggerPrimitiveTypeAdapter, datahandlinglibs::SkipListLatencyBufferModel< TriggerPrimitiveTypeAdapter > >, dunedaq::datahandlinglibs::DefaultRequestHandlerModel< types::DAPHNESuperChunkTypeAdapter, datahandlinglibs::SkipListLatencyBufferModel< types::DAPHNESuperChunkTypeAdapter > >, dunedaq::datahandlinglibs::IterableQueueModel< T >, dunedaq::datahandlinglibs::SkipListLatencyBufferModel< T >, dunedaq::datahandlinglibs::SourceEmulatorModel< ReadoutType >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< ReadoutType >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< hsilibs::HSI_FRAME_STRUCT >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< TAWrapper >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< TCWrapper >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< TriggerPrimitiveTypeAdapter >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::CRTBernTypeAdapter >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::CRTGrenobleTypeAdapter >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::DAPHNEStreamSuperChunkTypeAdapter >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::DUNEWIBEthTypeAdapter >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::TDEEthTypeAdapter >, dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::TDEFrameTypeAdapter >, dunedaq::dpdklibs::SourceModel< TargetPayloadType >, dunedaq::fdreadoutlibs::TDEEthFrameProcessor, dunedaq::fdreadoutlibs::WIBEthFrameProcessor, dunedaq::flxlibs::CardControllerWrapper, dunedaq::flxlibs::ElinkModel< TargetPayloadType >, dunedaq::iomanager::QueueBase, dunedaq::ipm::Receiver, dunedaq::ipm::Sender, dunedaq::trigger::HSISourceModel, dunedaq::trigger::TAProcessor, dunedaq::trigger::TCProcessor, and dunedaq::trigger::TPProcessor.
Definition at line 135 of file MonitorableObject.hpp.
|
inlinenoexcept |
Definition at line 93 of file MonitorableObject.hpp.
|
inlinenoexcept |
Definition at line 95 of file MonitorableObject.hpp.
|
private |
utilities for linking with parent and top levels
Definition at line 193 of file MonitorableObject.cpp.
|
delete |
|
delete |
|
protectednoexcept |
Convert the message into an OpMonEntry and then uses the pointer to the Facility to publish the entry. This also timestamps the message with the time of the invocation. It is possible to associate an element name to the published message. the element name is checked against the children to protect uniqueness. It is also possible to associate a custom origin in the form of a map<string,string>. This is designed to add information which is independent from the software structure e.g. channels or other hardware information. Messages will have an associated OpmonLevel that is used to suppress the pubblication of metrics. The level of the message is set by the OpMonManager.
Definition at line 58 of file MonitorableObject.cpp.
|
inlinestaticnoexcept |
Definition at line 97 of file MonitorableObject.hpp.
|
protected |
Append a register object to the chain The children will be modified using information from the this parent
Definition at line 32 of file MonitorableObject.cpp.
|
privatenoexcept |
Hook to propagate the OpMonLevel at lower levels of the monitoring tree
Definition at line 180 of file MonitorableObject.cpp.
|
friend |
Definition at line 81 of file MonitorableObject.hpp.
|
mutableprivate |
Definition at line 189 of file MonitorableObject.hpp.
|
mutableprivate |
Definition at line 184 of file MonitorableObject.hpp.
|
private |
Definition at line 171 of file MonitorableObject.hpp.
|
mutableprivate |
Definition at line 183 of file MonitorableObject.hpp.
|
private |
Definition at line 168 of file MonitorableObject.hpp.
Definition at line 167 of file MonitorableObject.hpp.
|
private |
Definition at line 173 of file MonitorableObject.hpp.
|
private |
Definition at line 174 of file MonitorableObject.hpp.
|
private |
Definition at line 172 of file MonitorableObject.hpp.
|
mutableprivate |
Definition at line 182 of file MonitorableObject.hpp.
|
staticprivate |
Definition at line 176 of file MonitorableObject.hpp.