ATLAS Offline Software
Loading...
Searching...
No Matches
LArFebHeader Class Reference

Holds information from the FEB Header. More...

#include <LArFebHeader.h>

Collaboration diagram for LArFebHeader:

Classes

struct  DspHeader
 DSP-Header (most of it is actually in the DSP-Trailer) More...
struct  RodHeader
 ROD-Header, always present (is part of the FEB-Header) More...

Public Member Functions

 LArFebHeader ()
 for ROOT I/O
 LArFebHeader (const HWIdentifier febid)
 Constructor with FEB Id.
 ~LArFebHeader ()=default
 Destructor.
HWIdentifier FEBId () const
 get the FEBId
uint32_t FormatVersion () const
 get the format version
uint32_t SourceId () const
 get the source Id
uint32_t RunNumber () const
 get the run number
uint16_t ELVL1Id () const
 get the EventID
uint16_t BCId () const
 get the Bunch Crossing ID
uint32_t LVL1TigType () const
 get the Level1 trigger type ID
uint32_t DetEventType () const
 get the Detector event type ID
uint32_t DspCodeVersion () const
 get the version of the DSP code
uint32_t DspEventCounter () const
 get the Event number counted by the DSP code
uint16_t FebELVL1Id () const
 get the FEB Event ID
uint16_t FebBCId () const
 get the FEB Bunch Crossing ID
uint16_t RodResults1Size () const
 get the ROD block sizes
uint16_t RodResults2Size () const
uint16_t RodRawDataSize () const
uint16_t NbSamples () const
 get the number of samples and cells above threshold
uint16_t NbSweetCells1 () const
uint16_t NbSweetCells2 () const
uint32_t OnlineChecksum () const
uint32_t OfflineChecksum () const
bool ChecksumVerification () const
const std::vector< uint16_t > & FebCtrl1 () const
 get the FEB Control Word #1
const std::vector< uint16_t > & FebCtrl2 () const
 get the FEB Control Word #2
const std::vector< uint16_t > & FebCtrl3 () const
 get the FEB Control Word #3
uint32_t RodStatus () const
 get the ROD Status
const std::vector< uint16_t > & SCA () const
 get the SCA's
bool CheckErrorELVL1Id () const
 Check functions: return true if mismatch in Event ID.
bool CheckErrorBCId () const
 Check functions: return true if mismatch in Bunch Crossing ID.
void SetFormatVersion (const uint32_t formatVersion)
 set the format version
void SetSourceId (const uint32_t sourceID)
 set the source Id
void SetRunNumber (const uint32_t runNumber)
 set the run number
void SetELVL1Id (const uint16_t elvl1Id)
 set the EventID
void SetBCId (const uint16_t bcid)
 set the Bunch Crossing ID
void SetRodResults1Size (const uint16_t size)
 set the ROD block sizes
void SetRodResults2Size (const uint16_t size)
void SetRodRawDataSize (const uint16_t size)
void SetNbSweetCells1 (const uint16_t n)
 set the number of samples and cells above thresholds
void SetNbSweetCells2 (const uint16_t n)
void SetNbSamples (const uint16_t n)
void SetOnlineChecksum (const uint32_t checksum)
void SetOfflineChecksum (const uint32_t checksum)
void SetLVL1TigType (const uint32_t lvl1ttype)
 set the Level1 trigger type ID
void SetDetEventType (const uint32_t detEvType)
 set the Detector event type ID
void SetDspCodeVersion (const uint32_t codeVersion)
 set the version of the DSP code
void SetDspEventCounter (const uint32_t eventCounter)
 set the Event number counted by the DSP code
void SetFebELVL1Id (const uint16_t elvl1Id)
 set the FEB Event ID
void SetFebBCId (const uint16_t bcid)
 set the FEB Bunch Crossing ID
void SetFebCtrl1 (const uint16_t ctrl1)
 set the FEB Control Word #1
void SetFebCtrl2 (const uint16_t ctrl2)
 set the FEB Control Word #2
