artdaq::StatisticsHelper Class Reference

This class manages MonitoredQuantity instances for the *Core classes. More...

#include <artdaq/Application/StatisticsHelper.hh>

List of all members.

Public Member Functions

 StatisticsHelper ()
 StatisticsHelper default constructor.
 StatisticsHelper (StatisticsHelper const &)
 Copy Constructor is deleted.
virtual ~StatisticsHelper ()
 Default Destructor.
StatisticsHelperoperator= (StatisticsHelper const &)
 Copy Assignment operator is deleted.
void addMonitoredQuantityName (std::string const &statKey)
 Add a MonitoredQuantity name to the list.
void addSample (std::string const &statKey, double value) const
 Add a sample to the MonitoredQuantity with the given name.
bool createCollectors (fhicl::ParameterSet const &pset, int defaultReportIntervalFragments, double defaultReportIntervalSeconds, double defaultMonitorWindow, std::string const &primaryStatKeyName)
 Create MonitoredQuantity objects for all names registered with the StatisticsHelper.
void resetStatistics ()
 Reset all MonitoredQuantity instances.
bool readyToReport (size_t currentCount)
 Determine if the reporting interval conditions have been met.
bool statsRollingWindowHasMoved ()
 Determine if the MonitoredQuantity "recent" window has changed since the last time this function was called.

Detailed Description

This class manages MonitoredQuantity instances for the *Core classes.

Definition at line 16 of file StatisticsHelper.hh.


Member Function Documentation

void artdaq::StatisticsHelper::addMonitoredQuantityName ( std::string const &  statKey  ) 

Add a MonitoredQuantity name to the list.

Parameters:
statKey Name of the MonitoredQuantity to be added

Definition at line 15 of file StatisticsHelper.cc.

void artdaq::StatisticsHelper::addSample ( std::string const &  statKey,
double  value 
) const

Add a sample to the MonitoredQuantity with the given name.

Parameters:
statKey Name of the MonitoredQuantity
value Value to record in the MonitoredQuantity

Definition at line 20 of file StatisticsHelper.cc.

bool artdaq::StatisticsHelper::createCollectors ( fhicl::ParameterSet const &  pset,
int  defaultReportIntervalFragments,
double  defaultReportIntervalSeconds,
double  defaultMonitorWindow,
std::string const &  primaryStatKeyName 
)

Create MonitoredQuantity objects for all names registered with the StatisticsHelper.

Parameters:
pset ParameterSet used to configure reporting
defaultReportIntervalFragments Default reporting interval in Fragments
defaultReportIntervalSeconds Default reporting interval in Seconds
defaultMonitorWindow Default monitoring window
primaryStatKeyName The primary (default) MonitoredQuantity
Returns:
Whether the primary MonitoredQuantity exists

StatisitcsHelper accpets the following Parameters: "reporting_interval_fragments" (Default given above): The reporting interval in Fragments "reporting_interval_seconds" (Default given above): The reporting interval in Seconds "monitor_window" (Default given above): The monitoring window for the MonitoredQuantity "monitor_binsize" (Default: 1 + ((monitorWindow - 1) / 100)): The monitoring bin size for the MonitoredQuantity

Definition at line 29 of file StatisticsHelper.cc.

StatisticsHelper& artdaq::StatisticsHelper::operator= ( StatisticsHelper const &   ) 

Copy Assignment operator is deleted.

Returns:
StatisticsHelper copy
bool artdaq::StatisticsHelper::readyToReport ( size_t  currentCount  ) 

Determine if the reporting interval conditions have been met.

Parameters:
currentCount Current Fragment count
Returns:
Whether the StatisticsHelper is ready to report

Definition at line 74 of file StatisticsHelper.cc.

bool artdaq::StatisticsHelper::statsRollingWindowHasMoved (  ) 

Determine if the MonitoredQuantity "recent" window has changed since the last time this function was called.

Returns:
Whether the MonitoredQuantity "recent" window has changed

Definition at line 91 of file StatisticsHelper.cc.


The documentation for this class was generated from the following files:

Generated on 6 Jun 2018 for artdaq by  doxygen 1.6.1