INTEGER FUNCTION GET_MONIT_DATA ( COMMAND ) C---------------------------------------------------------------------- C- C- Purpose and Methods : Get all the data necessary for later display. C- This includes the raw data and the quantities C- derived from it. C- The count increments can be the default quantities C- coming from TCC, or from the data buffered and the C- differences recomputed for obtaining longer C- integration times. C- C- Returned value: Error status. 0 if no error. C- Inputs : COMMAND ---> The command to get data for. C- Outputs : NONE C- Controls: NONE C- C- Created 25-AUG-1994 Philippe Laurens - MSU L1 Trigger C- Rework structure of TRGMON data collection C- Updated 19-OCT-1995 Philippe Laurens - MSU L1 Trigger C- Add 36x36 scalers, with longer integration (25-OCT) C- C---------------------------------------------------------------------- IMPLICIT NONE C INCLUDE 'LV1_MON_SCREEN.INC' C INTEGER COMMAND C INTEGER GET_RAW_DATA EXTERNAL GET_RAW_DATA C C----------------------------------------------------------------------- IF (COMMAND .EQ. COMMAND_QUIT) GOTO 999 C C **** Get raw data from Trigger Control Computer C GET_MONIT_DATA = GET_RAW_DATA (COMMAND) C C **** If the user has selected the option to replace the default 5 second C **** integration time with a longer value, the following step will store the C **** current data, and replace the "delta quantities" of the raw common block C **** with re-calculated quantities. C **** The rest of the TRGMON code will not need to know whether the data has C **** been changed from under it. C IF ( (NEW_INTEGRATE .EQV. .TRUE.) & .AND. ( (COMMAND .EQ. COMMAND_GLOBAL_ALLOC) & .OR. (COMMAND .EQ. COMMAND_GLOBAL_L15) & .OR. (COMMAND .EQ. COMMAND_SPECIFIC_TRIGGER) & .OR. (COMMAND .EQ. COMMAND_SPECTRIG_L15) & .OR. (COMMAND .EQ. COMMAND_GEO_SECT) & .OR. (COMMAND .EQ. COMMAND_DIAGNOST) & .OR. (COMMAND .EQ. COMMAND_GLOBAL_MONIT) & .OR. (COMMAND .EQ. COMMAND_PER_BUNCH) & .OR. (COMMAND .EQ. COMMAND_LUMINOSITY) & .OR. (COMMAND .EQ. COMMAND_36x36_SCALERS) & .OR. (COMMAND .EQ. COMMAND_FOREIGN_SCALERS) ) ) THEN CALL INTEGRATE_NEW_DELTAS ENDIF C C **** Find Beam Crossing Period and factors for converting counts ot Hz C CALL FIND_BEAMX_PERIOD_AND_HZ_FACTOR () C C **** Use Raw Data to derive additional quantities C CALL DERIVE_MORE_DATA ( COMMAND ) C C **** Check the Trouble Warning Bits C **** (for displays that automatically refresh) C IF ( (COMMAND .EQ. COMMAND_GLOBAL_ALLOC) & .OR. (COMMAND .EQ. COMMAND_GLOBAL_L15) & .OR. (COMMAND .EQ. COMMAND_SPECIFIC_TRIGGER) & .OR. (COMMAND .EQ. COMMAND_SPECTRIG_L15) & .OR. (COMMAND .EQ. COMMAND_GEO_SECT) & .OR. (COMMAND .EQ. COMMAND_GLOBAL_MONIT) & .OR. (COMMAND .EQ. COMMAND_JET_LIST) & .OR. (COMMAND .EQ. COMMAND_PER_BUNCH) & .OR. (COMMAND .EQ. COMMAND_LUMINOSITY) & .OR. (COMMAND .EQ. COMMAND_FOREIGN_SCALERS) & .OR. (COMMAND .EQ. COMMAND_36X36_SCALERS) & .OR. (COMMAND .EQ. COMMAND_SPY_WINDOW) & .OR. (COMMAND .EQ. COMMAND_DIAGNOST) ) THEN CALL CHECK_TWB_ALARMS() ENDIF C C---------------------------------------------------------------------- 999 RETURN END