|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
A Queue Implementation that uses a std::deque as its backend. More...
#include <StdDeQueue.hpp>
Public Types | |
| using | value_t = T |
| Type of data stored in the StdDeQueue. | |
| using | duration_t = typename Queue<T>::duration_t |
| Type used for expressing timeouts. | |
Public Types inherited from dunedaq::iomanager::Queue< T > | |
| using | value_t = T |
| Type stored in the Queue. | |
| using | duration_t = std::chrono::milliseconds |
| Base duration type for timeouts. | |
Public Types inherited from dunedaq::opmonlib::MonitorableObject | |
| using | NodePtr = std::weak_ptr<MonitorableObject> |
| using | NewNodePtr = std::shared_ptr<MonitorableObject> |
| using | ElementId = std::string |
Public Member Functions | |
| StdDeQueue (const std::string &name, size_t capacity) | |
| StdDeQueue Constructor. | |
| bool | can_pop () const noexcept override |
| Determine whether the Queue may be popped from. | |
| void | pop (value_t &val, const duration_t &) override |
| Pop the first value off of the queue. | |
| bool | try_pop (value_t &val, const duration_t &) override |
| bool | can_push () const noexcept override |
| Determine whether the Queue may be pushed onto. | |
| void | push (value_t &&, const duration_t &) override |
| Push a value onto the Queue. | |
| bool | try_push (value_t &&, const duration_t &) override |
| size_t | get_capacity () const override |
| Get the capacity (max size) of the queue. | |
| size_t | get_num_elements () const override |
| StdDeQueue (const StdDeQueue &)=delete | |
| StdDeQueue is not copy-constructible. | |
| StdDeQueue & | operator= (const StdDeQueue &)=delete |
| StdDeQueue is not copy-assignable. | |
| StdDeQueue (StdDeQueue &&)=delete | |
| StdDeQueue is not move-constructible. | |
| StdDeQueue & | operator= (StdDeQueue &&)=delete |
| StdDeQueue is not move-assignable. | |
Public Member Functions inherited from dunedaq::iomanager::Queue< T > | |
| Queue (const std::string &name) | |
| Queue Constructor. | |
Public Member Functions inherited from dunedaq::iomanager::QueueBase | |
| QueueBase (const std::string &name) | |
| QueueBase Constructor. | |
Public Member Functions inherited from dunedaq::utilities::NamedObject | |
| NamedObject (const std::string &name) | |
| NamedObject Constructor. | |
| NamedObject (NamedObject const &)=delete | |
| NamedObject is not copy-constructible. | |
| NamedObject (NamedObject &&)=default | |
| NamedObject is move-constructible. | |
| NamedObject & | operator= (NamedObject const &)=delete |
| NamedObject is not copy-assignable. | |
| NamedObject & | operator= (NamedObject &&)=default |
| NamedObject is move-assignable. | |
| virtual | ~NamedObject ()=default |
| Default virtual destructor. | |
| const std::string & | get_name () const final |
| Get the name of this NamedObejct. | |
Public Member Functions inherited from dunedaq::utilities::Named | |
| Named ()=default | |
| Named Constructor. | |
| Named (Named const &)=delete | |
| Named is not copy-constructible. | |
| Named (Named &&)=default | |
| Named is move-constructible. | |
| Named & | operator= (Named const &)=delete |
| Named is not copy-assignable. | |
| Named & | operator= (Named &&)=default |
| Named is move-assignable. | |
| virtual | ~Named ()=default |
| Default virtual destructor. | |
Public Member Functions inherited from dunedaq::opmonlib::MonitorableObject | |
| MonitorableObject (const MonitorableObject &)=delete | |
| MonitorableObject & | operator= (const MonitorableObject &)=delete |
| MonitorableObject (MonitorableObject &&)=delete | |
| MonitorableObject & | operator= (MonitorableObject &&)=delete |
| virtual | ~MonitorableObject ()=default |
| auto | get_opmon_id () const noexcept |
| auto | get_opmon_level () const noexcept |
Private Member Functions | |
| void | try_lock_for (std::unique_lock< std::mutex > &, const duration_t &) |
Private Attributes | |
| std::deque< value_t > | m_deque |
| size_t | m_capacity |
| std::atomic< size_t > | m_size = 0 |
| std::mutex | m_mutex |
| std::condition_variable | m_no_longer_full |
| std::condition_variable | m_no_longer_empty |
Additional Inherited Members | |
Static Public Member Functions inherited from dunedaq::opmonlib::MonitorableObject | |
| static bool | publishable_metric (OpMonLevel entry, OpMonLevel system) noexcept |
Protected Member Functions inherited from dunedaq::iomanager::QueueBase | |
| void | generate_opmon_data () override |
| Method to retrieve information (occupancy) from queues. | |
Protected Member Functions inherited from dunedaq::opmonlib::MonitorableObject | |
| MonitorableObject ()=default | |
| void | register_node (ElementId name, NewNodePtr) |
| void | publish (google::protobuf::Message &&, CustomOrigin &&co={}, OpMonLevel l=to_level(EntryOpMonLevel::kDefault)) const noexcept |
A Queue Implementation that uses a std::deque as its backend.
| T | Data Type to be stored in the std::deque |
Definition at line 37 of file StdDeQueue.hpp.
| using dunedaq::iomanager::StdDeQueue< T >::duration_t = typename Queue<T>::duration_t |
Type used for expressing timeouts.
Definition at line 41 of file StdDeQueue.hpp.
| using dunedaq::iomanager::StdDeQueue< T >::value_t = T |
Type of data stored in the StdDeQueue.
Definition at line 40 of file StdDeQueue.hpp.
|
explicit |
StdDeQueue Constructor.
| name | Name of this StdDeQueue instance |
Definition at line 7 of file StdDeQueue.hxx.
|
delete |
StdDeQueue is not copy-constructible.
|
delete |
StdDeQueue is not move-constructible.
|
inlineoverridevirtualnoexcept |
Determine whether the Queue may be popped from.
Reimplemented from dunedaq::iomanager::Queue< T >.
Definition at line 49 of file StdDeQueue.hpp.
|
inlineoverridevirtualnoexcept |
Determine whether the Queue may be pushed onto.
Reimplemented from dunedaq::iomanager::Queue< T >.
Definition at line 53 of file StdDeQueue.hpp.
|
inlineoverridevirtual |
Get the capacity (max size) of the queue.
Implements dunedaq::iomanager::QueueBase.
Definition at line 57 of file StdDeQueue.hpp.
|
inlineoverridevirtual |
|
delete |
StdDeQueue is not copy-assignable.
|
delete |
StdDeQueue is not move-assignable.
|
overridevirtual |
Pop the first value off of the queue.
| val | Reference to the value that is popped from the queue |
| timeout | Timeout for the pop operation |
This is a pure virtual function If pop takes longer than the timeout, implementations should throw an exception
Implements dunedaq::iomanager::Queue< T >.
Definition at line 44 of file StdDeQueue.hxx.
|
overridevirtual |
Push a value onto the Queue.
| val | Value to push (rvalue) |
| timeout | Timeout for the push operation. |
This is a pure virtual function. If push takes longer than the timeout, implementations should throw an exception.
Implements dunedaq::iomanager::Queue< T >.
Definition at line 18 of file StdDeQueue.hxx.
|
private |
Definition at line 133 of file StdDeQueue.hxx.
|
overridevirtual |
Implements dunedaq::iomanager::Queue< T >.
Definition at line 99 of file StdDeQueue.hxx.
|
overridevirtual |
Implements dunedaq::iomanager::Queue< T >.
Definition at line 71 of file StdDeQueue.hxx.
|
private |
Definition at line 73 of file StdDeQueue.hpp.
|
private |
Definition at line 72 of file StdDeQueue.hpp.
|
private |
Definition at line 76 of file StdDeQueue.hpp.
|
private |
Definition at line 78 of file StdDeQueue.hpp.
|
private |
Definition at line 77 of file StdDeQueue.hpp.
|
private |
Definition at line 74 of file StdDeQueue.hpp.