artdaq::FailIfFull< T > Struct Template Reference

ConcurrentQueue policy to throw an exception when the queue is full. More...

#include <artdaq-core/Core/ConcurrentQueue.hh>

List of all members.

Classes

struct  QueueIsFull
 Exception thrown by FailIfFull policy when an enqueue operation is attempted on a full queue. More...

Public Types

typedef bool ReturnType
 Type returned by doEnq.
typedef T ValueType
 Type of values stored in queue.
typedef std::list< T > SequenceType
 Type of seqeuences of values.
typedef SequenceType::size_type SizeType
 Size type of seqeuences.

Static Public Member Functions

static void doInsert (T const &item, SequenceType &elements, SizeType &size, detail::MemoryType const &itemSize, detail::MemoryType &used, std::condition_variable &nonempty)
 Inserts element into the ConcurrentQueue.
static ReturnType doEnq (T const &item, SequenceType &elements, SizeType &size, SizeType &capacity, detail::MemoryType &used, detail::MemoryType &memory, size_t &elementsDropped, std::condition_variable &nonempty)
 Attempts to enqueue an item.

Static Public Attributes

artdaq::FailIfFull::QueueIsFull queueIsFull
 Exception thrown by FailIfFull policy when an enqueue operation is attempted on a full queue.

Detailed Description

template<class T>
struct artdaq::FailIfFull< T >

ConcurrentQueue policy to throw an exception when the queue is full.

Template Parameters:
T Type of element to store in queue

Definition at line 161 of file ConcurrentQueue.hh.


Member Function Documentation

template<class T >
static ReturnType artdaq::FailIfFull< T >::doEnq ( T const &  item,
SequenceType elements,
SizeType size,
SizeType capacity,
detail::MemoryType used,
detail::MemoryType memory,
size_t &  elementsDropped,
std::condition_variable &  nonempty 
) [inline, static]

Attempts to enqueue an item.

Parameters:
item Item to enqueue
elements The ConcurrentQueue data
size Number of elements in the ConcurrentQueue
capacity Maximum number of elements in the ConcurrentQueue
used Memory used by the ConcurrentQueue elements
memory Amount of memory available for use by the ConcurrentQueue
elementsDropped Number of failed insert operations
nonempty Condition variable to notify readers of new data on the queue
Returns:
Whether the enqueue operation succeeded
Exceptions:
queueIsFull if the queue is full

Definition at line 223 of file ConcurrentQueue.hh.

template<class T >
static void artdaq::FailIfFull< T >::doInsert ( T const &  item,
SequenceType elements,
SizeType size,
detail::MemoryType const &  itemSize,
detail::MemoryType used,
std::condition_variable &  nonempty 
) [inline, static]

Inserts element into the ConcurrentQueue.

Parameters:
item Item to insert
elements The ConcurrentQueue data
size Number of elements in the ConcurrentQueue
itemSize Size of the newly-inserted element
used Memory used by the ConcurrentQueue elements
nonempty Condition variable to notify readers of new data on queue

Definition at line 194 of file ConcurrentQueue.hh.


Member Data Documentation

Exception thrown by FailIfFull policy when an enqueue operation is attempted on a full queue.

Instance of QueueIsFull exception


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

Generated on 3 May 2018 for artdaq_core by  doxygen 1.6.1