Low-Energy Muon (LEM) Experiment  0.5.2
beamline_scfe.cxx File Reference
#include <cstdio>
#include <cstring>
#include <cmath>
#include "midas.h"
#include "mfe.h"
#include "msystem.h"
#include "bus/tcpip.h"
#include "class/generic.h"
#include "lem_epics.h"
#include "experim.h"
Include dependency graph for beamline_scfe.cxx:

Go to the source code of this file.

Macros

#define BL_CHANNELS   40
 number for muE4 beamline epics channels More...
 
#define BL_TOLERANCE   0.01
 when checking devices allow 1% difference between Demand/Measured values More...
 
#define BL_CHECK_MAX_COUNT   5
 

Functions

INT poll_event (INT source, INT count, BOOL test)
 
INT interrupt_configure (INT cmd, INT source, POINTER_T adr)
 
void bl_check_info (INT hDB, INT hKey, void *dummy)
 
void bl_check_devices (INT hDB, INT hKey, void *dummy)
 
INT frontend_init ()
 
INT frontend_exit ()
 
INT frontend_loop ()
 
INT begin_of_run (INT run_number, char *error)
 
INT end_of_run (INT run_number, char *error)
 
INT pause_run (INT run_number, char *error)
 
INT resume_run (INT run_number, char *error)
 

Variables

const char * frontend_name = "BeamLine SC"
 The frontend name (client name) as seen by other MIDAS clients. More...
 
const char * frontend_file_name = __FILE__
 The frontend file name, don't change it. More...
 
BOOL frontend_call_loop = FALSE
 frontend_loop is called periodically if this variable is TRUE More...
 
INT display_period = 1000
 a frontend status page is displayed with this frequency in ms More...
 
INT max_event_size = 10000
 maximum event size produced by this frontend More...
 
INT max_event_size_frag = 5*1024*1024
 maximum event size for fragmented events (EQ_FRAGMENTED) More...
 
INT event_buffer_size = 10*10000
 buffer size to hold events More...
 
BEAMLINE_SETTINGS beamline_settings
 
BEAMLINE_MONITORING beamline_monitoring
 
BEAMLINE_EVENT beamline_event
 
INT bl_check_counter [BL_CHANNELS]
 counter needed in the beamline check More...
 
DEVICE_DRIVER bl_driver []
 device driver list More...
 
BOOL equipment_common_overwrite = FALSE
 
EQUIPMENT equipment []
 equipment structure for the mfe.c More...
 

Macro Definition Documentation

#define BL_CHANNELS   40

number for muE4 beamline epics channels

Definition at line 24 of file beamline_scfe.cxx.

Referenced by bl_check_devices(), bl_check_info(), and frontend_init().

#define BL_CHECK_MAX_COUNT   5

Definition at line 26 of file beamline_scfe.cxx.

Referenced by bl_check_devices().

#define BL_TOLERANCE   0.01

when checking devices allow 1% difference between Demand/Measured values

Definition at line 25 of file beamline_scfe.cxx.

Referenced by bl_check_devices().

Function Documentation

INT begin_of_run ( INT  run_number,
char *  error 
)

Called by the mfe at the begin of the run. Here it is only a dummy.

Definition at line 288 of file beamline_scfe.cxx.

void bl_check_info ( INT  hDB,
INT  hKey,
void *  dummy 
)
INT end_of_run ( INT  run_number,
char *  error 
)

Called by the mfe at the end of the run. Here it is only a dummy.

Definition at line 298 of file beamline_scfe.cxx.

INT frontend_exit ( )

Called by the mfe at exiting stage. Here it is only a dummy.

Definition at line 268 of file beamline_scfe.cxx.

INT frontend_init ( )

Called by the master frontend (mfe) at initializing stage. Here it is only a dummy.

Definition at line 196 of file beamline_scfe.cxx.

