Go to the documentation of this file.
16 #include <boost/algorithm/string.hpp>
19 #include <fmt/format.h>
25 #include <nlohmann/json.hpp>
26 #include <string_view>
29 void writeFileJson(
std::string fileName,
bool fulloutput,
37 for (
auto& [algoName, entityMap] : sEntities ) {
38 for (
auto& [entityName, entity] : entityMap ) {
40 if ( !entity.at(
"empty" ).template get<bool>() ) {
41 jsonfile[algoName][entityName] = entity;
42 jsonfile[algoName][entityName].erase(
"empty" );
44 jsonfile[algoName][entityName].erase(
"sum2" );
47 jsonfile[algoName][entityName] = entity;
52 os << jsonfile.dump( 4 );
77 if ( std::string_view( ent.
type ).substr( 0, 8 ) ==
"counter:" || ent.
type ==
"statentity" ||
78 ent.
type ==
"histogram" ) {
92 "Name of JSON file for counters dump" };
94 "Dump full Counter info in the JSON output file" };
108 for (
auto& entity :
m_monitoringEntities ) { sortedEntities[entity.component][entity.name] = entity.toJSON(); }
Interface reporting services must implement.
void removeEntity(Hub::Entity const &ent) override
StatusCode initialize() override
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
Gaudi::Property< bool > m_jsonOutputFullInfo
std::deque< Hub::Entity > m_monitoringEntities
void registerEntity(Hub::Entity ent) override
StatusCode initialize() override
initialization, registers to Monitoring::Hub
double * begin(CLHEP::HepVector &v)
const ValueType & value() const
Backward compatibility (.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode stop() override
stop method, handles the printing
Gaudi::Property< std::string > m_jsonOutputFileName
StatusCode stop() override
#define DECLARE_COMPONENT(type)
Service(std::string name, ISvcLocator *svcloc)
Standard Constructor
Wrapper class for arbitrary monitoring objects.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator
std::string type
type of the entity, see comment above concerning its format and usage