ATLAS Offline Software
ALFA_RawDataContainerReadOut.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ALFA_RAWDATACONTAINERREADOUT_H
6 #define ALFA_RAWDATACONTAINERREADOUT_H
7 
8 #include "ALFA_ReadOut.h"
10 
11 #include <stdint.h>
12 #include <vector>
13 
14 #include "eformat/SourceIdentifier.h"
15 #include "eformat/Version.h"
17 
21 
25 
26 
27 // Decoding methods for a ROD
28 // S. Diglio
29 
31 {
32 
33  private:
34 
35  // Raw data word and word header
36 
38 
39  // Data members
40  uint16_t m_subdetId; // Sub-detector Id
41  uint16_t m_mrodId; // MROD Id
42  uint32_t m_lvl1Id; // Lvl1 Id
43  uint16_t m_ecrId; // ECR Id
44  uint16_t m_bcId; // Bunch crossing Id
45  uint32_t m_runNum; // Run sequence number
46  uint16_t m_runType; // Run Type
47  uint16_t m_triggerTypeId; // Trigger type Id
48  uint32_t m_DetEventType; // Detector Event Type
49 
50 
51  uint32_t m_timestamp; // timestamp
52  uint32_t m_BCId; // Bunch Crossing Id
53 
54 
55  // Data words in the ROD header
56 
57  // Full Event marker
58  static constexpr uint32_t s_FullEVmarker = 0xaa1234aa;
59  // ROB marker
60  static constexpr uint32_t s_ROBmarker = 0xdd1234dd;
61  // ROD marker
62  static constexpr uint32_t s_RODmarker = 0xee1234ee;
63 
64  static constexpr uint32_t s_RODheadersize = 0x00000009;
65  static constexpr uint32_t s_RODversion = 0x03010000;
66 
67  public:
69 
70  bool is_FullEVmarker() const {return m_wordMarker == s_FullEVmarker;}
71  bool is_ROBmarker() const {return m_wordMarker == s_ROBmarker;}
72  bool is_RODmarker() const {return m_wordMarker == s_RODmarker;}
73 
74 
75  void decodeWord(uint32_t dataWord);
76  void decodeHeader(std::vector<uint32_t>& vData);
77  void decodeHeaderFull(std::vector<uint32_t>& );
78 
79 
80 
81  // Retrieve decoded results
82  uint16_t subdetId() const {return m_subdetId;}
83  uint16_t mrodId() const {return m_mrodId;}
84  uint32_t runNum() const {return m_runNum;}
85  uint16_t runType() const {return m_runType;}
86  uint32_t lvl1Id() const {return m_lvl1Id;}
87  uint16_t ecrId() const {return m_ecrId;}
88  uint16_t bcId() const {return m_bcId;}
91 
92  uint32_t TimeStamp() const {return m_timestamp;}
93  uint32_t BCId() const {return m_BCId;}
94 
95  private:
96 
97  // Private functions
98  void setZero();
99  void setZeroFull();
100 }; // ALFA_RODREADOUT_H
101 
102 #endif
ALFA_RawDataContainer_charge.h
ALFA_RawDataContainerReadOut::m_subdetId
uint16_t m_subdetId
Definition: ALFA_RawDataContainerReadOut.h:40
ALFA_RawDataContainerReadOut::m_bcId
uint16_t m_bcId
Definition: ALFA_RawDataContainerReadOut.h:44
ALFA_RawDataContainerReadOut::s_RODheadersize
static constexpr uint32_t s_RODheadersize
Definition: ALFA_RawDataContainerReadOut.h:64
ALFA_RawDataContainerReadOut::runType
uint16_t runType() const
Definition: ALFA_RawDataContainerReadOut.h:85
ALFA_RawDataContainerReadOut::m_mrodId
uint16_t m_mrodId
Definition: ALFA_RawDataContainerReadOut.h:41
ALFA_RawDataContainerReadOut::lvl1Id
uint32_t lvl1Id() const
Definition: ALFA_RawDataContainerReadOut.h:86
ALFA_RawDataContainerReadOut::m_BCId
uint32_t m_BCId
Definition: ALFA_RawDataContainerReadOut.h:52
ALFA_RawDataContainerReadOut::decodeWord
void decodeWord(uint32_t dataWord)
Definition: ALFA_RawDataContainerReadOut.cxx:26
ALFA_RawDataContainer.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ALFA_RawDataContainerReadOut::s_RODmarker
static constexpr uint32_t s_RODmarker
Definition: ALFA_RawDataContainerReadOut.h:62
ALFA_RawDataContainerReadOut::DetEventType
uint32_t DetEventType() const
Definition: ALFA_RawDataContainerReadOut.h:90
ALFA_RawDataContainerReadOut::is_FullEVmarker
bool is_FullEVmarker() const
Definition: ALFA_RawDataContainerReadOut.h:70
ALFA_RawDataReadOut_charge.h
ALFA_RawDataContainerReadOut::m_triggerTypeId
uint16_t m_triggerTypeId
Definition: ALFA_RawDataContainerReadOut.h:47
ALFA_RawDataContainerReadOut::setZero
void setZero()
Definition: ALFA_RawDataContainerReadOut.cxx:106
ALFA_RawDataContainerReadOut::m_runNum
uint32_t m_runNum
Definition: ALFA_RawDataContainerReadOut.h:45
ALFA_RawDataContainerReadOut::m_DetEventType
uint32_t m_DetEventType
Definition: ALFA_RawDataContainerReadOut.h:48
ALFA_RawDataContainerReadOut::m_runType
uint16_t m_runType
Definition: ALFA_RawDataContainerReadOut.h:46
ALFA_RawDataContainerReadOut::BCId
uint32_t BCId() const
Definition: ALFA_RawDataContainerReadOut.h:93
ALFA_RawData_charge.h
ALFA_RawDataContainerReadOut::bcId
uint16_t bcId() const
Definition: ALFA_RawDataContainerReadOut.h:88
ALFA_RawDataContainerReadOut::m_timestamp
uint32_t m_timestamp
Definition: ALFA_RawDataContainerReadOut.h:51
ALFA_RawDataContainerReadOut::m_wordMarker
uint32_t m_wordMarker
Definition: ALFA_RawDataContainerReadOut.h:37
ALFA_RawData.h
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
ALFA_RawDataContainerReadOut::decodeHeader
void decodeHeader(std::vector< uint32_t > &vData)
Definition: ALFA_RawDataContainerReadOut.cxx:55
ALFA_RawDataContainerReadOut::decodeHeaderFull
void decodeHeaderFull(std::vector< uint32_t > &)
Definition: ALFA_RawDataContainerReadOut.cxx:31
RawEvent.h
ALFA_RawDataContainerReadOut::is_ROBmarker
bool is_ROBmarker() const
Definition: ALFA_RawDataContainerReadOut.h:71
ALFA_ReadOut
Definition: ALFA_ReadOut.h:14
ALFA_RawDataContainerReadOut::ALFA_RawDataContainerReadOut
ALFA_RawDataContainerReadOut()
Definition: ALFA_RawDataContainerReadOut.cxx:10
ALFA_RawDataContainerReadOut::TimeStamp
uint32_t TimeStamp() const
Definition: ALFA_RawDataContainerReadOut.h:92
ALFA_RawDataContainerReadOut::s_FullEVmarker
static constexpr uint32_t s_FullEVmarker
Definition: ALFA_RawDataContainerReadOut.h:58
ALFA_RawDataContainerReadOut::m_ecrId
uint16_t m_ecrId
Definition: ALFA_RawDataContainerReadOut.h:43
ALFA_RawDataContainerReadOut::s_ROBmarker
static constexpr uint32_t s_ROBmarker
Definition: ALFA_RawDataContainerReadOut.h:60
ALFA_RawDataContainerReadOut::setZeroFull
void setZeroFull()
Definition: ALFA_RawDataContainerReadOut.cxx:119
ALFA_ReadOut.h
ALFA_RawDataCollection.h
ALFA_RawDataContainerReadOut::mrodId
uint16_t mrodId() const
Definition: ALFA_RawDataContainerReadOut.h:83
ALFA_RawDataCollection_charge.h
ALFA_RawDataContainerReadOut::runNum
uint32_t runNum() const
Definition: ALFA_RawDataContainerReadOut.h:84
ALFA_RawDataContainerReadOut::trigtypeId
uint16_t trigtypeId() const
Definition: ALFA_RawDataContainerReadOut.h:89
ALFA_RawDataContainerReadOut::s_RODversion
static constexpr uint32_t s_RODversion
Definition: ALFA_RawDataContainerReadOut.h:65
ALFA_RawDataContainerReadOut
Definition: ALFA_RawDataContainerReadOut.h:31
ALFA_RawDataContainerReadOut::subdetId
uint16_t subdetId() const
Definition: ALFA_RawDataContainerReadOut.h:82
ALFA_RawDataContainerReadOut::is_RODmarker
bool is_RODmarker() const
Definition: ALFA_RawDataContainerReadOut.h:72
ALFA_RawDataContainerReadOut::ecrId
uint16_t ecrId() const
Definition: ALFA_RawDataContainerReadOut.h:87
ALFA_RawDataContainerReadOut::m_lvl1Id
uint32_t m_lvl1Id
Definition: ALFA_RawDataContainerReadOut.h:42