24 using BaseSink::BaseSink;
28 nlohmann::json output;
30 [&output]( std::string
const& component, std::string
const&
name, nlohmann::json
const& j ) {
31 output.emplace_back( nlohmann::json{
33 {
"component", component },
38 std::ofstream{
m_fileName, std::ios::out } << output.dump( 4 );
43 "Name of output json file. Empty fileName means no output" };
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Base class for all Sinks registering to the Monitoring Hub Should be extended by actual Sinks.
void applyToAllSortedEntities(Callable func) const
applies a callable to all monitoring entities ordered by component the callable will be called once p...
void flush(bool) override
pure virtual method to be defined by children and responsible for flushing current data of the Sink.
Gaudi::Property< std::string > m_fileName
Implementation of property with value of concrete type.
const std::string & name() const override
Retrieve name of the service.