CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/EventFilter/Utilities/interface/queue_defs.h

Go to the documentation of this file.
00001 #ifndef EVENTFILTER_UTILITIES_QUEUE_DEFS_H
00002 #define EVENTFILTER_UTILITIES_QUEUE_DEFS_H
00003 
00004 /*
00005  * queue_defs.h - common macros and definitions for the public message
00006  *                queue
00007  */
00008 
00009 #define QUEUE_ID 137      /* base ID of queue to generate.M->S = odd, S->M = even */
00010 #define MAX_MSG_SIZE 0x2000  /* size (in bytes) of largest message we'll ever send. 
00011                                 This is the system max  */
00012 
00013 #define MSGQ_MESSAGE_TYPE_RANGE 0xfff
00014 
00015 #define MSQM_MESSAGE_TYPE_NOP  0x000
00016 #define MSQM_MESSAGE_TYPE_STOP 0x002
00017 #define MSQM_MESSAGE_TYPE_MCS  0x004
00018 #define MSQM_MESSAGE_TYPE_PRG  0x008
00019 #define MSQM_MESSAGE_TYPE_WEB  0x00a
00020 #define MSQM_MESSAGE_TYPE_TRP  0x00c
00021 #define MSQM_VULTURE_TYPE_STA  0x00e
00022 #define MSQM_VULTURE_TYPE_STP  0x010
00023 
00024 
00025 #define MSQS_MESSAGE_TYPE_NOP  0x000
00026 #define MSQS_MESSAGE_TYPE_SLA  0x200
00027 #define MSQS_MESSAGE_TYPE_MCR  0x202
00028 #define MSQS_MESSAGE_TYPE_STOP 0x204
00029 #define MSQS_MESSAGE_TYPE_PRR  0x208
00030 #define MSQS_MESSAGE_TYPE_WEB  0x20a
00031 #define MSQS_MESSAGE_TYPE_TRR  0x20c
00032 #define MSQS_VULTURE_TYPE_ACK  0x20e
00033 #define MSQS_VULTURE_TYPE_DON  0x210
00034 
00035 #define NUMERIC_MESSAGE_SIZE 32
00036 
00037 #define PIPE_READ 0
00038 #define PIPE_WRITE 1
00039 #define MAX_PIPE_BUFFER_SIZE 0x1000
00040 
00041 #include <sys/msg.h> 
00042 #ifdef __APPLE__
00043 // Unsupported on macosx. We define a dummy msgbuf struct just to make sure it
00044 // compiles fine.
00045 struct msgbuf
00046   {
00047     unsigned long int mtype;    /* type of received/sent message */
00048     char mtext[1];           /* message payload */
00049   };
00050 #endif
00051 
00052 namespace evf{
00053   struct prg{
00054     prg():ls(0),ps(0),nbp(0),nba(0),Ms(0),ms(0),dqm(0),trp(0){}
00055     unsigned int ls;
00056     unsigned int ps;
00057     unsigned int nbp;
00058     unsigned int nba;
00059     unsigned int Ms;
00060     unsigned int ms;
00061     unsigned int dqm;
00062     unsigned int trp;
00063   };
00064   
00065 
00066 }
00067 
00068 #endif /* QUEUE_DEFS_H */