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
const ThreadQueue & operator=(const ThreadQueue &)=delete
static const int buf_depth
Definition: ThreadQueue.h:52
void consume(MessageLoggerQ::OpCode &opcode, void *&operand)
Definition: ThreadQueue.cc:27
HLT enums.
void produce(MessageLoggerQ::OpCode opcode, void *operand)
Definition: ThreadQueue.cc:18
static const int buf_size
Definition: ThreadQueue.h:53
SingleConsumerQ m_buf
Definition: ThreadQueue.h:54