CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: ThreadQueue.h,v 1.1 2009/08/12 22:22:01 fischler Exp $
20 //
21 
24 
25 
26 
27 
28 namespace edm {
29 namespace service {
30 
32 {
33 
34  public:
35  ThreadQueue();
36  virtual ~ThreadQueue();
37 
38  // ---------- const member functions ---------------------
39 
40  // ---------- static member functions --------------------
41 
42  // ---------- member functions ---------------------------
43 
44  // --- obtain a message from the queue:
45  void consume( MessageLoggerQ::OpCode & opcode, void * & operand );
46 
47  // --- place a message onto the queue:
48  void produce( MessageLoggerQ::OpCode opcode, void * operand );
49 
50 
51  private:
52  ThreadQueue(const ThreadQueue&); // stop default
53 
54  const ThreadQueue& operator=(const ThreadQueue&); // stop default
55 
56  // ---------- member data --------------------------------
57 
58  // --- buffer parameters: (were private but needed by MainTrhreadMLscribe
59  static const int buf_depth = 500;
60  static const int buf_size = sizeof(MessageLoggerQ::OpCode)
61  + sizeof(void *);
63 
64 };
65 
66 } // end namespace service
67 } // end namespace edm
68 
69 #endif
static const int buf_depth
Definition: ThreadQueue.h:59
void consume(MessageLoggerQ::OpCode &opcode, void *&operand)
Definition: ThreadQueue.cc:35
void produce(MessageLoggerQ::OpCode opcode, void *operand)
Definition: ThreadQueue.cc:23
static const int buf_size
Definition: ThreadQueue.h:60
SingleConsumerQ m_buf
Definition: ThreadQueue.h:62
const ThreadQueue & operator=(const ThreadQueue &)