CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/EventFilter/Utilities/interface/SlaveQueue.h

Go to the documentation of this file.
00001 #ifndef EVENTFILTER_UTILITIES_SLAVEQUEUE_H
00002 #define EVENTFILTER_UTILITIES_SLAVEQUEUE_H
00003 
00004 #include <stdio.h>       /* standard I/O functions.              */
00005 #include <stdlib.h>      /* malloc(), free() etc.                */
00006 #include <sys/types.h>   /* various type definitions.            */
00007 #include <sys/ipc.h>     /* general SysV IPC structures          */
00008 #include <sys/msg.h>     /* message queue functions and structs. */
00009 #include <errno.h>
00010 #include <string.h>
00011 
00012 #include "EventFilter/Utilities/interface/Exception.h"
00013 #include "EventFilter/Utilities/interface/MsgBuf.h"
00014 
00015 namespace evf {
00016 
00017 class SlaveQueue {
00018 
00019 public:
00020 
00021         SlaveQueue(unsigned int ind);
00022         ~SlaveQueue();
00023 
00024         int post(MsgBuf &ptr);
00025         unsigned long rcv(MsgBuf &ptr);
00026         bool rcvQuiet(MsgBuf &ptr);
00027         unsigned long rcvNonBlocking(MsgBuf &ptr);
00028         unsigned long rcvNonBlockingAny(MsgBuf &ptr);
00029         int id() const;
00030 
00031 private:
00032 
00033         int queue_id_; /* ID of the created queue.            */
00034 
00035 };
00036 }
00037 #endif