artdaq_core
v3_05_00
|
artdaq implementation details namespace More...
Classes | |
class | hasMemoryUsed |
struct | RawFragmentHeader |
The RawFragmentHeader class contains the basic fields used by artdaq for routing Fragment objects through the system. More... | |
struct | RawFragmentHeaderV0 |
The RawFragmentHeaderV0 class contains the basic fields used by artdaq for routing Fragment objects through the system. More... | |
struct | RawFragmentHeaderV1 |
The RawFragmentHeaderV1 class contains the basic fields used by artdaq for routing Fragment objects through the system. More... | |
struct | RawEventHeader |
The header information used to identify key properties of the RawEvent object. More... | |
Typedefs | |
typedef std::chrono::duration < double > | seconds |
typedef size_t | MemoryType |
Basic unit of data storage and pointer types. | |
Functions | |
template<typename T > | |
MemoryType | memoryUsage (const std::pair< T, size_t > &t) |
Returns the memory used by an object. More... | |
template<typename T > | |
std::enable_if< hasMemoryUsed < T >::value, MemoryType > ::type | memoryUsage (const T &t) |
Returns the memory used by an object. Uses hasMemoryUsed to determine if there is a memoryUsed function in object. More... | |
template<typename T > | |
std::enable_if<!hasMemoryUsed < T >::value, MemoryType > ::type | memoryUsage (const T &t) |
Returns the memory used by an object, as obtained through sizeof. More... | |
artdaq implementation details namespace
Class template ConcurrentQueue provides a FIFO that can be used to communicate data between multiple producer and consumer threads in an application.
The template policy EnqPolicy determines the behavior of the enqNowait function. In all cases, this function will return promptly (that is, it will not wait for a full queue to become not-full). However, what is done in the case of the queue being full depends on the policy chosen:
FailIfFull: a std::exeption is thrown if the queue is full.
KeepNewest: the head of the FIFO is popped (and destroyed), and the new item is added to the FIFO. The function returns the number of popped (dropped) element.
RejectNewest: the new item is not put onto the FIFO. The function returns the dropped event count (1) if the item cannot be added.
typedef std::chrono::duration<double> artdaq::detail::seconds |
We shall use artdaq::detail::seconds as our "standard" duration type. Note that this differs from std::chrono::seconds, which has a representation in some integer type of at least 35 bits.
daqrate::duration dur(1.0) represents a duration of 1 second. daqrate::duration dur2(0.001) represents a duration of 1 millisecond.
Definition at line 62 of file ConcurrentQueue.hh.
MemoryType artdaq::detail::memoryUsage | ( | const std::pair< T, size_t > & | t | ) |
Returns the memory used by an object.
T | The type of the object |
t | A pair of object and size_t |
Definition at line 111 of file ConcurrentQueue.hh.
std::enable_if<hasMemoryUsed<T>::value, MemoryType>::type artdaq::detail::memoryUsage | ( | const T & | t | ) |
Returns the memory used by an object. Uses hasMemoryUsed to determine if there is a memoryUsed function in object.
T | Type of object t |
t | Object to retrieve memory usage from |
Definition at line 130 of file ConcurrentQueue.hh.
std::enable_if<!hasMemoryUsed<T>::value, MemoryType>::type artdaq::detail::memoryUsage | ( | const T & | t | ) |
Returns the memory used by an object, as obtained through sizeof.
T | Type of object t |
t | Object to retrieve memory usage from |
Definition at line 149 of file ConcurrentQueue.hh.