CMS 3D CMS Logo

ThreadQueue.h
Go to the documentation of this file.
1 #ifndef FWCore_MessageService_ThreadQueue_h
2 #define FWCore_MessageService_ThreadQueue_h
3 // -*- C++ -*-
4 //
5 // Package: MessageService
6 // Class : ThreadQueue
7 //
16 //
17 // Original Author: mf and cdj
18 // Created: Fri Aug 7 10:19:58 CDT 2009
19 //
20 
23 
24 namespace edm {
25  namespace service {
26 
27  class ThreadQueue {
28  public:
29  ThreadQueue();
30  virtual ~ThreadQueue();
31 
32  // ---------- const member functions ---------------------
33 
34  // ---------- static member functions --------------------
35 
36  // ---------- member functions ---------------------------
37 
38  // --- obtain a message from the queue:
39  void consume(MessageLoggerQ::OpCode& opcode, void*& operand);
40 
41  // --- place a message onto the queue:
42  void produce(MessageLoggerQ::OpCode opcode, void* operand);
43 
44  private:
45  ThreadQueue(const ThreadQueue&) = delete; // stop default
46 
47  const ThreadQueue& operator=(const ThreadQueue&) = delete; // stop default
48 
49  // ---------- member data --------------------------------
50 
51  // --- buffer parameters: (were private but needed by MainTrhreadMLscribe
52  static const int buf_depth = 500;
53  static const int buf_size = sizeof(MessageLoggerQ::OpCode) + sizeof(void*);
55  };
56 
57  } // end namespace service
58 } // end namespace edm
59 
60 #endif
service
Definition: service.py:1
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::service::ThreadQueue::buf_depth
static const int buf_depth
Definition: ThreadQueue.h:52
SingleConsumerQ.h
MessageLoggerQ.h
edm::SingleConsumerQ
Definition: SingleConsumerQ.h:43
edm::service::ThreadQueue::~ThreadQueue
virtual ~ThreadQueue()
Definition: ThreadQueue.cc:16
edm::service::ThreadQueue
Definition: ThreadQueue.h:27
edm::service::ThreadQueue::consume
void consume(MessageLoggerQ::OpCode &opcode, void *&operand)
Definition: ThreadQueue.cc:27
edm::service::ThreadQueue::m_buf
SingleConsumerQ m_buf
Definition: ThreadQueue.h:54
edm::service::ThreadQueue::ThreadQueue
ThreadQueue()
Definition: ThreadQueue.cc:15
edm::service::ThreadQueue::produce
void produce(MessageLoggerQ::OpCode opcode, void *operand)
Definition: ThreadQueue.cc:18
edm::service::ThreadQueue::buf_size
static const int buf_size
Definition: ThreadQueue.h:53
edm::service::ThreadQueue::operator=
const ThreadQueue & operator=(const ThreadQueue &)=delete
edm::MessageLoggerQ::OpCode
OpCode
Definition: MessageLoggerQ.h:26