FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ptrevmbsdef.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 /*********************************************************************
9  * ptrevmbsdef.h
10  * contains declarations and definitions for GSI MBS 10.1 events
11  * used in ROOT clients for multithreaded remote event server
12  * created 18. 2.99, Horst Goeringer, GSI
13  *
14  * 27. 4.1999, H.G.: replace xxx_ENDIAN -> xxx__ENDIAN
15  * xxx_ENDIAN used by AIX (machine.h)
16  * 16. 9.1999, H.G.: add complete buffer header sMbsBufHead
17  * rename VMEx -> MbsX
18  * 23. 9.1999, H.G.: additional definitions old PAW clients
19  *********************************************************************
20  */
21 
22 #ifdef _AIX
23 #define BIG__ENDIAN 1
24 #endif
25 #ifdef Linux
26 #define LITTLE__ENDIAN 1
27 #endif
28 
29 #define COMMSIZE 404 /* max size comm. buffer (old and new clients) */
30 #define INFOALL 512
31 /* max size info buffers (old and new clients) and header (old) */
32 #define HEADOLD 344 /* header size (old clients) */
33 
34 /************************* buffer header *****************************/
35 
36 typedef struct
37 { /* MBS buffer header */
38  long lBuf_dlen; /* buffer length without header (2byte words) */
39 #ifdef BIG__ENDIAN
40  short sBuf_subtype; /* buffer subtype */
41  short sBuf_type; /* buffer type */
42  short sBuf_frag; /* fragment bytes */
43  short sBuf_ulen; /* used data length (2byte words) */
44 #else
45  short sBuf_type; /* buffer type */
46  short sBuf_subtype; /* buffer subtype */
47  short sBuf_ulen; /* used data length (2byte words) */
48  short sBuf_frag; /* fragment bytes */
49 #endif
50  long lBuf_bufno; /* current buffer number */
51  long lBuf_ele; /* number of elements in buffer */
52  long lBuf_rem[7]; /* unused remainder of buffer header */
53 } sMbsBufHead;
54 
55 /* */
56 
57 typedef struct
58 { /* fragment word of buffer header */
59 #ifdef BIG__ENDIAN
60  unsigned char cBuf_fragBegin; /* fragment begin flag */
61  unsigned char cBuf_fragEnd; /* fragment end flag */
62  short sBuf_ulen; /* used Data length in words (2 byte) */
63 #else
64  short sBuf_ulen; /* used Data length in words (2 byte) */
65  unsigned char cBuf_fragEnd; /* fragment end flag */
66  unsigned char cBuf_fragBegin; /* fragment begin flag */
67 #endif
68 } sMbsBufFrag;
69 
70 /************************ event header *******************************/
71 
72 typedef struct
73 { /* event header */
74  int iMbsEv101_dlen; /* Data length in words */
75 #ifdef BIG__ENDIAN
76  short sMbsEv101_subtype;
77  short sMbsEv101_type;
78  short sMbsEv101_trigger; /* Trigger number */
79  short sMbsEv101_dummy; /* Not used yet */
80 #else
83  short sMbsEv101_dummy; /* Not used yet */
84  short sMbsEv101_trigger; /* Trigger number */
85 #endif
86  int iMbsEv101_count; /* Current event number */
87 } sMbsEv101;
88 
89 /************************* subevent header ***************************/
90 
91 typedef struct
92 { /* subevent header 10.1 */
93 #ifdef BIG__ENDIAN
94  int iMbsSev101_dlen; /* Data length in words */
95  short sMbsSev101_subtype;
96  short sMbsSev101_type;
97  unsigned char cMbsSev101_control;
98  unsigned char cMbsSev101_subcrate; /* Camac subcrate */
99  short sMbsSev101_procid; /* processor id. */
100 #else
101  int iMbsSev101_dlen; /* Data length in words */
104  short sMbsSev101_procid; /* processor id. */
105  unsigned char cMbsSev101_subcrate; /* Camac subcrate */
106  unsigned char cMbsSev101_control;
107 #endif
108 } sMbsSev101;
109 
110 /* end ptrevmbsdef.h */
int iMbsEv101_count
Definition: ptrevmbsdef.h:86
long lBuf_bufno
Definition: ptrevmbsdef.h:50
long lBuf_dlen
Definition: ptrevmbsdef.h:38
short sMbsSev101_type
Definition: ptrevmbsdef.h:102
short sMbsEv101_type
Definition: ptrevmbsdef.h:81
unsigned char cMbsSev101_subcrate
Definition: ptrevmbsdef.h:105
unsigned char cBuf_fragBegin
Definition: ptrevmbsdef.h:66
short sBuf_ulen
Definition: ptrevmbsdef.h:47
short sBuf_ulen
Definition: ptrevmbsdef.h:64
long lBuf_ele
Definition: ptrevmbsdef.h:51
short sMbsEv101_dummy
Definition: ptrevmbsdef.h:83
int iMbsSev101_dlen
Definition: ptrevmbsdef.h:101
short sBuf_frag
Definition: ptrevmbsdef.h:48
short sBuf_type
Definition: ptrevmbsdef.h:45
short sMbsEv101_subtype
Definition: ptrevmbsdef.h:82
short sBuf_subtype
Definition: ptrevmbsdef.h:46
short sMbsSev101_subtype
Definition: ptrevmbsdef.h:103
unsigned char cMbsSev101_control
Definition: ptrevmbsdef.h:106
short sMbsEv101_trigger
Definition: ptrevmbsdef.h:84
int iMbsEv101_dlen
Definition: ptrevmbsdef.h:74
unsigned char cBuf_fragEnd
Definition: ptrevmbsdef.h:65
short sMbsSev101_procid
Definition: ptrevmbsdef.h:104