ATLAS Offline Software
Loading...
Searching...
No Matches
ALFA_RawDataContainerReadOut.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8
9
24
25
27{
28 m_wordMarker = dataWord;
29}
30
31void ALFA_RawDataContainerReadOut::decodeHeaderFull(std::vector<uint32_t>& vDataFull)
32{
33
35
36
37 if (vDataFull[0] == s_FullEVmarker)
38 {
39 // cout << "Full HEADER found : vDataFull[0] "<< std::hex << vDataFull[0] << std::dec <<endl;
40
41 }
42
43 m_word = vDataFull[8];
45 // cout << " vDataFull[8] " << std::hex << vDataFull[8] << " m_timestamp " << std::hex << m_timestamp <<std::dec<<endl;
46
47 m_word = vDataFull[15];
48 m_BCId = getBits(getBitsWord(31,0));
49 // cout << " vDataFull[15] " << std::hex << vDataFull[15] << " m_BCId " << std::hex << m_BCId <<std::dec<<endl;
50
51}
52
53
54// Decode the ROD header
55void ALFA_RawDataContainerReadOut::decodeHeader(std::vector<uint32_t>& vData)
56{
57 setZero();
58
59 if (vData[0] != s_RODmarker)
60 {
61 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "ALFA_RawDataContainerReadOut")
62 << "ROD Start of header marker not found" << endmsg;
63 }
64 if (vData[1] != s_RODheadersize)
65 {
66 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "ALFA_RawDataContainerReadOut")
67 << "ROD header size doesn't match " << endmsg;
68 }
69
70 // decode the rest of the header
71 // Subdetector Id and mrodId
72 m_word = vData[3];
75
76
77 // Run number
78 m_word = vData[4];
81
82
83 // Lvl1Id :counting events
84 m_word = vData[5];
86 m_ecrId = getBits(getBitsWord(31,24));
87
88
89 // Bunch crossing identifier
90 m_word = vData[6];
91 m_bcId = getBits(getBitsWord(11,0));
92
93
94 // Trigger type Id
95 m_word = vData[7];
97
98 // Detector event type
99 m_word = vData[8];
101}
102
103
104
105
107{
108 m_subdetId = 0;
109 m_mrodId = 0;
110 m_runNum = 0;
111 m_runType = 0;
112 m_lvl1Id = 0;
113 m_ecrId = 0;
114 m_bcId = 0;
115 m_triggerTypeId = 0;
116 m_DetEventType = 0;
117}
118
124
#define endmsg
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
void decodeHeaderFull(std::vector< uint32_t > &)
static constexpr uint32_t s_RODheadersize
void decodeHeader(std::vector< uint32_t > &vData)
uint32_t m_word
constexpr std::pair< uint32_t, uint16_t > getBitsWord(const uint16_t bstart, const uint16_t bstop)
uint32_t getBits(std::pair< uint32_t, uint16_t > in)