////////////////////////////////////////////////////////////////////////////// // File: L1_Tcc_Monit_Data_LumBlockNum.hpp // Created: 07-OCT-2001 Philippe Laurens (split away from Tcc_Monit_Data.hpp) ////////////////////////////////////////////////////////////////////////////// #ifndef __L1_Tcc_Monit_Data_LumBlockNum__ #define __L1_Tcc_Monit_Data_LumBlockNum__ ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // compiler constants to be used to decode the ubIncremented field // in the L1_Tcc_Luminosity_Block_Number structure below #define kTcc_LumBlockNum_Not_Incremented 0x00 #define kTcc_LumBlockNum_Incremented 0x01 ////////////////////////////////////////////////////////////////////////////// // compiler constants to be used to decode the uwLbnIncrementReasonMask bit fields // in the L1_Tcc_Luminosity_Block_Number structure below #define kTcc_LumReason_Not_Incremented 0x0000 #define kTcc_LumReason_Timer 0x0001 #define kTcc_LumReason_ReqFromCoor 0x0002 #define kTcc_LumReason_ReqFromLumClient 0x0004 #define kTcc_LumReason_L1fwInit 0x0010 #define kTcc_LumReason_SclInit 0x0020 #define kTcc_LumReason_BeginStore 0x0040 #define kTcc_LumReason_EndStore 0x0080 #define kTcc_LumReason_StartRun 0x0100 #define kTcc_LumReason_StopRun 0x0200 #define kTcc_LumReason_Pause_Run 0x0400 #define kTcc_LumReason_Resume_Run 0x0800 #define kTcc_LumReason_PrescaleChange 0x1000 ////////////////////////////////////////////////////////////////////////////// // This structure describes the Logical Number and related system status struct L1_Tcc_Luminosity_Block_Number { uint32 ulLuminosityBlockNumber ; // This is the current Luminosity Block Number // When the LBN is incremented, this is the value AFTER increment uint8 ubIncremented ; // Flag showing whether this Luminosity Data corresponds // to the beginning of a new Luminosity Block Number // 0 = No Increment, 1 = LBN Incremented uint8 ubReserved ; // Place Holder to maintain 16 bit alignment for next field uint16 uwIncrementReasonMask ; // When the LBN is incremented, this mask describes the reason for the increment // When ubIncremented = 0, uwIncrementReasonMask = 0x0000 // The format chosen is a bit mask and not a simple code number // because it is conceivable that we may someday want to make a smarter // usage of resources and, for example, delay incrementing a LBN while the system // is paused and no events are flowing (without forgetting the 60 sec limit). // // The bit fields should be decoded using the kTcc_LumReason_xyz constants // LSB Bit #0 Set = Nominal increment 60 sec after last increment // Bit #1 Set = Explicit request for increment from COOR // Bit #2 Set = Explicit request for increment from Luminosity Client // Bit #3 Unsused // Bit #4 Set = 'L1fw_Init' message from COOR // Bit #5 Set = 'SCL_Init' message from COOR // Bit #6 Set = 'Begin_Store' message from COOR // Bit #7 Set = 'End_Store' message from COOR // Bit #8 Set = 'Start_Run' message from COOR // Bit #9 Set = 'Stop_Run' message from COOR // Bit #10 Set = 'Pause_Run' message from COOR // Bit #11 Set = 'Resume_Run' message from COOR // (!) Bit #12 Set = Change of SpTrg prescale ratio from COOR // Bit #13 Unsused // Bit #14 Unsused // MSB Bit #15 Unsused // (!): SpTrg Prescale Ratios are not expected to change during a run, // and TCC will NEVER send a Luminosity Block for that reason, // or until further notice. // This field is only valid when the uwIncrementReasonMask above // is flagging a 'Start_Run', 'Stop_Run', 'Pause_Run', or 'Resume_Run' Message from COOR // This is the Run Number that COOR gave TCC with the corresponding message uint32 ulRunNumber ; uint32 ulReserved ; // Place Holder to maintain 64 bit alignment for next field // These fields are only valid when the uwIncrementReasonMask above // is flagging a 'Start_Run' Message from COOR // This is the mask of all Specific Triggers included in this new run. // bit #N of uqSpTrgMaskLower being set means that Spec Trig #N is part of the run // bit #N of uqSpTrgMaskUpper being set means that Spec Trig #N+64 is part of the run uint64 uqSpTrgMaskLower ; uint64 uqSpTrgMaskUpper ; } ; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // define alias for backwards compatibility typedef L1_Tcc_Luminosity_Block_Number Tcc_Luminosity_Block_Number ; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// #endif // __L1_Tcc_Monit_Data_LumBlockNum__