CMS 3D CMS Logo

HGCalRawDataPackingTools.h
Go to the documentation of this file.
1 #ifndef EventFilter_HGCalRawToDigi_HGCalRawDataPackingTools_h
2 #define EventFilter_HGCalRawToDigi_HGCalRawDataPackingTools_h
3 
5 
6 namespace hgcal {
7  namespace econd {
8  struct ERxData;
14  std::vector<uint32_t> produceERxData(
15  const ERxChannelEnable&, const ERxData&, bool passZS, bool passZSm1, bool hasToA, bool char_mode);
16 
20  std::vector<uint32_t> eRxSubPacketHeader(uint8_t stat,
21  uint8_t ham,
22  bool bitE,
23  uint16_t common_mode0,
24  uint16_t common_mode1,
25  const ERxChannelEnable& channel_enable);
26  std::vector<uint32_t> eRxSubPacketHeader(
27  uint8_t stat, uint8_t ham, bool bitE, uint16_t common_mode0, uint16_t common_mode1, uint64_t channels_map);
28 
32  std::vector<uint32_t> eventPacketHeader(uint16_t header,
33  uint16_t payload,
34  bool bitP,
35  bool bitE,
36  uint8_t ht,
37  uint8_t ebo,
38  bool bitM,
39  bool bitT,
40  uint8_t hamming,
41  uint16_t bx,
42  uint16_t l1a,
43  uint8_t orb,
44  bool bitS,
45  uint8_t RR);
49  uint32_t buildIdleWord(uint8_t bufStat, uint8_t err, uint8_t rr, uint32_t progPattern);
50  } // namespace econd
51 
52  namespace backend {
54  Normal = 0x0,
57  EBTimeout = 0x4,
61  };
62 
65  std::vector<uint32_t> buildCaptureBlockHeader(uint32_t bunch_crossing,
66  uint32_t event_counter,
67  uint32_t orbit_counter,
68  const std::vector<ECONDPacketStatus>& econd_statuses);
69 
72  std::vector<uint32_t> buildSlinkHeader(
73  uint8_t boe, uint8_t v, uint64_t global_event_id, uint32_t content_id, uint32_t fed_id);
74 
77  std::vector<uint32_t> buildSlinkTrailer(uint8_t eoe,
78  uint16_t daqcrc,
79  uint32_t event_length,
80  uint16_t bxid,
81  uint32_t orbit_id,
82  uint16_t crc,
83  uint16_t status);
84 
88  uint32_t buildSlinkContentId(SlinkEmulationFlag, uint8_t l1a_subtype, uint16_t l1a_fragment_cnt);
89 
92  uint16_t buildSlinkRocketStatus(
93  bool fed_crc_err, bool slinkrocket_crc_err, bool source_id_err, bool sync_lost, bool fragment_trunc);
94  } // namespace backend
95 } // namespace hgcal
96 
97 #endif
std::vector< uint32_t > produceERxData(const ERxChannelEnable &, const ERxData &, bool passZS, bool passZSm1, bool hasToA, bool char_mode)
std::vector< uint32_t > buildCaptureBlockHeader(uint32_t bunch_crossing, uint32_t event_counter, uint32_t orbit_counter, const std::vector< ECONDPacketStatus > &econd_statuses)
std::vector< uint32_t > eRxSubPacketHeader(uint8_t stat, uint8_t ham, bool bitE, uint16_t common_mode0, uint16_t common_mode1, const ERxChannelEnable &channel_enable)
uint32_t buildSlinkContentId(SlinkEmulationFlag, uint8_t l1a_subtype, uint16_t l1a_fragment_cnt)
std::vector< bool > ERxChannelEnable
list of channels enabled in eRx
Definition: SlinkTypes.h:38
std::vector< uint32_t > buildSlinkHeader(uint8_t boe, uint8_t v, uint64_t global_event_id, uint32_t content_id, uint32_t fed_id)
uint32_t buildIdleWord(uint8_t bufStat, uint8_t err, uint8_t rr, uint32_t progPattern)
uint16_t buildSlinkRocketStatus(bool fed_crc_err, bool slinkrocket_crc_err, bool source_id_err, bool sync_lost, bool fragment_trunc)
unsigned long long uint64_t
Definition: Time.h:13
std::vector< uint32_t > buildSlinkTrailer(uint8_t eoe, uint16_t daqcrc, uint32_t event_length, uint16_t bxid, uint32_t orbit_id, uint16_t crc, uint16_t status)
std::vector< uint32_t > eventPacketHeader(uint16_t header, uint16_t payload, bool bitP, bool bitE, uint8_t ht, uint8_t ebo, bool bitM, bool bitT, uint8_t hamming, uint16_t bx, uint16_t l1a, uint8_t orb, bool bitS, uint8_t RR)