References beamline_monitoring, beamline_settings, BL_CHANNELS, bl_check_counter, bl_check_devices(), bl_check_info(), BEAMLINE_MONITORING::bl_checking, hDB, and hKey.

INT frontend_loop ( )

Called by the mfe in the main loop. Here it is only a dummy.

Definition at line 278 of file beamline_scfe.cxx.

INT interrupt_configure ( INT  cmd,
INT  source,
POINTER_T  adr 
)

Definition at line 107 of file beamline_scfe.cxx.

INT pause_run ( INT  run_number,
char *  error 
)

Called by the mfe when the run is paused. Here it is only a dummy.

Definition at line 308 of file beamline_scfe.cxx.

INT poll_event ( INT  source,
INT  count,
BOOL  test 
)

Definition at line 106 of file beamline_scfe.cxx.

INT resume_run ( INT  run_number,
char *  error 
)

Called by the mfe when the run is resumed. Here it is only a dummy.

Definition at line 318 of file beamline_scfe.cxx.

Variable Documentation

BEAMLINE_EVENT beamline_event

Definition at line 54 of file beamline_scfe.cxx.

BEAMLINE_MONITORING beamline_monitoring

bl_checking = 0: monitoring disabled bl_checking = 1: monitoring enabled bl_checking = 2: try also to switch on power supply

Definition at line 51 of file beamline_scfe.cxx.

Referenced by frontend_init().

BEAMLINE_SETTINGS beamline_settings

Definition at line 50 of file beamline_scfe.cxx.

Referenced by frontend_init().

INT bl_check_counter[BL_CHANNELS]

counter needed in the beamline check

Definition at line 55 of file beamline_scfe.cxx.

Referenced by bl_check_devices(), and frontend_init().

DEVICE_DRIVER bl_driver[]
Initial value:
= {
{ "Beamline", lem_epics, BL_CHANNELS, tcpip, DF_PRIO_DEVICE },
{ "" }
}
#define BL_CHANNELS
number for muE4 beamline epics channels
INT lem_epics(INT cmd,...)

device driver list

Definition at line 60 of file beamline_scfe.cxx.

INT display_period = 1000

a frontend status page is displayed with this frequency in ms

Definition at line 39 of file beamline_scfe.cxx.

EQUIPMENT equipment[]
Initial value:
= {
{ "Beamline",
{99, 0,
"SYSTEM",
EQ_SLOW,
0,
"FIXED",
TRUE,
RO_RUNNING |
RO_TRANSITIONS,
60000,
0,
0,
1,
"", "", "",},
cd_gen_read,
cd_gen,
NULL,
},
{ "" }
}
DEVICE_DRIVER bl_driver[]
device driver list

equipment structure for the mfe.c

Definition at line 77 of file beamline_scfe.cxx.

BOOL equipment_common_overwrite = FALSE

equipment_common_overwrite:

  • If that flag is TRUE, then the contents of the "equipment" structure is copied to the ODB on each start of the front-end.
  • If the flag is FALSE, then the ODB values are kept on the start of the front-end

Definition at line 74 of file beamline_scfe.cxx.

INT event_buffer_size = 10*10000

buffer size to hold events

Definition at line 48 of file beamline_scfe.cxx.

BOOL frontend_call_loop = FALSE

frontend_loop is called periodically if this variable is TRUE

Definition at line 36 of file beamline_scfe.cxx.

const char* frontend_file_name = __FILE__

The frontend file name, don't change it.

Definition at line 33 of file beamline_scfe.cxx.

const char* frontend_name = "BeamLine SC"

The frontend name (client name) as seen by other MIDAS clients.

Definition at line 31 of file beamline_scfe.cxx.

INT max_event_size = 10000

maximum event size produced by this frontend

Definition at line 42 of file beamline_scfe.cxx.

INT max_event_size_frag = 5*1024*1024

maximum event size for fragmented events (EQ_FRAGMENTED)

Definition at line 45 of file beamline_scfe.cxx.