1 #include "artdaq/DAQrate/detail/FragCounter.hh"
2 #include "canvas/Utilities/Exception.h"
6 #define BOOST_TEST_MODULE(FragCounter_t)
7 #include <boost/test/auto_unit_test.hpp>
9 BOOST_AUTO_TEST_SUITE(FragCounter_test)
19 BOOST_REQUIRE_EQUAL(f1.
nSlots(), 0ul);
34 BOOST_REQUIRE_EQUAL(f.
count(), 8ul);
49 BOOST_REQUIRE_EQUAL(f.
count(), 8ul);
52 BOOST_AUTO_TEST_SUITE_END()
Keep track of the count of Fragments received from a set of sources.
void incSlot(size_t slot)
Increment the given slot by one.
size_t nSlots() const
Get the number of slots this FragCounter instance is tracking.
size_t slotCount(size_t slot) const
Get the current count for the requested slot.
size_t count() const
Get the total number of Fragments received.