#include <ThreadQueue.h>
Public Member Functions | |
void | consume (MessageLoggerQ::OpCode &opcode, void *&operand) |
void | produce (MessageLoggerQ::OpCode opcode, void *operand) |
ThreadQueue () | |
virtual | ~ThreadQueue () |
Private Member Functions | |
const ThreadQueue & | operator= (const ThreadQueue &) |
ThreadQueue (const ThreadQueue &) | |
Private Attributes | |
SingleConsumerQ | m_buf |
Static Private Attributes | |
static const int | buf_depth = 500 |
static const int | buf_size |
Definition at line 31 of file ThreadQueue.h.
ThreadQueue::ThreadQueue | ( | ) |
Definition at line 15 of file ThreadQueue.cc.
ThreadQueue::~ThreadQueue | ( | ) | [virtual] |
Definition at line 19 of file ThreadQueue.cc.
{}
edm::service::ThreadQueue::ThreadQueue | ( | const ThreadQueue & | ) | [private] |
void ThreadQueue::consume | ( | MessageLoggerQ::OpCode & | opcode, |
void *& | operand | ||
) |
Definition at line 35 of file ThreadQueue.cc.
References b, buf_size, edm::SingleConsumerQ::OperateBuffer< T >::buffer(), edm::SingleConsumerQ::OperateBuffer< T >::commit(), and m_buf.
{ SingleConsumerQ::ConsumerBuffer b(m_buf); // Look -- CONSUMER buffer char * slot_p = static_cast<char *>(b.buffer()); std::memcpy(&opcode , slot_p+0 , sizeof(MessageLoggerQ::OpCode)); std::memcpy(&operand, slot_p+sizeof(MessageLoggerQ::OpCode), sizeof(void *)); b.commit(buf_size); }
const ThreadQueue& edm::service::ThreadQueue::operator= | ( | const ThreadQueue & | ) | [private] |
void ThreadQueue::produce | ( | MessageLoggerQ::OpCode | opcode, |
void * | operand | ||
) |
Definition at line 23 of file ThreadQueue.cc.
References b, buf_size, edm::SingleConsumerQ::OperateBuffer< T >::buffer(), edm::SingleConsumerQ::OperateBuffer< T >::commit(), m_buf, and findQualityFiles::v.
{ SingleConsumerQ::ProducerBuffer b(m_buf); char * slot_p = static_cast<char *>(b.buffer()); void * v = operand; std::memcpy(slot_p+0 , &o, sizeof(MessageLoggerQ::OpCode)); std::memcpy(slot_p+sizeof(MessageLoggerQ::OpCode), &v, sizeof(void *)); b.commit(buf_size); } // runCommand
const int edm::service::ThreadQueue::buf_depth = 500 [static, private] |
Definition at line 59 of file ThreadQueue.h.
const int edm::service::ThreadQueue::buf_size [static, private] |
sizeof(MessageLoggerQ::OpCode) + sizeof(void *)
Definition at line 60 of file ThreadQueue.h.
Definition at line 62 of file ThreadQueue.h.