Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
56 f9daq 1
 
2
#ifndef _EVDP_H_
3
#define _EVDP_H_
4
 
5
/*KEEP,event,T=C++.*/
6
#include "event.h"
7
/*KEND.*/
8
 
9
#define swap_4(x) swap_long((int32_t *) x)
10
#define swap_2(x) swap_short((short *) x)
11
 
12
struct LOG_header {
13
  uint32_t  bc,exp,run,evt,dtm;
14
};
15
typedef struct LOG_header LOG_header;
16
 
17
struct EVT_header {
18
  uint32_t  bc;
19
  unsigned short recid,sp;
20
  uint32_t  slt,cm,em;
21
};
22
typedef struct EVT_header EVT_header;
23
 
24
struct EVT_trailer {
25
  uint32_t slt;
26
};
27
typedef struct EVT_trailer EVT_trailer;
28
 
29
struct FED_record {
30
  unsigned short bc,fedid,recid,bxn;
31
  unsigned char data[128];
32
};
33
typedef struct FED_record FED_record;
34
 
35
struct SLB_header {
36
  uint32_t  bc;
37
  unsigned short recid,fltev,compid,slbn;
38
  uint32_t  dest;
39
};
40
typedef struct SLB_header SLB_header;
41
 
42
struct SLB_trailer {
43
  unsigned short recid,fltev;
44
};
45
typedef struct SLB_trailer SLB_trailer;
46
 
47
extern EVT_DATA evdata;
48
extern LOG_header logh;
49
 
50
#ifdef __cplusplus
51
extern "C" {
52
#endif
53
int is_little_endian();
54
void swap_short(short *);
55
void swap_long(int32_t *);
56
int open_data_file(char *);
57
int close_data_file();
58
int reopen_data_file();
59
int reclose_data_file();
60
int goto_event(int);
61
int get_nextev(FED_record *, unsigned short, int);
62
int dump_cmp(FILE *, unsigned short);
63
#ifdef __cplusplus
64
}
65
#endif
66
 
67
#endif /* _EVDP_H_ */