void SetFebCtrl3 (const uint16_t ctrl3)
 set the FEB Control Word #3
void SetRodStatus (const uint32_t status)
 set the ROD Status
void SetFebSCA (const uint16_t sca)
 set the SCA's

Static Private Member Functions

static int degray (unsigned int x)
 like explained in: http://mathworld.wolfram.com/GrayCode.html

Private Attributes

const HWIdentifier m_FEBId {}
 Feb Identifier.
RodHeader m_RodHeader {}
DspHeader m_DspHeader {}
uint16_t m_ELVL1Id {}
 FEB EventId.
uint16_t m_BCId {}
 FEB BCId.
uint16_t m_Results1Size {}
uint16_t m_Results2Size {}
uint16_t m_RawDataSize {}
uint16_t m_NbSweetCells1 {}
uint16_t m_NbSweetCells2 {}
uint16_t m_NbSamples {}
uint32_t m_OnlineChecksum {1}
uint32_t m_OfflineChecksum {}
uint32_t m_Status {}
 ROD Status word.
std::vector< uint16_t > m_SCA
 SCA number for each samples.
std::vector< uint16_t > m_Ctrl1
 FEB Control word 1.
std::vector< uint16_t > m_Ctrl2
 @Brief FEB Control word 2
std::vector< uint16_t > m_Ctrl3
 FEB Control word 3.

Detailed Description

Holds information from the FEB Header.

Author
Walter Lampl
Remi Lafaye

Definition at line 20 of file LArFebHeader.h.

Constructor & Destructor Documentation

◆ LArFebHeader() [1/2]

LArFebHeader::LArFebHeader ( )

for ROOT I/O

Definition at line 7 of file LArFebHeader.cxx.

7{}

◆ LArFebHeader() [2/2]

LArFebHeader::LArFebHeader ( const HWIdentifier febid)

Constructor with FEB Id.

Definition at line 10 of file LArFebHeader.cxx.

10 :m_FEBId(febid) {
11
12}
const HWIdentifier m_FEBId
Feb Identifier.

◆ ~LArFebHeader()

LArFebHeader::~LArFebHeader ( )
default

Destructor.

Member Function Documentation

◆ BCId()

uint16_t LArFebHeader::BCId ( ) const
inline

get the Bunch Crossing ID

Definition at line 67 of file LArFebHeader.h.

67{return m_RodHeader.BCId;}
RodHeader m_RodHeader

◆ CheckErrorBCId()

bool LArFebHeader::CheckErrorBCId ( ) const
inline

Check functions: return true if mismatch in Bunch Crossing ID.

Definition at line 119 of file LArFebHeader.h.

119{ return m_RodHeader.BCId!=((m_BCId+1)&0xfff); }
uint16_t m_BCId
FEB BCId.

◆ CheckErrorELVL1Id()

bool LArFebHeader::CheckErrorELVL1Id ( ) const
inline

Check functions: return true if mismatch in Event ID.

Definition at line 116 of file LArFebHeader.h.

116{ return (m_RodHeader.ELVL1Id&0x1f)!=m_ELVL1Id; }
uint16_t m_ELVL1Id
FEB EventId.

◆ ChecksumVerification()

bool LArFebHeader::ChecksumVerification ( ) const
inline

Definition at line 98 of file LArFebHeader.h.

uint32_t m_OnlineChecksum
uint32_t m_OfflineChecksum

◆ degray()

int LArFebHeader::degray ( unsigned int x)
staticprivate

like explained in: http://mathworld.wolfram.com/GrayCode.html

Definition at line 14 of file LArFebHeader.cxx.

