7#include <unordered_map>
107 mutable std::mutex m_;
110 std::unordered_map<std::string, std::vector<ObservableId>> graph_;
113 std::unordered_map<std::string, DecayId> parent_;
Thread-safe singleton storing dynamic decay-observable links.
std::optional< DecayId > parent_of(const ObservableId &obs) const
Return the dynamic parent decay of an observable, if known.
bool has_observables(const DecayId &decay) const
Check whether a decay has at least one dynamic observable.
static DecayGraph & instance()
Return the unique global graph instance.
std::vector< ObservableId > observables_of(const DecayId &decay) const
Return all dynamically linked observables for a decay.
void link(const DecayId &decay, const ObservableId &obs)
Link an observable to a parent decay.
Tag type for decay identifiers.