PAASS
Software suite to Acquire and Analyze Data from Pixie16
StatsHandler Class Reference

#include <poll2_stats.h>

Collaboration diagram for StatsHandler:

Public Member Functions

 StatsHandler (size_t nCards=1)
 
 ~StatsHandler ()
 
void AddEvent (unsigned int mod, unsigned int ch, size_t size, int delta_=1)
 
bool AddTime (double dtime)
 
void SetDumpInterval (double interval)
 Set the amount of time between scalers dumps in seconds. More...
 
double GetDataRate (size_t mod)
 
double GetTotalDataRate ()
 
double GetEventRate (size_t mod)
 
double GetTotalTime ()
 Return the total run time. More...
 
void SetXiaRates (int mod, std::vector< std::pair< double, double >> *xiaRates)
 Set the ICR and OCR from the XIA module. More...
 
bool CanSend ()
 
void Clear ()
 Clear the stats. More...
 
void ClearRates ()
 
void ClearTotals ()
 
void Dump ()
 

Private Attributes

Clientclient
 
unsigned int ** nEventsDelta
 
unsigned int ** nEventsTotal
 
size_t * dataDelta
 
size_t * dataTotal
 
double ** calcEventRate
 
double ** inputCountRate
 The XIA Module input count rate. More...
 
double ** outputCountRate
 The XIA Module output count rate. More...
 
size_t * calcDataRate
 
double timeElapsed
 
double totalTime
 
double dumpTime
 
unsigned int numCards
 
bool is_able_to_send
 

Detailed Description

Definition at line 10 of file poll2_stats.h.

Constructor & Destructor Documentation

§ StatsHandler()

StatsHandler::StatsHandler ( size_t  nCards = 1)

Definition at line 9 of file poll2_stats.cpp.

Here is the call graph for this function:

§ ~StatsHandler()

StatsHandler::~StatsHandler ( )

Definition at line 55 of file poll2_stats.cpp.

Here is the call graph for this function:

Member Function Documentation

§ AddEvent()

void StatsHandler::AddEvent ( unsigned int  mod,
unsigned int  ch,
size_t  size,
int  delta_ = 1 
)

Definition at line 78 of file poll2_stats.cpp.

Here is the caller graph for this function:

§ AddTime()

bool StatsHandler::AddTime ( double  dtime)
Returns
Returns true if the dump interval is exceeded.

Definition at line 96 of file poll2_stats.cpp.

Here is the caller graph for this function:

§ CanSend()

bool StatsHandler::CanSend ( )
inline

Definition at line 35 of file poll2_stats.h.

Here is the call graph for this function:

§ Clear()

void StatsHandler::Clear ( )

Clear the stats.

Definition at line 201 of file poll2_stats.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ ClearRates()

void StatsHandler::ClearRates ( )

Definition at line 175 of file poll2_stats.cpp.

Here is the caller graph for this function:

§ ClearTotals()

void StatsHandler::ClearTotals ( )

Definition at line 192 of file poll2_stats.cpp.

Here is the caller graph for this function:

§ Dump()

void StatsHandler::Dump ( void  )

Definition at line 104 of file poll2_stats.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ GetDataRate()

double StatsHandler::GetDataRate ( size_t  mod)

Definition at line 152 of file poll2_stats.cpp.

Here is the caller graph for this function:

§ GetEventRate()

double StatsHandler::GetEventRate ( size_t  mod)

Definition at line 163 of file poll2_stats.cpp.

Here is the caller graph for this function:

§ GetTotalDataRate()

double StatsHandler::GetTotalDataRate ( )

Definition at line 157 of file poll2_stats.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ GetTotalTime()

double StatsHandler::GetTotalTime ( )

Return the total run time.

Definition at line 171 of file poll2_stats.cpp.

Here is the caller graph for this function:

§ SetDumpInterval()

void StatsHandler::SetDumpInterval ( double  interval)
inline

Set the amount of time between scalers dumps in seconds.

Definition at line 21 of file poll2_stats.h.

Here is the call graph for this function:
Here is the caller graph for this function:

§ SetXiaRates()

void StatsHandler::SetXiaRates ( int  mod,
std::vector< std::pair< double, double >> *  xiaRates 
)

Set the ICR and OCR from the XIA module.

Definition at line 186 of file poll2_stats.cpp.

Here is the caller graph for this function:

Field Documentation

§ calcDataRate

size_t* StatsHandler::calcDataRate
private

calculated data rate in bytes per second for each module

Definition at line 66 of file poll2_stats.h.

§ calcEventRate

double** StatsHandler::calcEventRate
private

calculated event rate in Hz for each channel

Definition at line 60 of file poll2_stats.h.

§ client

Client* StatsHandler::client
private

Definition at line 45 of file poll2_stats.h.

§ dataDelta

size_t* StatsHandler::dataDelta
private

data in bytes this tick per module

Definition at line 54 of file poll2_stats.h.

§ dataTotal

size_t* StatsHandler::dataTotal
private

total data in bytes per module

Definition at line 57 of file poll2_stats.h.

§ dumpTime

double StatsHandler::dumpTime
private

time between data dumps in seconds

Definition at line 75 of file poll2_stats.h.

§ inputCountRate

double** StatsHandler::inputCountRate
private

The XIA Module input count rate.

Definition at line 62 of file poll2_stats.h.

§ is_able_to_send

bool StatsHandler::is_able_to_send
private

Definition at line 80 of file poll2_stats.h.

§ nEventsDelta

unsigned int** StatsHandler::nEventsDelta
private

number of events for each channel this tick

Definition at line 48 of file poll2_stats.h.

§ nEventsTotal

unsigned int** StatsHandler::nEventsTotal
private

total number of events for each channel

Definition at line 51 of file poll2_stats.h.

§ numCards

unsigned int StatsHandler::numCards
private

number of cards in the system

Definition at line 78 of file poll2_stats.h.

§ outputCountRate

double** StatsHandler::outputCountRate
private

The XIA Module output count rate.

Definition at line 63 of file poll2_stats.h.

§ timeElapsed

double StatsHandler::timeElapsed
private

time elapsed in seconds

Definition at line 69 of file poll2_stats.h.

§ totalTime

double StatsHandler::totalTime
private

total time in seconds

Definition at line 72 of file poll2_stats.h.


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