ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ALFA_RawDataContainerReadOut Class Reference

#include <ALFA_RawDataContainerReadOut.h>

Inheritance diagram for ALFA_RawDataContainerReadOut:
Collaboration diagram for ALFA_RawDataContainerReadOut:

Public Member Functions

 ALFA_RawDataContainerReadOut ()
 
bool is_FullEVmarker () const
 
bool is_ROBmarker () const
 
bool is_RODmarker () const
 
void decodeWord (uint32_t dataWord)
 
void decodeHeader (std::vector< uint32_t > &vData)
 
void decodeHeaderFull (std::vector< uint32_t > &)
 
uint16_t subdetId () const
 
uint16_t mrodId () const
 
uint32_t runNum () const
 
uint16_t runType () const
 
uint32_t lvl1Id () const
 
uint16_t ecrId () const
 
uint16_t bcId () const
 
uint16_t trigtypeId () const
 
uint32_t DetEventType () const
 
uint32_t TimeStamp () const
 
uint32_t BCId () const
 

Protected Member Functions

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)
 
uint32_t setBits (uint16_t nData, uint16_t *inputData, uint16_t *inputPos)
 
uint32_t setBits (uint16_t nData, uint32_t *inputData, uint16_t *inputPos)
 

Protected Attributes

uint32_t m_word
 

Private Member Functions

void setZero ()
 
void setZeroFull ()
 

Private Attributes

uint32_t m_wordMarker
 
uint16_t m_subdetId
 
uint16_t m_mrodId
 
uint32_t m_lvl1Id
 
uint16_t m_ecrId
 
uint16_t m_bcId
 
uint32_t m_runNum
 
uint16_t m_runType
 
uint16_t m_triggerTypeId
 
uint32_t m_DetEventType
 
uint32_t m_timestamp
 
uint32_t m_BCId
 

Static Private Attributes

static constexpr uint32_t s_FullEVmarker = 0xaa1234aa
 
static constexpr uint32_t s_ROBmarker = 0xdd1234dd
 
static constexpr uint32_t s_RODmarker = 0xee1234ee
 
static constexpr uint32_t s_RODheadersize = 0x00000009
 
static constexpr uint32_t s_RODversion = 0x03010000
 

Detailed Description

Definition at line 30 of file ALFA_RawDataContainerReadOut.h.

Constructor & Destructor Documentation

◆ ALFA_RawDataContainerReadOut()

ALFA_RawDataContainerReadOut::ALFA_RawDataContainerReadOut ( )

Definition at line 10 of file ALFA_RawDataContainerReadOut.cxx.

10  :
11  m_wordMarker(0),
12  m_subdetId(0),
13  m_mrodId(0),
14  m_lvl1Id(0),
15  m_ecrId(0),
16  m_bcId(0),
17  m_runNum(0),
18  m_runType(0),
19  m_triggerTypeId(0),
20  m_DetEventType(0),
21  m_timestamp(0),
22  m_BCId(0)
23 { }

Member Function Documentation

◆ bcId()

uint16_t ALFA_RawDataContainerReadOut::bcId ( ) const
inline

Definition at line 88 of file ALFA_RawDataContainerReadOut.h.

88 {return m_bcId;}

◆ BCId()

uint32_t ALFA_RawDataContainerReadOut::BCId ( ) const
inline

Definition at line 93 of file ALFA_RawDataContainerReadOut.h.

93 {return m_BCId;}

◆ decodeHeader()

void ALFA_RawDataContainerReadOut::decodeHeader ( std::vector< uint32_t > &  vData)

Definition at line 55 of file ALFA_RawDataContainerReadOut.cxx.

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];
73  m_subdetId = getBits(getBitsWord(31,16));
74  m_mrodId = getBits(getBitsWord(15,0));
75 
76 
77  // Run number
78  m_word = vData[4];
79  m_runNum = getBits(getBitsWord(23,0));
80  m_runType = getBits(getBitsWord(31,24));
81 
82 
83  // Lvl1Id :counting events
84  m_word = vData[5];
85  m_lvl1Id = getBits(getBitsWord(23,0));
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 }

◆ decodeHeaderFull()

void ALFA_RawDataContainerReadOut::decodeHeaderFull ( std::vector< uint32_t > &  vDataFull)

Definition at line 31 of file ALFA_RawDataContainerReadOut.cxx.

32 {
33 
34  setZeroFull();
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 }

◆ decodeWord()

void ALFA_RawDataContainerReadOut::decodeWord ( uint32_t  dataWord)

