PhoenixSwarm  3.5.0
Library to ease communication between daemons
Loading...
Searching...
No Matches
StatDaemonManager_impl.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Thibaut Oprinsen
3 Mail : thibaut.oprinsen@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6#ifndef __STATDAEMONMANAGERIMPL_H__
7#define __STATDAEMONMANAGERIMPL_H__
8
9#include "StatSort.h"
10#include "StatDaemonManager.h"
11
13template<class _TBackend>
19
21template<class _TBackend>
25
27
29template<class _TBackend>
33
35
37template<class _TBackend>
41
43
45template<class _TBackend>
47 return p_mapDaemonStat.size();
48}
49
51
54template<class _TBackend>
56 p_mapDaemonStat[stat.getName()] = stat;
57 return UNCASTABLE_TRUE;
58}
59
61template<class _TBackend>
65
67
69template<class _TBackend>
71 // bool bResult = Daemon<_TBackend>::sendValue("SwarmTop", p_mapDaemonStat);
72 return true;
73}
74
76template<class _TBackend>
79 BaseDaemon::getLog().getLogInfo() << "StatDaemonManager: Adding data callable method for stat sorting with nbBin=" << daemonConfig.getStatNbBin() << ", lowerBound=" << daemonConfig.getStatHistLowerBound() << ", upperBound=" << daemonConfig.getStatHistUpperBound() << std::endl;
81}
82
83#endif
std::map< PString, DaemonStat > MapDaemonStat
PUncastableBool sortFillDaemonStat(StatDaemonManager< _TBackend > &manager, const DaemonStat &data)
Fill the DL1 parameter of the stereo daemon.
DaemonConfig & getConfig()
Get the configuration of the current BaseDaemon.
PLog & getLog()
Get the log of the current BaseDaemon.
bool addDataCallableMethod(PUncastableBool(&function)(const _Data &), size_t nbBin, float histLowerBound, float histUpperBound)
Add a callable method of the Daemon.
Definition BaseDaemon.h:105
Describe a Daemon of the Swarm.
size_t getStatNbBin() const
Gets the statNbBin of the DaemonConfig.
float getStatHistLowerBound() const
Gets the statHistLowerBound of the DaemonConfig.
float getStatHistUpperBound() const
Gets the statHistUpperBound of the DaemonConfig.
Statistics of a Daemon.
const PString & getName() const
Gets the name of the DaemonStat.
Daemon()
Default constructor of Daemon.
Definition Daemon_impl.h:15
MapDaemonStat p_mapDaemonStat
Statistics about all Daemon in the swarm.
virtual void addCallMethod()
Method from BaseDaemon to add call methods.
size_t getStatsCount() const
Get the count of stats received.
virtual ~StatDaemonManager()
Destructor of StatDaemonManager.
StatDaemonManager()
Constructor of StatDaemonManager.
bool hasReceivedStats() const
Check if stats have been received.
PUncastableBool fillStatInfo(const DaemonStat &stat)
Fill the StatInfo of the StatDaemonManager with the given DaemonStat.
void initializeStatDaemonManager()
Initialize the StatDaemonManager.
const MapDaemonStat & getMapDaemonStat() const
Get the map of DaemonStat.
bool processEvent()
Process event.