artdaq  v3_06_00
artdaq::detail::FragCounter Class Reference

Keep track of the count of Fragments received from a set of sources. More...

#include <artdaq/DAQrate/detail/FragCounter.hh>

Public Member Functions

 FragCounter ()
 Default Constructor.
 
void incSlot (size_t slot)
 Increment the given slot by one. More...
 
void incSlot (size_t slot, size_t inc)
 Increment the given slot by the given amount. More...
 
void setSlot (size_t slot, size_t val)
 Set the given slot to the given value. More...
 
size_t nSlots () const
 Get the number of slots this FragCounter instance is tracking. More...
 
size_t count () const
 Get the total number of Fragments received. More...
 
size_t slotCount (size_t slot) const
 Get the current count for the requested slot. More...
 
size_t minCount () const
 Get the minimum slot count. More...
 
size_t operator[] (size_t slot) const
 Get the current count for the requested slot. More...
 

Detailed Description

Keep track of the count of Fragments received from a set of sources.

Definition at line 20 of file FragCounter.hh.

Member Function Documentation

size_t artdaq::detail::FragCounter::count ( ) const
inline

Get the total number of Fragments received.

Returns
The total number of Fragments received

Definition at line 128 of file FragCounter.hh.

void artdaq::detail::FragCounter::incSlot ( size_t  slot)
inline

Increment the given slot by one.

Parameters
slotSlot to increment

Definition at line 93 of file FragCounter.hh.

void artdaq::detail::FragCounter::incSlot ( size_t  slot,
size_t  inc 
)
inline

Increment the given slot by the given amount.

Parameters
slotSlot to increment
incAmount to increment

Definition at line 101 of file FragCounter.hh.

size_t artdaq::detail::FragCounter::minCount ( ) const
inline

Get the minimum slot count.

Returns
The minimum slot count

Definition at line 151 of file FragCounter.hh.

size_t artdaq::detail::FragCounter::nSlots ( ) const
inline

Get the number of slots this FragCounter instance is tracking.

Returns
The number of slots in this FragCounter instance

Definition at line 119 of file FragCounter.hh.

size_t artdaq::detail::FragCounter::operator[] ( size_t  slot) const
inline

Get the current count for the requested slot.

Parameters
slotSlot to get count for
Returns
The current count for the requested slot

Definition at line 78 of file FragCounter.hh.

void artdaq::detail::FragCounter::setSlot ( size_t  slot,
size_t  val 
)
inline

Set the given slot to the given value.

Parameters
slotSlot to set
valValue to set

Definition at line 110 of file FragCounter.hh.

size_t artdaq::detail::FragCounter::slotCount ( size_t  slot) const
inline

Get the current count for the requested slot.

Parameters
slotSlot to get count for
Returns
The current count for the requested slot

Definition at line 142 of file FragCounter.hh.


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