15{ // like explained in: http://mathworld.wolfram.com/GrayCode.html
16
17 int i,j,sum;
18
19 if ( x==138 ) return 141;
20 else if ( x== 136 ) return 142;
21 else if ( x== 128 ) return 143;
22 else {
23 for (i=0; i<32; i++)
24 {
25 sum=0;
26 for (j=i+1; j<32; j++)
27 {
28 sum += (x>>j)&0x1;
29 }
30 // printf("x=%8x sum=%d\n",x,sum );
31
32 if (sum%2) {
33 if (x&(1<<i))
34 {
35 unsigned int tmp1,tmp2=0;
36 if (i < 31)
37 tmp1 = (x>>(i+1))<<(i+1);
38 else
39 tmp1 = 0;
40 if (i>0)
41 tmp2 = x & ((1u<<i)-1);
42 // printf("tmp1 =%x tmp2=%x\n",tmp1,tmp2 );
43
44 x=tmp1|tmp2;
45 }
46 else
47 x |= (1<<i);
48 }
49 }
50 return x;
51 }
52}
#define x

◆ DetEventType()

uint32_t LArFebHeader::DetEventType ( ) const
inline

get the Detector event type ID

Definition at line 73 of file LArFebHeader.h.

73{return m_RodHeader.DetEventType;}

◆ DspCodeVersion()

uint32_t LArFebHeader::DspCodeVersion ( ) const
inline

get the version of the DSP code

Definition at line 76 of file LArFebHeader.h.

76{return m_DspHeader.CodeVersion;}
DspHeader m_DspHeader

◆ DspEventCounter()

uint32_t LArFebHeader::DspEventCounter ( ) const
inline

get the Event number counted by the DSP code

Definition at line 79 of file LArFebHeader.h.

79{return m_DspHeader.EventCounter;}

◆ ELVL1Id()

uint16_t LArFebHeader::ELVL1Id ( ) const
inline

get the EventID

Definition at line 64 of file LArFebHeader.h.

64{return m_RodHeader.ELVL1Id;}

◆ FebBCId()

uint16_t LArFebHeader::FebBCId ( ) const
inline

get the FEB Bunch Crossing ID

Definition at line 85 of file LArFebHeader.h.

85{return m_BCId;}

◆ FebCtrl1()

const std::vector< uint16_t > & LArFebHeader::FebCtrl1 ( ) const
inline

get the FEB Control Word #1

Definition at line 101 of file LArFebHeader.h.

101{return m_Ctrl1;}
std::vector< uint16_t > m_Ctrl1
FEB Control word 1.

◆ FebCtrl2()

const std::vector< uint16_t > & LArFebHeader::FebCtrl2 ( ) const
inline

get the FEB Control Word #2

Definition at line 104 of file LArFebHeader.h.

104{return m_Ctrl2;}
std::vector< uint16_t > m_Ctrl2
@Brief FEB Control word 2

◆ FebCtrl3()

const std::vector< uint16_t > & LArFebHeader::FebCtrl3 ( ) const
inline

get the FEB Control Word #3

Definition at line 107 of file LArFebHeader.h.

107{return m_Ctrl3;}
std::vector< uint16_t > m_Ctrl3
FEB Control word 3.

◆ FebELVL1Id()

uint16_t LArFebHeader::FebELVL1Id ( ) const
inline

get the FEB Event ID

Definition at line 82 of file LArFebHeader.h.

82{return m_ELVL1Id;}

◆ FEBId()

HWIdentifier LArFebHeader::FEBId ( ) const
inline

get the FEBId

Definition at line 52 of file LArFebHeader.h.

52{return m_FEBId;}

◆ FormatVersion()

uint32_t LArFebHeader::FormatVersion ( ) const
inline

get the format version

Definition at line 55 of file LArFebHeader.h.

55{return m_RodHeader.FormatVersion;}

◆ LVL1TigType()

uint32_t LArFebHeader::LVL1TigType ( ) const
inline

get the Level1 trigger type ID

Definition at line 70 of file LArFebHeader.h.

70{return m_RodHeader.LVL1TigType;}

◆ NbSamples()

uint16_t LArFebHeader::NbSamples ( ) const
inline

get the number of samples and cells above threshold

Definition at line 93 of file LArFebHeader.h.

