FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
f_evt.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 /***************** f_evt.h ******************************/
9 #ifndef F_EVT
10 #define F_EVT
11 
12 #include "typedefs.h"
13 
14 /* ++++++++++++++++ include UNIX standard headers +++++++++++++++++++++++++ */
15 
16 #if MBS_ENDIAN == 1
17 #include "s_bufhe.h"
18 #include "s_evhe.h"
19 #include "s_ve10_1.h"
20 #include "s_ves10_1.h"
21 #else
22 #include "s_bufhe_swap.h"
23 #include "s_evhe_swap.h"
24 #include "s_ve10_1_swap.h"
25 #include "s_ves10_1_swap.h"
26 #endif
27 
28 #define MAX_BUF_LGTH 32768
29 #define MIN_BUF_LGTH 512
30 #define MAX_BUFS_IN_STREAM 100 /* at a maximum, 100 buffers per stream */
31 #define MAX_LONG 99999999 /* maximum long data */
32 
33 typedef struct
34 {
44 } s_taghe;
45 
46 typedef struct
47 {
50 } s_tag;
51 
52 struct sLmdControl;
53 
54 typedef struct
55 {
56  INTS4 l_server_type; /* number specifying input source */
57  INTS4 l_buf_type; /* buffer type number */
58  INTS4 l_buf_subtype; /* buffer subtype number */
59  INTS4 l_channel_no; /* file descripter or server No. */
60  INTS4 l_buf_size; /* buffer size */
64  INTS4 l_bufs_in_stream; /* # of buffers per stream */
66  INTS4 l_io_buf_size; /* I/O buffer size=l_buf_size*l_bufs_in_stream */
68  INTS4 l_evt_buf_size; /* internal buffer size */
71  INTS4 l_timeout; /* -1 (default) no timeout */
72  INTS4 l_events; /* events since open */
73  INTS4 l_buffers; /* buffers since open */
74  INTS4 l_kbytes; /* kbytes since open */
79  CHARS* pc_io_buf; /* pointer to I/O buffer to server */
80  CHARS* pc_evt_buf; /* pointer to internal event buffer */
82  s_bufhe s_bufhe_1; /* keep buffer header of 1st buffer for spanned event */
84  CHARS c_channel[128]; /* channel name */
85  INTS4 l_tagfile_no; /* file descripter or server No. */
92 
115 
116 /* ******************************/
117 /* Input selector */
118 /* ******************************/
119 #define GETEVT__FILE 1
120 #define GETEVT__STREAM 2
121 #define GETEVT__TRANS 3
122 #define GETEVT__EVENT 4
123 #define GETEVT__REVSERV 5
124 #define GETEVT__RFIO 6
125 #define GETEVT__TAGINDEX 10
126 #define GETEVT__TAGNUMBER 11
127 /* ********************************************************************** */
128 /* error messages */
129 /* ********************************************************************** */
130 #define GETEVT__SUCCESS 0
131 #define GETEVT__FAILURE 1
132 #define GETEVT__FRAGMENT 2
133 #define GETEVT__NOMORE 3
134 #define GETEVT__NOFILE 4
135 #define GETEVT__NOSERVER 5
136 #define GETEVT__RDERR 6
137 #define GETEVT__CLOSE_ERR 7
138 #define GETEVT__NOCHANNEL 8
139 #define GETEVT__TIMEOUT 9
140 #define GETEVT__NOTAGFILE 10
141 #define GETEVT__NOTAG 11
142 #define GETEVT__TAGRDERR 12
143 #define GETEVT__TAGWRERR 13
144 #define GETEVT__NOLMDFILE 14
145 
146 #define PUTEVT__SUCCESS 0
147 #define PUTEVT__FILE_EXIST 101
148 #define PUTEVT__FAILURE 102
149 #define PUTEVT__TOOBIG 103
150 #define PUTEVT__TOO_SMALLS 104
151 #define PUTEVT__CLOSE_ERR 105
152 #define PUTEVT__WRERR 106
153 #define PUTEVT__NOCHANNEL 107
154 
155 #endif
156 /***************** End f_evt.h ******************************/
INTS4 l_buf_type
Definition: f_evt.h:57
INTS4 l_last
Definition: f_evt.h:42
INTS4 f_evt_rev_port(INTS4 l_port)
Definition: f_evt.c:513
INTS4 l_channel_no
Definition: f_evt.h:59
s_tag * ps_tag
Definition: f_evt.h:89
INTS4 f_evt_get_subevent(s_ve10_1 *ps_ve10_1, INTS4 l_subevent, INTS4 **pl_se, INTS4 **pl_d, INTS4 *pl_lwords)
Definition: f_evt.c:228
CHARS * pc_evt_buf
Definition: f_evt.h:80
INTS4 f_evt_type(s_bufhe *ps_bufhe, s_evhe *ps_evhe, INTS4 l_subid, INTS4 l_long, INTS4 l_hex, INTS4 l_data)
Definition: f_evt.c:306
INTS4 l_first_buf
Definition: f_evt.h:77
INTS4 l_buffers
Definition: f_evt.h:38
INTS4 f_evt_get_close(s_evt_channel *ps_chan)
Definition: f_evt.c:1189
INTS4 l_lmdswap
Definition: f_evt.h:87
sLmdControl * pLmd
Definition: f_evt.h:90
INTS4 f_evt_get_open(INTS4 l_mode, CHARS *pc_server, s_evt_channel *ps_chan, CHARS **ps_info, INTS4 l_sample, INTS4 l_param)
Definition: f_evt.c:555
s_bufhe s_bufhe_1
Definition: f_evt.h:82
INTS4 f_evt_get_buffer(s_evt_channel *ps_chan, INTS4 *ps_buffer)
Definition: f_evt.c:1869
INTS4 l_buffers
Definition: f_evt.h:73
INTS4 l_first_get
Definition: f_evt.h:75
INTS4 f_evt_timeout(s_evt_channel *ps_chan, INTS4 l_sec)
Definition: f_evt.c:2013
s_bufhe * ps_bufhe
Definition: f_evt.h:81
INTS4 l_buf_size
Definition: f_evt.h:60
INTS4 f_evt_put_event(s_evt_channel *ps_chan, INTS4 *pl_evt_buf)
Definition: f_evt.c:1462
Definition: s_evhe.h:27
s_evt_channel * f_evt_control()
Definition: f_evt.c:3148
INTS4 l_bufs_in_stream
Definition: f_evt.h:64
INTS4 l_first_put
Definition: f_evt.h:76
INTS4 l_kbytes
Definition: f_evt.h:74
INTS4 f_evt_error(INTS4 l_error, CHARS *pc_dest, INTS4 l_out)
Definition: f_evt.c:1756
INTS4 l_filesize
Definition: f_evt.h:40
INTS4 l_buf_no
Definition: f_evt.h:61
s_taghe * ps_taghe
Definition: f_evt.h:88
CHARS * pc_io_buf
Definition: f_evt.h:79
CHARS * f_evt_get_buffer_ptr(s_evt_channel *ps_chan)
Definition: f_evt.c:2107
INTS4 l_evt_buf_posi
Definition: f_evt.h:69
INTS4 l_offset
Definition: f_evt.h:49
INTS4 l_stream_bufs
Definition: f_evt.h:65
INTS4 l_first
Definition: f_evt.h:41
INTS4 l_tagswap
Definition: f_evt.h:86
int INTS4
Definition: typedefs.h:21
INTS4 f_evt_get_tagnext(s_evt_channel *ps_chan, INTS4 l_skip, INTS4 **pl_event)
Definition: f_evt.c:2873
INTS4 l_tagfile_no
Definition: f_evt.h:85
INTS4 l_version
Definition: f_evt.h:36
Definition: f_evt.h:33
INTS4 l_endian
Definition: f_evt.h:35
INTS4 l_evt_size
Definition: f_evt.h:70
INTS4 f_evt_cre_tagfile(CHARS *pc_lmd, CHARS *pc_tag, INTS4(*e_filter)())
Definition: f_evt.c:2403
INTS4 f_evt_put_buffer(s_evt_channel *ps_chan, s_bufhe *ps_bufhe)
Definition: f_evt.c:1620
INTS4 l_events
Definition: f_evt.h:39
INTS4 l_frag_len
Definition: f_evt.h:78
INTS4 l_bufsize
Definition: f_evt.h:37
INTS4 f_evt_skip_buffer(s_evt_channel *ps_chan, INTS4 l_buffer)
Definition: f_evt.c:1959
INTS4 l_timeout
Definition: f_evt.h:71
INTS4 f_evt_get_tagopen(s_evt_channel *ps_chan, CHARS *pc_tag, CHARS *pc_lmd, CHARS **ps_head, INTS4 l_prihe)
Definition: f_evt.c:2717
INTS4 f_evt_get_tagevent(s_evt_channel *ps_chan, INTS4 l_value, INTS4 l_type, INTS4 **pl_event)
Definition: f_evt.c:2923
INTS4 l_io_buf_size
Definition: f_evt.h:66
INTS4 f_evt_put_close(s_evt_channel *ps_chan)
Definition: f_evt.c:1664
INTS4 f_evt_swap(CHARS *pc_source, INTS4 l_length)
Definition: f_evt.c:2033
INTS4 l_buf_posi
Definition: f_evt.h:62
Definition: f_evt.h:46
INTS4 l_linear
Definition: f_evt.h:43
INTS4 l_event
Definition: f_evt.h:48
INTS4 f_evt_put_open(CHARS *pc_file, INTS4 l_size, INTS4 l_stream, INTS4 l_type, INTS4 l_subtype, s_evt_channel *ps_chan, CHARS *ps_filhe)
Definition: f_evt.c:1310
INTS4 l_events
Definition: f_evt.h:72
char CHARS
Definition: typedefs.h:15
INTS4 l_buf_subtype
Definition: f_evt.h:58
INTS4 f_evt_get_tagclose(s_evt_channel *ps_chan)
Definition: f_evt.c:3128
INTS4 f_evt_get_event(s_evt_channel *ps_chan, INTS4 **ppl_buffer, INTS4 **ppl_goobuf)
Definition: f_evt.c:987
s_ve10_1 * ps_ve10_1
Definition: f_evt.h:83
INTS4 l_io_buf_posi
Definition: f_evt.h:67
INTS4 l_evt_buf_size
Definition: f_evt.h:68
INTS4 l_server_type
Definition: f_evt.h:56
INTS4 l_buf_lmt
Definition: f_evt.h:63