DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Static Public Member Functions | Protected Attributes
dabc::Ratemeter Class Reference

Helper class to calculate data rate. More...

#include <dabc/statistic.h>

Public Member Functions

int AverPacketSize ()
 
void DoMeasure (double interval_sec, long npoints, double firsttm=0.)
 
int GetNumOper () const
 
double GetRate ()
 
double GetTotalTime ()
 
void Packet (int size, double tm=0.)
 
 Ratemeter ()
 
void Reset ()
 
void SaveInFile (const char *fname)
 
virtual ~Ratemeter ()
 

Static Public Member Functions

static void SaveRatesInFile (const char *fname, Ratemeter **rates, int nrates, bool withsum=false)
 

Protected Attributes

double firstoper
 
double fMeasureInterval
 
long fMeasurePoints
 
double * fPoints
 
double lastoper
 
int64_t numoper
 
int64_t totalpacketsize
 

Detailed Description

Helper class to calculate data rate.

Should not be mixed up with dabc::Parameter class, which could measure data rate as well

Definition at line 79 of file statistic.h.

Constructor & Destructor Documentation

◆ Ratemeter()

dabc::Ratemeter::Ratemeter ( )

Definition at line 177 of file statistic.cxx.

◆ ~Ratemeter()

dabc::Ratemeter::~Ratemeter ( )
virtual

Definition at line 185 of file statistic.cxx.

Member Function Documentation

◆ DoMeasure()

void dabc::Ratemeter::DoMeasure ( double  interval_sec,
long  npoints,
double  firsttm = 0. 
)

Definition at line 249 of file statistic.cxx.

◆ Packet()

void dabc::Ratemeter::Packet ( int  size,
double  tm = 0. 
)

Definition at line 190 of file statistic.cxx.

◆ Reset()

void dabc::Ratemeter::Reset ( )

Definition at line 214 of file statistic.cxx.

◆ GetRate()

double dabc::Ratemeter::GetRate ( )

Definition at line 229 of file statistic.cxx.

◆ GetTotalTime()

double dabc::Ratemeter::GetTotalTime ( )

Definition at line 238 of file statistic.cxx.

◆ AverPacketSize()

int dabc::Ratemeter::AverPacketSize ( )

Definition at line 243 of file statistic.cxx.

◆ GetNumOper()

int dabc::Ratemeter::GetNumOper ( ) const
inline

Definition at line 93 of file statistic.h.

◆ SaveInFile()

void dabc::Ratemeter::SaveInFile ( const char *  fname)

Definition at line 293 of file statistic.cxx.

◆ SaveRatesInFile()

void dabc::Ratemeter::SaveRatesInFile ( const char *  fname,
Ratemeter **  rates,
int  nrates,
bool  withsum = false 
)
static

Definition at line 261 of file statistic.cxx.

Field Documentation

◆ firstoper

double dabc::Ratemeter::firstoper
protected

Definition at line 100 of file statistic.h.

◆ lastoper

double dabc::Ratemeter::lastoper
protected

Definition at line 100 of file statistic.h.

◆ numoper

int64_t dabc::Ratemeter::numoper
protected

Definition at line 101 of file statistic.h.

◆ totalpacketsize

int64_t dabc::Ratemeter::totalpacketsize
protected

Definition at line 101 of file statistic.h.

◆ fMeasureInterval

double dabc::Ratemeter::fMeasureInterval
protected

Definition at line 103 of file statistic.h.

◆ fMeasurePoints

long dabc::Ratemeter::fMeasurePoints
protected

Definition at line 104 of file statistic.h.

◆ fPoints

double* dabc::Ratemeter::fPoints
protected

Definition at line 105 of file statistic.h.


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