////////////////////////////////////////////////////////////////////////////// // File: L1CalTcc_MonitData_BeamX.hpp // Created: 11-Oct-2005 Philippe Laurens ////////////////////////////////////////////////////////////////////////////// #ifndef __L1CalTcc_MonitData_BeamX__ #define __L1CalTcc_MonitData_BeamX__ ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Variable Size Definitions ////////////////////////////////////////////////////////////////////////////// #include "trigmon/L1CalTcc_MonitData_BasicTypes.hpp" ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // The Beam Crossing Number is broken down into a Turn Number // and a Tick Number within the Turn. // // Note: The L1Cal IIb runs at the 132ns Beam Crossing Rate, // even when only 1 out of 3 bunches are filled. // A more precise number is 53.104 / 7 MHz // // To get a one-dimensional BeamX number, one needs to compute: // kL1CalTcc_L1fw_Max_TickNum * ulTurnNum + uiTickNum // // In order to derive a rate from the various counts, one needs to first compute // the difference between two time samples for the counted value // and for the one-dimensional Beam Crossing Number. // Rate_in_Hz = ( kL1CalTcc_BeamX_Rate * float(Delta_Counts) ) / float(Delta_BeamX) #define kL1CalTcc_L1fw_Max_TickNum 159 #define kL1CalTcc_BeamX_Rate 53104000 / 7 /////////////////////////////////////////////////////////////////////////////////// //Tick and Turn Scaler Sub-Structure (used in definition of Monitoring Data Blocks) /////////////////////////////////////////////////////////////////////////////////// struct L1CalTcc_BeamX_Number { // Beam Crossing Turn Number // Currently generated in software as a time base // This will become the value captured by a hardware counter // when/if the ADF cards implement some rate measurement scalers // e.g. to monitor trigger tower energy above a threshold uint64 uqTurnNum ; // Beam Crossing Tick Number within the turn for which the monitoring data // was captured. // When the monitoring data was catpured as the result of // finding the collect_status L1 Qualifier set along with a L1_Accept. // When captured with a Collect_Status request, this value // will be one of the kL1CalTcc_Tick_For_LiveBX_Index_** given below // When capturing a Random Crossing, the Tick number reported here // may not necessarily correspond to a live beam crossing. // // The value for valid monitoring data is from 1 to 159 uint32 ulTickNum ; // Place Holder to reach 64 bit boundary uint32 ulReserved ; } ; /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// // This is the total number of Live Beam Crossings in the machine // (out of the 159 possible ticks) #define kL1CalTcc_Tot_LiveBX 36 // These constants define the Tick number corresponding to each Live Crossing #define kL1CalTcc_Tick_For_LiveBX_Index_0 7 #define kL1CalTcc_Tick_For_LiveBX_Index_1 10 #define kL1CalTcc_Tick_For_LiveBX_Index_2 13 #define kL1CalTcc_Tick_For_LiveBX_Index_3 16 #define kL1CalTcc_Tick_For_LiveBX_Index_4 19 #define kL1CalTcc_Tick_For_LiveBX_Index_5 22 #define kL1CalTcc_Tick_For_LiveBX_Index_6 25 #define kL1CalTcc_Tick_For_LiveBX_Index_7 28 #define kL1CalTcc_Tick_For_LiveBX_Index_8 31 #define kL1CalTcc_Tick_For_LiveBX_Index_9 34 #define kL1CalTcc_Tick_For_LiveBX_Index_10 37 #define kL1CalTcc_Tick_For_LiveBX_Index_11 40 #define kL1CalTcc_Tick_For_LiveBX_Index_12 60 #define kL1CalTcc_Tick_For_LiveBX_Index_13 63 #define kL1CalTcc_Tick_For_LiveBX_Index_14 66 #define kL1CalTcc_Tick_For_LiveBX_Index_15 69 #define kL1CalTcc_Tick_For_LiveBX_Index_16 72 #define kL1CalTcc_Tick_For_LiveBX_Index_17 75 #define kL1CalTcc_Tick_For_LiveBX_Index_18 78 #define kL1CalTcc_Tick_For_LiveBX_Index_19 81 #define kL1CalTcc_Tick_For_LiveBX_Index_20 84 #define kL1CalTcc_Tick_For_LiveBX_Index_21 87 #define kL1CalTcc_Tick_For_LiveBX_Index_22 90 #define kL1CalTcc_Tick_For_LiveBX_Index_23 93 #define kL1CalTcc_Tick_For_LiveBX_Index_24 113 #define kL1CalTcc_Tick_For_LiveBX_Index_25 116 #define kL1CalTcc_Tick_For_LiveBX_Index_26 119 #define kL1CalTcc_Tick_For_LiveBX_Index_27 122 #define kL1CalTcc_Tick_For_LiveBX_Index_28 125 #define kL1CalTcc_Tick_For_LiveBX_Index_29 128 #define kL1CalTcc_Tick_For_LiveBX_Index_30 131 #define kL1CalTcc_Tick_For_LiveBX_Index_31 134 #define kL1CalTcc_Tick_For_LiveBX_Index_32 137 #define kL1CalTcc_Tick_For_LiveBX_Index_33 140 #define kL1CalTcc_Tick_For_LiveBX_Index_34 143 #define kL1CalTcc_Tick_For_LiveBX_Index_35 146 #endif // __L1CalTcc_MonitData_BeamX__