ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCnv
LArByteStream
src
LArFebHeaderReader.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArRawEvent/LArFebHeader.h
"
6
#include "
LArByteStream/LArRodBlockStructure.h
"
7
#include "
LArFebHeaderReader.h
"
8
9
10
void
LArFebHeaderReader::fillFebHeader
(
LArFebHeader
* larFebHeader,
//output
11
const
LArRodBlockStructure
* rodBlock,
//input
12
const
ROBFragment
& rob) {
//input
13
larFebHeader->
SetFormatVersion
(rob.rod_version());
14
larFebHeader->
SetSourceId
(rob.rod_source_id());
15
larFebHeader->
SetRunNumber
(rob.rod_run_no());
16
larFebHeader->
SetELVL1Id
(rob.rod_lvl1_id());
17
larFebHeader->
SetBCId
(rob.rod_bc_id());
18
larFebHeader->
SetLVL1TigType
(rob.rod_lvl1_trigger_type());
19
larFebHeader->
SetDetEventType
(rob.rod_detev_type());
20
21
//set DSP data
22
const
unsigned
nsample=rodBlock->
getNumberOfSamples
();
23
larFebHeader->
SetRodStatus
(rodBlock->
getStatus
());
24
larFebHeader->
SetDspCodeVersion
(rodBlock->
getDspCodeVersion
());
25
larFebHeader->
SetDspEventCounter
(rodBlock->
getDspEventCounter
());
26
larFebHeader->
SetRodResults1Size
(rodBlock->
getResults1Size
());
27
larFebHeader->
SetRodResults2Size
(rodBlock->
getResults2Size
());
28
larFebHeader->
SetRodRawDataSize
(rodBlock->
getRawDataSize
());
29
larFebHeader->
SetNbSweetCells1
(rodBlock->
getNbSweetCells1
());
30
larFebHeader->
SetNbSweetCells2
(rodBlock->
getNbSweetCells2
());
31
larFebHeader->
SetNbSamples
(nsample);
32
larFebHeader->
SetOnlineChecksum
(rodBlock->
onlineCheckSum
());
33
larFebHeader->
SetOfflineChecksum
(rodBlock->
offlineCheckSum
());
34
35
if
(!rodBlock->
hasControlWords
()) {
36
larFebHeader->
SetFebELVL1Id
(rob.rod_lvl1_id());
37
larFebHeader->
SetFebBCId
(rob.rod_bc_id());
38
}
else
{
39
const
uint16_t evtid = rodBlock->
getCtrl1
(0) & 0x1f;
40
const
uint16_t bcid = rodBlock->
getCtrl2
(0) & 0x1fff;
41
larFebHeader->
SetFebELVL1Id
(evtid);
42
larFebHeader->
SetFebBCId
(bcid);
43
for
(
int
iadc=0;iadc<16;iadc++) {
44
larFebHeader->
SetFebCtrl1
(rodBlock->
getCtrl1
(iadc));
45
larFebHeader->
SetFebCtrl2
(rodBlock->
getCtrl2
(iadc));
46
larFebHeader->
SetFebCtrl3
(rodBlock->
getCtrl3
(iadc));
47
}
48
for
(
unsigned
int
i = 0; i<nsample; i++ ) {
49
larFebHeader->
SetFebSCA
(rodBlock->
getRadd
(0,i) & 0xff);
50
}
51
}
//end else no control words
52
53
return
;
54
}
LArFebHeaderReader.h
LArFebHeader.h
LArRodBlockStructure.h
LArFebHeader
Holds information from the FEB Header.
Definition
LArFebHeader.h:21
LArFebHeader::SetRodResults1Size
void SetRodResults1Size(const uint16_t size)
set the ROD block sizes
Definition
LArFebHeader.h:142
LArFebHeader::SetOnlineChecksum
void SetOnlineChecksum(const uint32_t checksum)
Definition
LArFebHeader.h:156
LArFebHeader::SetNbSweetCells2
void SetNbSweetCells2(const uint16_t n)
Definition
LArFebHeader.h:152
LArFebHeader::SetRodStatus
void SetRodStatus(const uint32_t status)
set the ROD Status
Definition
LArFebHeader.h:198
LArFebHeader::SetFebBCId
void SetFebBCId(const uint16_t bcid)
set the FEB Bunch Crossing ID
Definition
LArFebHeader.h:182
LArFebHeader::SetFebCtrl2
void SetFebCtrl2(const uint16_t ctrl2)
set the FEB Control Word #2
Definition
LArFebHeader.h:190
LArFebHeader::SetFormatVersion
void SetFormatVersion(const uint32_t formatVersion)
set the format version
Definition
LArFebHeader.h:122
LArFebHeader::SetOfflineChecksum
void SetOfflineChecksum(const uint32_t checksum)
Definition
LArFebHeader.h:158
LArFebHeader::SetFebSCA
void SetFebSCA(const uint16_t sca)
set the SCA's
Definition
LArFebHeader.h:202
LArFebHeader::SetDetEventType
void SetDetEventType(const uint32_t detEvType)
set the Detector event type ID
Definition
LArFebHeader.h:166
LArFebHeader::SetDspEventCounter
void SetDspEventCounter(const uint32_t eventCounter)
set the Event number counted by the DSP code
Definition
LArFebHeader.h:174
LArFebHeader::SetLVL1TigType
void SetLVL1TigType(const uint32_t lvl1ttype)
set the Level1 trigger type ID
Definition
LArFebHeader.h:162
LArFebHeader::SetRodRawDataSize
void SetRodRawDataSize(const uint16_t size)
Definition
LArFebHeader.h:146
LArFebHeader::SetFebCtrl3
void SetFebCtrl3(const uint16_t ctrl3)
set the FEB Control Word #3
Definition
LArFebHeader.h:194
LArFebHeader::SetFebCtrl1
void SetFebCtrl1(const uint16_t ctrl1)
set the FEB Control Word #1
Definition
LArFebHeader.h:186
LArFebHeader::SetBCId
void SetBCId(const uint16_t bcid)
set the Bunch Crossing ID
Definition
LArFebHeader.h:138
LArFebHeader::SetFebELVL1Id
void SetFebELVL1Id(const uint16_t elvl1Id)
set the FEB Event ID
Definition
LArFebHeader.h:178
LArFebHeader::SetRunNumber
void SetRunNumber(const uint32_t runNumber)
set the run number
Definition
LArFebHeader.h:130
LArFebHeader::SetSourceId
void SetSourceId(const uint32_t sourceID)
set the source Id
Definition
LArFebHeader.h:126
LArFebHeader::SetRodResults2Size
void SetRodResults2Size(const uint16_t size)
Definition
LArFebHeader.h:144
LArFebHeader::SetDspCodeVersion
void SetDspCodeVersion(const uint32_t codeVersion)
set the version of the DSP code
Definition
LArFebHeader.h:170
LArFebHeader::SetNbSweetCells1
void SetNbSweetCells1(const uint16_t n)
set the number of samples and cells above thresholds
Definition
LArFebHeader.h:150
LArFebHeader::SetNbSamples
void SetNbSamples(const uint16_t n)
Definition
LArFebHeader.h:154
LArFebHeader::SetELVL1Id
void SetELVL1Id(const uint16_t elvl1Id)
set the EventID
Definition
LArFebHeader.h:134
LArRodBlockStructure
Definition
LArRodBlockStructure.h:47
LArRodBlockStructure::getCtrl1
virtual uint16_t getCtrl1(uint32_t adc) const
Definition
LArRodBlockStructure.cxx:224
LArRodBlockStructure::getCtrl3
virtual uint16_t getCtrl3(uint32_t adc) const
Definition
LArRodBlockStructure.cxx:226
LArRodBlockStructure::getResults1Size
virtual uint16_t getResults1Size() const
Definition
LArRodBlockStructure.cxx:228
LArRodBlockStructure::getRawDataSize
virtual uint16_t getRawDataSize() const
Definition
LArRodBlockStructure.cxx:230
LArRodBlockStructure::getDspCodeVersion
virtual uint32_t getDspCodeVersion() const
Definition
LArRodBlockStructure.cxx:234
LArRodBlockStructure::getCtrl2
virtual uint16_t getCtrl2(uint32_t adc) const
Definition
LArRodBlockStructure.cxx:225
LArRodBlockStructure::getRadd
virtual uint32_t getRadd(uint32_t adc, uint32_t sample) const
Definition
LArRodBlockStructure.cxx:223
LArRodBlockStructure::offlineCheckSum
virtual uint32_t offlineCheckSum() const
Definition
LArRodBlockStructure.cxx:147
LArRodBlockStructure::getNbSweetCells2
virtual uint16_t getNbSweetCells2() const
Definition
LArRodBlockStructure.cxx:232
LArRodBlockStructure::getNumberOfSamples
virtual uint32_t getNumberOfSamples() const
Definition
LArRodBlockStructure.cxx:221
LArRodBlockStructure::hasControlWords
virtual uint32_t hasControlWords() const
Definition
LArRodBlockStructure.h:124
LArRodBlockStructure::getStatus
virtual uint32_t getStatus() const
Definition
LArRodBlockStructure.cxx:227
LArRodBlockStructure::getResults2Size
virtual uint16_t getResults2Size() const
Definition
LArRodBlockStructure.cxx:229
LArRodBlockStructure::getNbSweetCells1
virtual uint16_t getNbSweetCells1() const
Definition
LArRodBlockStructure.cxx:231
LArRodBlockStructure::getDspEventCounter
virtual int32_t getDspEventCounter() const
Definition
LArRodBlockStructure.cxx:240
LArRodBlockStructure::onlineCheckSum
virtual uint32_t onlineCheckSum() const
Definition
LArRodBlockStructure.cxx:139
LArFebHeaderReader::fillFebHeader
void fillFebHeader(LArFebHeader *lfh, const LArRodBlockStructure *bl, const ROBFragment &robFrag)
Fill info for one FEB Header.
Definition
LArFebHeaderReader.cxx:10
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition
RawEvent.h:27
Generated on
for ATLAS Offline Software by
1.17.0