Definition at line 26 of file ALFA_RawDataContainerReadOut.cxx.

27 {
28  m_wordMarker = dataWord;
29 }

◆ DetEventType()

uint32_t ALFA_RawDataContainerReadOut::DetEventType ( ) const
inline

Definition at line 90 of file ALFA_RawDataContainerReadOut.h.

90 {return m_DetEventType;}

◆ ecrId()

uint16_t ALFA_RawDataContainerReadOut::ecrId ( ) const
inline

Definition at line 87 of file ALFA_RawDataContainerReadOut.h.

87 {return m_ecrId;}

◆ getBits()

uint32_t ALFA_ReadOut::getBits ( std::pair< uint32_t, uint16_t >  in)
inlineprotectedinherited

Definition at line 29 of file ALFA_ReadOut.h.

29  {
30  return (m_word >> in.second) & (in.first|1);
31  }

◆ getBitsWord()

constexpr std::pair<uint32_t, uint16_t> ALFA_ReadOut::getBitsWord ( const uint16_t  bstart,
const uint16_t  bstop 
)
inlineconstexprprotectedinherited

Definition at line 21 of file ALFA_ReadOut.h.

21  {
22  uint32_t word = 0;
23  for (uint16_t i = bstop; i<bstart ; i++ )
24  word = ((word | 1)<<1);
25  return std::make_pair(word, bstop);
26  }

◆ is_FullEVmarker()

bool ALFA_RawDataContainerReadOut::is_FullEVmarker ( ) const
inline

Definition at line 70 of file ALFA_RawDataContainerReadOut.h.

70 {return m_wordMarker == s_FullEVmarker;}

◆ is_ROBmarker()

bool ALFA_RawDataContainerReadOut::is_ROBmarker ( ) const
inline

Definition at line 71 of file ALFA_RawDataContainerReadOut.h.

71 {return m_wordMarker == s_ROBmarker;}

◆ is_RODmarker()

bool ALFA_RawDataContainerReadOut::is_RODmarker ( ) const
inline

Definition at line 72 of file ALFA_RawDataContainerReadOut.h.

72 {return m_wordMarker == s_RODmarker;}

◆ lvl1Id()

uint32_t ALFA_RawDataContainerReadOut::lvl1Id ( ) const
inline

Definition at line 86 of file ALFA_RawDataContainerReadOut.h.

86 {return m_lvl1Id;}

◆ mrodId()

uint16_t ALFA_RawDataContainerReadOut::mrodId ( ) const
inline

Definition at line 83 of file ALFA_RawDataContainerReadOut.h.

83 {return m_mrodId;}

◆ runNum()

uint32_t ALFA_RawDataContainerReadOut::runNum ( ) const
inline

Definition at line 84 of file ALFA_RawDataContainerReadOut.h.

84 {return m_runNum;}

◆ runType()

uint16_t ALFA_RawDataContainerReadOut::runType ( ) const
inline

Definition at line 85 of file ALFA_RawDataContainerReadOut.h.

85 {return m_runType;}

◆ setBits() [1/2]

uint32_t ALFA_ReadOut::setBits ( uint16_t  nData,
uint16_t *  inputData,
uint16_t *  inputPos 
)
protectedinherited

◆ setBits() [2/2]

uint32_t ALFA_ReadOut::setBits ( uint16_t  nData,
uint32_t *  inputData,
uint16_t *  inputPos 
)
protectedinherited

◆ setZero()

void ALFA_RawDataContainerReadOut::setZero ( )
private

Definition at line 106 of file ALFA_RawDataContainerReadOut.cxx.

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 }

◆ setZeroFull()

void ALFA_RawDataContainerReadOut::setZeroFull ( )
private

Definition at line 119 of file ALFA_RawDataContainerReadOut.cxx.

120 {
121  m_timestamp = 0;
122  m_BCId = 0;
123 }

◆ subdetId()

uint16_t ALFA_RawDataContainerReadOut::subdetId ( ) const
inline

Definition at line 82 of file ALFA_RawDataContainerReadOut.h.

82 {return m_subdetId;}

◆ TimeStamp()

uint32_t ALFA_RawDataContainerReadOut::TimeStamp ( ) const
inline

Definition at line 92 of file ALFA_RawDataContainerReadOut.h.

92 {return m_timestamp;}

◆ trigtypeId()

uint16_t ALFA_RawDataContainerReadOut::trigtypeId ( ) const
inline

Definition at line 89 of file ALFA_RawDataContainerReadOut.h.

89 {return m_triggerTypeId;}

