SUBROUTINE GET_TCC_MONIT_L0_GOOD ( DELTA_BEAM_X, & DELTA_BUNCH_L0_GOOD ) C---------------------------------------------------------------------- C- C- Purpose and Methods : Request monitoring information from TCC C- and retrieve the L0 per bunch scaler increments C- for purpose of luminosity calculation. C- C- These increments were collected for an integration C- period of 5 s average, but with worst case C- fluctuations of +/-100% when the data flow is not C- uniform. C- C- The information on TCC is only updated at 5s interval C- and repeated calls to this routine should not be made C- at less than this minimum interval. C- C- Inputs : None C- C- Outputs : DELTA_BEAM_X [I] The total number of beam crossings elapsed C- during the time period. C- Return 0 in case of failure. C- C- DELTA_BUNCH_L0_GOOD(Pi) [I] The number of Fast L0 good observed C- during the time period C- for bunch Pi with Pi = 1..6 C- Return 0 in case of failure. C- C- Created 27-APR-1995 Philippe Laurens - MSU L1 Trigger C- C---------------------------------------------------------------------- IMPLICIT NONE C C Arguments C --------- INTEGER DELTA_BEAM_X INTEGER DELTA_BUNCH_L0_GOOD (1:6) C C Common blocks and parameters C ---------------------------- INCLUDE 'LV1_MPOOL.PARAMS/LIST' INCLUDE 'LV1_MPOOL_RAW.INC/LIST' C C Local variables C --------------- INTEGER BUNCH_NUM C C External Functions C ------------------ INTEGER FILL_MONIT_POOL EXTERNAL FILL_MONIT_POOL C C----------------------------------------------------------------------- C IF ( FILL_MONIT_POOL (MP_PER_BUNCH) .EQ. 0) THEN C C Success getting information from TCC C ------------------------------------ C DELTA_BEAM_X = DELTA_BEAM_CROSSING C DO BUNCH_NUM = 1, 6 DELTA_BUNCH_L0_GOOD(BUNCH_NUM) = L0_PER_BUNCH(BUNCH_NUM) END DO C ELSE C C Failure getting information from TCC C ------------------------------------ C PRINT *, 'failed' DELTA_BEAM_X = 0 C DO BUNCH_NUM = 1, 6 DELTA_BUNCH_L0_GOOD(BUNCH_NUM) = 0 END DO C ENDIF C C---------------------------------------------------------------------- 999 RETURN END