93{return m_NbSamples;}
uint16_t m_NbSamples

◆ NbSweetCells1()

uint16_t LArFebHeader::NbSweetCells1 ( ) const
inline

Definition at line 94 of file LArFebHeader.h.

94{return m_NbSweetCells1;}
uint16_t m_NbSweetCells1

◆ NbSweetCells2()

uint16_t LArFebHeader::NbSweetCells2 ( ) const
inline

Definition at line 95 of file LArFebHeader.h.

95{return m_NbSweetCells2;}
uint16_t m_NbSweetCells2

◆ OfflineChecksum()

uint32_t LArFebHeader::OfflineChecksum ( ) const
inline

Definition at line 97 of file LArFebHeader.h.

97{ return m_OfflineChecksum; }

◆ OnlineChecksum()

uint32_t LArFebHeader::OnlineChecksum ( ) const
inline

Definition at line 96 of file LArFebHeader.h.

96{ return m_OnlineChecksum; }

◆ RodRawDataSize()

uint16_t LArFebHeader::RodRawDataSize ( ) const
inline

Definition at line 90 of file LArFebHeader.h.

90{return m_RawDataSize;}
uint16_t m_RawDataSize

◆ RodResults1Size()

uint16_t LArFebHeader::RodResults1Size ( ) const
inline

get the ROD block sizes

Definition at line 88 of file LArFebHeader.h.

88{return m_Results1Size;}
uint16_t m_Results1Size

◆ RodResults2Size()

uint16_t LArFebHeader::RodResults2Size ( ) const
inline

Definition at line 89 of file LArFebHeader.h.

89{return m_Results2Size;}
uint16_t m_Results2Size

◆ RodStatus()

uint32_t LArFebHeader::RodStatus ( ) const
inline

get the ROD Status

Definition at line 110 of file LArFebHeader.h.

110{return m_Status;}
uint32_t m_Status
ROD Status word.

◆ RunNumber()

uint32_t LArFebHeader::RunNumber ( ) const
inline

get the run number

Definition at line 61 of file LArFebHeader.h.

61{return m_RodHeader. RunNumber;}
uint32_t RunNumber() const
get the run number

◆ SCA()

const std::vector< uint16_t > & LArFebHeader::SCA ( ) const
inline

get the SCA's

Definition at line 113 of file LArFebHeader.h.

113{ return m_SCA; }
std::vector< uint16_t > m_SCA
SCA number for each samples.

◆ SetBCId()

void LArFebHeader::SetBCId ( const uint16_t bcid)
inline

set the Bunch Crossing ID

Definition at line 138 of file LArFebHeader.h.

139 { m_RodHeader.BCId=bcid; return; }
setEventNumber setTimeStamp bcid

◆ SetDetEventType()

void LArFebHeader::SetDetEventType ( const uint32_t detEvType)
inline

set the Detector event type ID

Definition at line 166 of file LArFebHeader.h.

167 { m_RodHeader.DetEventType=detEvType; return; }

◆ SetDspCodeVersion()

void LArFebHeader::SetDspCodeVersion ( const uint32_t codeVersion)
inline

set the version of the DSP code

Definition at line 170 of file LArFebHeader.h.

171 { m_DspHeader.CodeVersion=codeVersion; return; }

◆ SetDspEventCounter()

void LArFebHeader::SetDspEventCounter ( const uint32_t eventCounter)
inline

set the Event number counted by the DSP code

Definition at line 174 of file LArFebHeader.h.

175 { m_DspHeader.EventCounter=eventCounter; return; }

◆ SetELVL1Id()

void LArFebHeader::SetELVL1Id ( const uint16_t elvl1Id)
inline

set the EventID

Definition at line 134 of file LArFebHeader.h.

135 { m_RodHeader.ELVL1Id=elvl1Id; return; }

◆ SetFebBCId()

void LArFebHeader::SetFebBCId ( const uint16_t bcid)
inline

set the FEB Bunch Crossing ID

Definition at line 182 of file LArFebHeader.h.

