![]() |
![]() |
00001 #ifndef FWCore_Framework_MessageForSource_h 00002 #define FWCore_Framework_MessageForSource_h 00003 // -*- C++ -*- 00004 // 00005 // Package: Framework 00006 // Class : MessageForSource 00007 // 00022 // 00023 // Original Author: Chris Jones 00024 // Created: Thu Dec 30 10:08:24 CST 2010 00025 // $Id: MessageForSource.h,v 1.1 2011/01/02 19:50:58 chrjones Exp $ 00026 // 00027 00028 // system include files 00029 00030 // user include files 00031 00032 // forward declarations 00033 00034 namespace edm { 00035 namespace multicore { 00036 class MessageForSource 00037 { 00038 00039 public: 00040 MessageForSource(): 00041 mtype(MessageForSource::messageType()) {} 00042 00043 //virtual ~MessageForSource(); 00044 00045 // ---------- const member functions --------------------- 00046 00047 // ---------- static member functions -------------------- 00048 static size_t sizeForBuffer() { 00049 //posix message queue needs to know how much information to 00050 //send excluding the manditory 'type' (which must be a long). 00051 return sizeof(MessageForSource)-sizeof(long); 00052 } 00053 static long messageType() { return 1;} 00054 00055 // ---------- member functions --------------------------- 00056 00057 public: 00058 //MessageForSource(const MessageForSource&); // allow default 00059 00060 //const MessageForSource& operator=(const MessageForSource&); // allow default 00061 00062 // ---------- member data -------------------------------- 00063 long mtype; //posixs requires the first member data be a long which holds the 'type' 00064 unsigned long startIndex; //which event index to start processing for this 'block' 00065 unsigned long nIndices; //number of consecutive indicies in the block 00066 00067 }; 00068 } 00069 } 00070 00071 #endif