SUBROUTINE L1_EXTRACT_EXPOS_AND_L0(CRATE_HEADER, & CURRENT_TRG, & UNITS, & GIGAS ) C---------------------------------------------------------------------- C- C- Purpose and Methods : Extract the Exposition and Level 0 scaler for a C- particular Specific Trigger from the Data Block. C- C- Inputs : CRATE_HEADER The first word of the Level 1 Data Block Crate C- Header. Cf. GZFIND_CRATE(). C- CURRENT_TRG The number of the Specific Trigger to extract C- data about. C- Outputs : UNITS The scaler MOD 2**30 C- GIGAS The scaler DIV 2**30 C- Controls: none C- C- NOTE: The EXPOS_AND_L0 value is calculated as: C- EXPOS - EXPOS_AND_NOT_L0 C- Note that this requires 5-byte arithmetic. C C- Created 24-MAR-1992 Philippe Laurens, Steven Klocek C- C---------------------------------------------------------------------- IMPLICIT NONE INCLUDE 'LEVEL1_LOOKUP.PARAMS' INCLUDE 'LEVEL1_CAL_TRIG.PARAMS' INCLUDE 'LEVEL1_FRAMEWORK.PARAMS' INCLUDE 'LEVEL1_TRIGGER_DATA_BLOCK.INC' C INTEGER CRATE_HEADER INTEGER CURRENT_TRG INTEGER UNITS INTEGER GIGAS C INTEGER NOT_L0_UNITS INTEGER NOT_L0_GIGAS INTEGER EXPOS_UNITS INTEGER EXPOS_GIGAS C CALL L1_EXTRACT_5BYTE_SCALER(CRATE_HEADER, & SP_TRG_SCALERS+ 2 * SCALER_L * CURRENT_TRG + SCALER_L, & EXPOS_UNITS, & EXPOS_GIGAS ) C** C An Expos and Not Level 0 scaler does not exist yet C C CALL L1_EXTRACT_5BYTE_SCALER(CRATE_HEADER, C & XXXXX, C & NOT_L0_UNITS, C & NOT_L0_GIGAS ) C NOT_L0_UNITS = 0 NOT_L0_GIGAS = 0 C** UNITS = EXPOS_UNITS - NOT_L0_UNITS GIGAS = EXPOS_GIGAS - NOT_L0_GIGAS IF (UNITS .LT. 0) THEN UNITS = UNITS + 2**30 GIGAS = GIGAS - 1 ENDIF C C---------------------------------------------------------------------- 999 RETURN END