183 { m_BCId=bcid; return; }

◆ SetFebCtrl1()

void LArFebHeader::SetFebCtrl1 ( const uint16_t ctrl1)
inline

set the FEB Control Word #1

Definition at line 186 of file LArFebHeader.h.

187 { m_Ctrl1.push_back(ctrl1); return; }

◆ SetFebCtrl2()

void LArFebHeader::SetFebCtrl2 ( const uint16_t ctrl2)
inline

set the FEB Control Word #2

Definition at line 190 of file LArFebHeader.h.

191 { m_Ctrl2.push_back(ctrl2); return; }

◆ SetFebCtrl3()

void LArFebHeader::SetFebCtrl3 ( const uint16_t ctrl3)
inline

set the FEB Control Word #3

Definition at line 194 of file LArFebHeader.h.

195 { m_Ctrl3.push_back(ctrl3); return; }

◆ SetFebELVL1Id()

void LArFebHeader::SetFebELVL1Id ( const uint16_t elvl1Id)
inline

set the FEB Event ID

Definition at line 178 of file LArFebHeader.h.

179 { m_ELVL1Id=elvl1Id; return; }

◆ SetFebSCA()

void LArFebHeader::SetFebSCA ( const uint16_t sca)
inline

set the SCA's

Definition at line 202 of file LArFebHeader.h.

203 { m_SCA.push_back(degray(sca)); return; }
static int degray(unsigned int x)
like explained in: http://mathworld.wolfram.com/GrayCode.html

◆ SetFormatVersion()

void LArFebHeader::SetFormatVersion ( const uint32_t formatVersion)
inline

set the format version

Definition at line 122 of file LArFebHeader.h.

123 { m_RodHeader.FormatVersion=formatVersion; return; }

◆ SetLVL1TigType()

void LArFebHeader::SetLVL1TigType ( const uint32_t lvl1ttype)
inline

set the Level1 trigger type ID

Definition at line 162 of file LArFebHeader.h.

163 { m_RodHeader.LVL1TigType=lvl1ttype; return; }

◆ SetNbSamples()

void LArFebHeader::SetNbSamples ( const uint16_t n)
inline

Definition at line 154 of file LArFebHeader.h.

155 { m_NbSamples=n; return; }

◆ SetNbSweetCells1()

void LArFebHeader::SetNbSweetCells1 ( const uint16_t n)
inline

set the number of samples and cells above thresholds

Definition at line 150 of file LArFebHeader.h.

151 { m_NbSweetCells1=n; return; }

◆ SetNbSweetCells2()

void LArFebHeader::SetNbSweetCells2 ( const uint16_t n)
inline

Definition at line 152 of file LArFebHeader.h.

153 { m_NbSweetCells2=n; return; }

◆ SetOfflineChecksum()

void LArFebHeader::SetOfflineChecksum ( const uint32_t checksum)
inline

Definition at line 158 of file LArFebHeader.h.

159 { m_OfflineChecksum=checksum; return; }

◆ SetOnlineChecksum()

void LArFebHeader::SetOnlineChecksum ( const uint32_t checksum)
inline

Definition at line 156 of file LArFebHeader.h.

157 { m_OnlineChecksum=checksum; return; }

◆ SetRodRawDataSize()

void LArFebHeader::SetRodRawDataSize ( const uint16_t size)
inline

Definition at line 146 of file LArFebHeader.h.

147 { m_RawDataSize=size; return; }

◆ SetRodResults1Size()

void LArFebHeader::SetRodResults1Size ( const uint16_t size)
inline

set the ROD block sizes

Definition at line 142 of file LArFebHeader.h.

143 { m_Results1Size=size; return; }

◆ SetRodResults2Size()

void LArFebHeader::SetRodResults2Size ( const uint16_t size)
inline

Definition at line 144 of file LArFebHeader.h.

145 { m_Results2Size=size; return; }

◆ SetRodStatus()

