Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:18

0001 #ifndef DATAFORMATS_TCDS_TCDSRAW_H
0002 #define DATAFORMATS_TCDS_TCDSRAW_H
0003 
0004 //---------------------------------------------------------------------------
0005 //!  \class TCDSRaw
0006 //!  \brief Structure of raw data from TCDS FED 1014
0007 //!
0008 //!  \author Remi Mommsen - Fermilab
0009 //---------------------------------------------------------------------------
0010 
0011 #include <cstdint>
0012 
0013 #pragma pack(push)
0014 #pragma pack(1)
0015 
0016 namespace tcds {
0017 
0018   struct Sizes_v1 {
0019     const uint8_t headerSize;
0020     const uint8_t summarySize;
0021     const uint8_t L1AhistSize;
0022     const uint8_t BSTSize;
0023     const uint8_t reserved0;
0024     const uint8_t reserved1;
0025     const uint8_t reserved2;
0026     const uint8_t BGOSize;
0027   };
0028 
0029   struct Header_v1 {
0030     const uint64_t macAddress;
0031     const uint32_t swVersion;
0032     const uint32_t fwVersion;
0033     const uint32_t reserved0;
0034     const uint32_t recordVersion;
0035     const uint32_t runNumber;
0036     const uint32_t reserved1;
0037     const uint32_t activePartitions2;
0038     const uint32_t bstReceptionStatus;
0039     const uint32_t activePartitions0;
0040     const uint32_t activePartitions1;
0041     const uint32_t nibble;
0042     const uint32_t lumiSection;
0043     const uint16_t nibblesPerLumiSection;
0044     const uint16_t triggerTypeFlags;
0045     const uint16_t reserved5;
0046     const uint16_t inputs;
0047     const uint16_t bxid;
0048     const uint16_t orbitLow;
0049     const uint32_t orbitHigh;
0050     const uint64_t triggerCount;
0051     const uint64_t eventNumber;
0052   };
0053 
0054   struct L1aInfo_v1 {
0055     const uint32_t orbitlow;
0056     const uint16_t orbithigh;
0057     const uint8_t reserved2;
0058     const uint8_t ind0;
0059     const uint16_t bxid;
0060     const uint16_t reserved0;
0061     const uint16_t reserved1;
0062     const uint8_t eventtype;
0063     const uint8_t ind1;
0064   };
0065 
0066   const uint8_t l1aHistoryDepth_v1 = 16;
0067   struct L1aHistory_v1 {
0068     L1aInfo_v1 l1aInfo[l1aHistoryDepth_v1];
0069   };
0070 
0071   struct BST_v1 {
0072     const uint32_t gpstimelow;
0073     const uint32_t gpstimehigh;
0074     const uint32_t bireserved8_11;
0075     const uint32_t bireserved12_15;
0076     const uint16_t bstMaster;
0077     const uint16_t turnCountLow;
0078     const uint16_t turnCountHigh;
0079     const uint16_t lhcFillLow;
0080     const uint16_t lhcFillHigh;
0081     const uint16_t beamMode;
0082     const uint16_t particleTypes;
0083     const uint16_t beamMomentum;
0084     const uint32_t intensityBeam1;
0085     const uint32_t intensityBeam2;
0086     const uint32_t bireserved40_43;
0087     const uint32_t bireserved44_47;
0088     const uint32_t bireserved48_51;
0089     const uint32_t bireserved52_55;
0090     const uint32_t bireserved56_59;
0091     const uint32_t bireserved60_63;
0092   };
0093 
0094   struct LastBGo_v1 {
0095     const uint32_t orbitlow;
0096     const uint16_t orbithigh;
0097     const uint16_t reserved;
0098   };
0099 
0100   const uint8_t bgoCount_v1 = 64;
0101   struct BGoHistory_v1 {
0102     const uint64_t bgoHistoryHeader;
0103     const struct LastBGo_v1 lastBGo[bgoCount_v1];
0104   };
0105 
0106   struct Raw_v1 {
0107     const struct Sizes_v1 sizes;
0108     const struct Header_v1 header;
0109     const struct L1aHistory_v1 l1aHistory;
0110     const struct BST_v1 bst;
0111     const struct BGoHistory_v1 bgoHistory;
0112   };
0113 
0114 }  // namespace tcds
0115 
0116 #pragma pack(pop)
0117 
0118 #endif  // DATAFORMATS_TCDS_TCDSRAW_H