CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
i2oEvfMsgs.h
Go to the documentation of this file.
1 #ifndef I2OEVFMSGS_H
2 #define I2OEVFMSGS_H
3 
4 
5 #include "i2o/i2o.h"
6 #include <string.h>
7 
8 
9 //#include "IOPool/Streamer/interface/MsgTools.h"
10 
11 /*
12  Description:
13  ------------
14  define communication protocoll between FUResourceBroker ('FU') and
15  StorageManager ('SM').
16 
17  $Id: i2oEvfMsgs.h,v 1.5 2012/05/02 15:13:23 smorovic Exp $
18 */
19 
20 // I2O function codes: *_SM_* / *_FU_* according to who *receives* the message
21 #define I2O_SM_PREAMBLE 0x001a
22 #define I2O_SM_DATA 0x001b
23 #define I2O_SM_ERROR 0x001c
24 #define I2O_SM_OTHER 0x001d
25 #define I2O_SM_DQM 0x001e
26 #define I2O_FU_DATA_DISCARD 0x001f
27 #define I2O_FU_DQM_DISCARD 0x0020
28 
29 //
30 // RunNumber_t and EventNumber_t are unsigned long variables
31 // We will use U32 instead for 64-bit compatibility
32 //
33 // source (FU/HLT) id could be compressed into fewer bytes!
34 //
35 // max I2O frame is (2**16 - 1) * 4 = 65535 * 4 = 262140
36 // but this size should also be a multiple of 64 bits (8 bytes)
37 #define I2O_ABSOLUTE_MAX_SIZE 262136
38 
39 // Illustrate calculation of max data I2O frame for given KB:
40 // If 32KB (e.g. for MTCC-I) max = (2**13 - 1) * 4 = 32764
41 // but to be a multiple of 8 bytes it needs to be = 32760
42 //
43 // Actual value can be defined to any multiple of 8 bytes
44 // and less than I2O_ABSOLUTE_MAX_SIZE
45 // set the default if no value is given in the output module
46 #define I2O_MAX_SIZE 64000
47 
48 // max data I2O frame needs to be calculated as e.g.
49 // I2O_MAX_SIZE - headers = I2O_MAX_SIZE - 28 -136
50 // now done dynamically in e.g. FUStreamerI2OWriter.cc
51 //
52 // maximum characters for the source class name and url
53 #define MAX_I2O_SM_URLCHARS 50
54 
55 
61 {
62  I2O_PRIVATE_MESSAGE_FRAME PvtMessageFrame;
63  U32 dataSize;
68  U32 hltTid;
69  U32 numFrames;
72 };
73 
76 
77 
83 {
85  U32 outModID;
86  U32 fuProcID;
87  U32 fuGUID;
89  char* dataPtr() const
90  {
91  return (char*)this+sizeof(_I2O_SM_PREAMBLE_MESSAGE_FRAME);
92  }
93 }
95 
96 
101 {
103  U32 runID;
104  U32 eventID;
105  U32 outModID;
106  U32 fuProcID;
107  U32 fuGUID;
108  char* dataPtr() const {
109  return (char*)this+sizeof(_I2O_SM_DATA_MESSAGE_FRAME);
110  }
111 }
113 
114 
119 {
120  I2O_PRIVATE_MESSAGE_FRAME PvtMessageFrame;
122 }
124 
125 
130 {
132  U32 runID;
134  U32 folderID;
135  U32 fuProcID;
136  U32 fuGUID;
137  char* dataPtr() const
138  {
139  return (char*)this+sizeof(_I2O_SM_DQM_MESSAGE_FRAME);
140  }
141 }
143 
144 
149 {
150  I2O_PRIVATE_MESSAGE_FRAME PvtMessageFrame;
152 }
154 
155 
160 {
162  char* dataPtr() const
163  {
164  return (char*)this+sizeof(_I2O_SM_OTHER_MESSAGE_FRAME);
165  }
166 }
168 
169 
170 #endif
struct _I2O_SM_MULTIPART_MESSAGE_FRAME * PI2O_SM_MULTIPART_MESSAGE_FRAME
Definition: i2oEvfMsgs.h:74
I2O_PRIVATE_MESSAGE_FRAME PvtMessageFrame
Definition: i2oEvfMsgs.h:150
_I2O_SM_DQM_MESSAGE_FRAME I2O_SM_DQM_MESSAGE_FRAME
struct _I2O_FU_DATA_DISCARD_MESSAGE_FRAME I2O_FU_DATA_DISCARD_MESSAGE_FRAME
_I2O_SM_PREAMBLE_MESSAGE_FRAME * PI2O_SM_PREAMBLE_MESSAGE_FRAME
I2O_PRIVATE_MESSAGE_FRAME PvtMessageFrame
Definition: i2oEvfMsgs.h:120
char * dataPtr() const
Definition: i2oEvfMsgs.h:162
struct _I2O_FU_DATA_DISCARD_MESSAGE_FRAME * PI2O_FU_DATA_DISCARD_MESSAGE_FRAME
_I2O_SM_OTHER_MESSAGE_FRAME * PI2O_SM_OTHER_MESSAGE_FRAME
_I2O_SM_DATA_MESSAGE_FRAME * PI2O_SM_DATA_MESSAGE_FRAME
_I2O_SM_PREAMBLE_MESSAGE_FRAME I2O_SM_PREAMBLE_MESSAGE_FRAME
_I2O_SM_OTHER_MESSAGE_FRAME I2O_SM_OTHER_MESSAGE_FRAME
char * dataPtr() const
Definition: i2oEvfMsgs.h:108
char hltURL[MAX_I2O_SM_URLCHARS]
Definition: i2oEvfMsgs.h:64
struct _I2O_FU_DQM_DISCARD_MESSAGE_FRAME I2O_FU_DQM_DISCARD_MESSAGE_FRAME
struct _I2O_FU_DQM_DISCARD_MESSAGE_FRAME * PI2O_FU_DQM_DISCARD_MESSAGE_FRAME
char hltClassName[MAX_I2O_SM_URLCHARS]
Definition: i2oEvfMsgs.h:65
_I2O_SM_DATA_MESSAGE_FRAME I2O_SM_DATA_MESSAGE_FRAME
_I2O_SM_DQM_MESSAGE_FRAME * PI2O_SM_DQM_MESSAGE_FRAME
#define MAX_I2O_SM_URLCHARS
Definition: i2oEvfMsgs.h:53
char * dataPtr() const
Definition: i2oEvfMsgs.h:137
I2O_PRIVATE_MESSAGE_FRAME PvtMessageFrame
Definition: i2oEvfMsgs.h:62