Member Data Documentation

◆ m_bcId

uint16_t ALFA_RawDataContainerReadOut::m_bcId
private

Definition at line 44 of file ALFA_RawDataContainerReadOut.h.

◆ m_BCId

uint32_t ALFA_RawDataContainerReadOut::m_BCId
private

Definition at line 52 of file ALFA_RawDataContainerReadOut.h.

◆ m_DetEventType

uint32_t ALFA_RawDataContainerReadOut::m_DetEventType
private

Definition at line 48 of file ALFA_RawDataContainerReadOut.h.

◆ m_ecrId

uint16_t ALFA_RawDataContainerReadOut::m_ecrId
private

Definition at line 43 of file ALFA_RawDataContainerReadOut.h.

◆ m_lvl1Id

uint32_t ALFA_RawDataContainerReadOut::m_lvl1Id
private

Definition at line 42 of file ALFA_RawDataContainerReadOut.h.

◆ m_mrodId

uint16_t ALFA_RawDataContainerReadOut::m_mrodId
private

Definition at line 41 of file ALFA_RawDataContainerReadOut.h.

◆ m_runNum

uint32_t ALFA_RawDataContainerReadOut::m_runNum
private

Definition at line 45 of file ALFA_RawDataContainerReadOut.h.

◆ m_runType

uint16_t ALFA_RawDataContainerReadOut::m_runType
private

Definition at line 46 of file ALFA_RawDataContainerReadOut.h.

◆ m_subdetId

uint16_t ALFA_RawDataContainerReadOut::m_subdetId
private

Definition at line 40 of file ALFA_RawDataContainerReadOut.h.

◆ m_timestamp

uint32_t ALFA_RawDataContainerReadOut::m_timestamp
private

Definition at line 51 of file ALFA_RawDataContainerReadOut.h.

◆ m_triggerTypeId

uint16_t ALFA_RawDataContainerReadOut::m_triggerTypeId
private

Definition at line 47 of file ALFA_RawDataContainerReadOut.h.

◆ m_word

uint32_t ALFA_ReadOut::m_word
protectedinherited

Definition at line 40 of file ALFA_ReadOut.h.

◆ m_wordMarker

uint32_t ALFA_RawDataContainerReadOut::m_wordMarker
private

Definition at line 37 of file ALFA_RawDataContainerReadOut.h.

◆ s_FullEVmarker

constexpr uint32_t ALFA_RawDataContainerReadOut::s_FullEVmarker = 0xaa1234aa
staticconstexprprivate

Definition at line 58 of file ALFA_RawDataContainerReadOut.h.

◆ s_ROBmarker

constexpr uint32_t ALFA_RawDataContainerReadOut::s_ROBmarker = 0xdd1234dd
staticconstexprprivate

Definition at line 60 of file ALFA_RawDataContainerReadOut.h.

◆ s_RODheadersize

constexpr uint32_t ALFA_RawDataContainerReadOut::s_RODheadersize = 0x00000009
staticconstexprprivate

Definition at line 64 of file ALFA_RawDataContainerReadOut.h.

◆ s_RODmarker

constexpr uint32_t ALFA_RawDataContainerReadOut::s_RODmarker = 0xee1234ee
staticconstexprprivate

Definition at line 62 of file ALFA_RawDataContainerReadOut.h.

◆ s_RODversion

constexpr uint32_t ALFA_RawDataContainerReadOut::s_RODversion = 0x03010000
staticconstexprprivate

Definition at line 65 of file ALFA_RawDataContainerReadOut.h.


The documentation for this class was generated from the following files:
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::m_mrodId
uint16_t m_mrodId
Definition: ALFA_RawDataContainerReadOut.h:41
ALFA_RawDataContainerReadOut::m_BCId
uint32_t m_BCId
Definition: ALFA_RawDataContainerReadOut.h:52
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::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_ReadOut::m_word
uint32_t m_word
Definition: ALFA_ReadOut.h:40
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
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
REPORT_MESSAGE_WITH_CONTEXT
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:345
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::getBitsWord
constexpr std::pair< uint32_t, uint16_t > getBitsWord(const uint16_t bstart, const uint16_t bstop)
Definition: ALFA_ReadOut.h:21
ALFA_ReadOut::getBits
uint32_t getBits(std::pair< uint32_t, uint16_t > in)
Definition: ALFA_ReadOut.h:29
ALFA_RawDataContainerReadOut::m_lvl1Id
uint32_t m_lvl1Id
Definition: ALFA_RawDataContainerReadOut.h:42