Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
17 #include <nlohmann/json.hpp>
40 if constexpr ( has_merge_and_reset_v<T> ) {
41 return [](
void* ptr,
void* other ) {
42 reinterpret_cast<T*
>( ptr )->mergeAndReset(
std::move( *
reinterpret_cast<T*
>( other ) ) );
45 return [](
void*,
void* ) {};
82 ,
m_reset{ [](
void* ptr ) {
reinterpret_cast<T*
>( ptr )->
reset(); } }
84 ,
m_getJSON{ [](
const void* ptr ) {
return reinterpret_cast<const T*
>( ptr )->
toJSON(); } } {}
135 template <
typename T>
143 template <
typename T>
Interface reporting services must implement.
std::string name
name of the entity
bool operator==(Entity const &ent)
operator== for comparison with an entity
bool operator==(void *ent)
operator== for comparison with raw pointer
std::deque< Sink * > m_sinks
virtual ~MergeAndResetBase()=default
std::deque< Entity > m_entities
virtual void removeEntity(Entity const &ent)=0
decltype(std::declval< T >().mergeAndReset(std::declval< T && >())) has_merge_and_reset_
virtual void registerEntity(Entity ent)=0
std::type_index(* m_typeIndex)(const void *)
function to get internal type.
double * begin(CLHEP::HepVector &v)
void removeSink(Sink *sink)
void reset()
function resetting internal data
void registerEntity(std::string c, std::string n, std::string t, T &ent)
std::type_index typeIndex() const
function to get internal type
void removeEntity(T &ent)
constexpr bool has_merge_and_reset_v
void registerEntity(Entity ent)
details::MergeAndReset_t m_mergeAndReset
function calling merge and reset on internal data with the internal data of another entity
json(* m_getJSON)(const void *)
function converting the internal data to json.
void * m_ptr
pointer to the actual data inside this Entity
json toJSON() const
function giving access to internal data in json format
virtual void operator()(void *, void *) const =0
Entity(std::string component, std::string name, std::string type, T &ent)
MergeAndReset_t makeMergeAndResetFor()
void mergeAndReset(Entity const &ent)
function calling merge and reset on internal data with the internal data of another entity
Central entity in a Gaudi application that manages monitoring objects (i.e.
Wrapper class for arbitrary monitoring objects.
void(* m_reset)(void *)
function reseting internal data.
void(*)(void *, void *) MergeAndReset_t
std::string type
type of the entity, see comment above concerning its format and usage
std::string component
name of the component owning the Entity