void LArFebHeader::SetRodStatus ( const uint32_t status)
inline

set the ROD Status

Definition at line 198 of file LArFebHeader.h.

199 { m_Status=status; return; }
status
Definition merge.py:16

◆ SetRunNumber()

void LArFebHeader::SetRunNumber ( const uint32_t runNumber)
inline

set the run number

Definition at line 130 of file LArFebHeader.h.

131 { m_RodHeader.RunNumber=runNumber; return; }

◆ SetSourceId()

void LArFebHeader::SetSourceId ( const uint32_t sourceID)
inline

set the source Id

Definition at line 126 of file LArFebHeader.h.

127 { m_RodHeader.SourceId=sourceID; return; }

◆ SourceId()

uint32_t LArFebHeader::SourceId ( ) const
inline

get the source Id

Definition at line 58 of file LArFebHeader.h.

58{return m_RodHeader.SourceId;}

Member Data Documentation

◆ m_BCId

uint16_t LArFebHeader::m_BCId {}
private

FEB BCId.

Definition at line 224 of file LArFebHeader.h.

224{};

◆ m_Ctrl1

std::vector<uint16_t> LArFebHeader::m_Ctrl1
private

FEB Control word 1.

Definition at line 242 of file LArFebHeader.h.

◆ m_Ctrl2

std::vector<uint16_t> LArFebHeader::m_Ctrl2
private

@Brief FEB Control word 2

Definition at line 245 of file LArFebHeader.h.

◆ m_Ctrl3

std::vector<uint16_t> LArFebHeader::m_Ctrl3
private

FEB Control word 3.

Definition at line 248 of file LArFebHeader.h.

◆ m_DspHeader

DspHeader LArFebHeader::m_DspHeader {}
private

Definition at line 218 of file LArFebHeader.h.

218{};

◆ m_ELVL1Id

uint16_t LArFebHeader::m_ELVL1Id {}
private

FEB EventId.

Definition at line 221 of file LArFebHeader.h.

221{};

◆ m_FEBId

const HWIdentifier LArFebHeader::m_FEBId {}
private

Feb Identifier.

Definition at line 214 of file LArFebHeader.h.

214{};

◆ m_NbSamples

uint16_t LArFebHeader::m_NbSamples {}
private

Definition at line 231 of file LArFebHeader.h.

231{};

◆ m_NbSweetCells1

uint16_t LArFebHeader::m_NbSweetCells1 {}
private

Definition at line 229 of file LArFebHeader.h.

229{};

◆ m_NbSweetCells2

uint16_t LArFebHeader::m_NbSweetCells2 {}
private

Definition at line 230 of file LArFebHeader.h.

230{};

◆ m_OfflineChecksum

uint32_t LArFebHeader::m_OfflineChecksum {}
private

Definition at line 233 of file LArFebHeader.h.

233{};

◆ m_OnlineChecksum

uint32_t LArFebHeader::m_OnlineChecksum {1}
private

Definition at line 232 of file LArFebHeader.h.

232{1};

◆ m_RawDataSize

uint16_t LArFebHeader::m_RawDataSize {}
private

Definition at line 228 of file LArFebHeader.h.

228{};

◆ m_Results1Size

uint16_t LArFebHeader::m_Results1Size {}
private

Definition at line 226 of file LArFebHeader.h.

226{};

◆ m_Results2Size

uint16_t LArFebHeader::m_Results2Size {}
private

Definition at line 227 of file LArFebHeader.h.

227{};

◆ m_RodHeader

RodHeader LArFebHeader::m_RodHeader {}
private

Definition at line 216 of file LArFebHeader.h.

216{};

◆ m_SCA

std::vector<uint16_t> LArFebHeader::m_SCA
private

SCA number for each samples.

Definition at line 239 of file LArFebHeader.h.

◆ m_Status

uint32_t LArFebHeader::m_Status {}
private

ROD Status word.

Definition at line 236 of file LArFebHeader.h.

236{};

The documentation for this class was generated from the following files: