MIDAS
Loading...
Searching...
No Matches
fmidas.cxx
Go to the documentation of this file.
1/********************************************************************\
2
3 Name: FMIDAS.C
4 Created by: Stefan Ritt
5
6 Contents: Wrapper functions for MIDAS library functions to be
7 called from Fortran programs.
8
9 $Id:$
10
11\********************************************************************/
12
13#include <stdio.h>
14#include <midas.h>
15
16/*---- Windows NT section ------------------------------------------*/
17
18#ifdef OS_WINNT
19
21 char *fexp, int lexp, char *fname, int lname)
22{
23 char host[256], exp[256], name[256];
24
25 strncpy(host, fhost, lhost);
26 host[lhost] = 0;
27
29 exp[lexp] = 0;
30
32 name[lname] = 0;
33
34 return cm_connect_experiment(host, exp, name, NULL);
35}
36
38{
40}
41
42int __stdcall BM_OPEN_BUFFER(char *fname, int lname, int *buffer_size, int *buffer_handle)
43{
44 char name[256];
45
47 name[lname] = 0;
48
49 return bm_open_buffer(name, *buffer_size, buffer_handle);
50}
51
52extern void __stdcall PROCESS_EVENT();
53
55{
56 PROCESS_EVENT(&hBuf, &hRequest, pevent, pdata);
57}
58
59int __stdcall BM_REQUEST_EVENT(int *buffer_handle, int *event_id,
60 int *trigger_mask, int *sampling_type, int *request_id)
61{
62 return bm_request_event(*buffer_handle,
63 (short int) *event_id,
64 (short int) *trigger_mask,
65 *sampling_type, request_id, _process_event);
66}
67
69{
70 return cm_yield(*millisec);
71}
72
73#endif
74
75/*-----------------------------------------------------------------*/
INT bm_open_buffer(const char *buffer_name, INT buffer_size, INT *buffer_handle)
Definition midas.cxx:6717
INT bm_request_event(HNDLE buffer_handle, short int event_id, short int trigger_mask, INT sampling_type, HNDLE *request_id, EVENT_HANDLER *func)
Definition midas.cxx:8465
INT cm_yield(INT millisec)
Definition midas.cxx:5642
INT cm_connect_experiment(const char *host_name, const char *exp_name, const char *client_name, void(*func)(char *))
Definition midas.cxx:2278
INT cm_disconnect_experiment(void)
Definition midas.cxx:2846
INT HNDLE
Definition midas.h:132
#define trigger_mask
#define event_id
#define name(x)
Definition midas_macro.h:24
HNDLE hBuf
Definition minife.c:23
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
Definition rmidas.h:24