ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCalibTools
src
LArFillDSPConfig.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArCalibTools/LArFillDSPConfig.h
"
6
7
#include "
LArCOOLConditions/LArDSPConfig.h
"
8
#include "
LArIdentifier/LArOnlineID.h
"
9
#include "
AthenaPoolUtilities/AthenaAttributeList.h
"
10
12
// Public methods:
14
15
// Destructor
17
LArFillDSPConfig::~LArFillDSPConfig
() =
default
;
18
19
// Athena Algorithm's Hooks
21
StatusCode
LArFillDSPConfig::stop
() {
22
23
24
StatusCode
sc
=
detStore
()->retrieve(
m_onlineID
);
25
if
(
sc
.isFailure()) {
26
ATH_MSG_ERROR
(
"Failed to get LArOnlineID"
);
27
return
sc
;
28
}
29
30
const
unsigned
nFebs=
m_onlineID
->febHashMax();
31
32
33
LArDSPConfigWrite
larDSPConfig;
34
35
for
(
unsigned
iFeb=0;iFeb<nFebs;++iFeb) {
36
const
HWIdentifier
febId=
m_onlineID
->feb_Id(iFeb);
37
//bool useMGRampIntercept=(m_onlineID->isEMBchannel(febId) || m_onlineID->isEMECchannel(febId));
38
bool
useMGRampIntercept=(
m_onlineID
->isEMBchannel(febId) ||
m_onlineID
->isEMECOW(febId) );
39
if
(
m_lowmu
) {
40
if
(
m_onlineID
->isFCALchannel(febId)) useMGRampIntercept=
true
;
41
}
42
uint8_t peakSample=2;
43
if
(
m_onlineID
->isHECchannel(febId)) peakSample=1;
//HEC: peak-sample=1
44
larDSPConfig.
set
(iFeb,peakSample,useMGRampIntercept);
45
}
46
47
48
std::unique_ptr<AthenaAttributeList> pAttrList(larDSPConfig.
attributeList
());
49
ATH_CHECK
(
detStore
()->record(std::move(pAttrList),
m_folderName
));
50
ATH_MSG_INFO
(
"Successfully recorded AthenaAttributeList containing DSP configuration for "
<< nFebs <<
" Febs"
);
51
52
if
(
m_dump
) {
53
//Crosscheck:
54
const
AthenaAttributeList
* attrList_read=
nullptr
;
55
ATH_CHECK
(
detStore
()->retrieve(attrList_read,
m_folderName
));
56
57
LArDSPConfig
config(attrList_read);
58
59
for
(
auto
fit=
m_onlineID
->feb_begin();fit!=
m_onlineID
->feb_end();++fit) {
60
unsigned
ps=config.peakSample(*fit);
61
bool
ic=config.useMGRampIntercept(*fit);
62
std::cout <<
"FEB "
<<
m_onlineID
->channel_name(*fit) <<
": peakSample="
<< ps <<
" useMGIntercept="
<< ic << std::endl;
63
}
64
}
65
return
StatusCode::SUCCESS;
66
}
67
68
69
70
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
AthenaAttributeList.h
LArDSPConfig.h
LArFillDSPConfig.h
LArOnlineID.h
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
AthCommonAlgorithm< Gaudi::Algorithm >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Definition
AthCommonDataStore.h:95
AthenaAttributeList
An AttributeList represents a logical row of attributes in a metadata table.
Definition
PersistentDataModel/PersistentDataModel/AthenaAttributeList.h:46
HWIdentifier
Definition
HWIdentifier.h:13
LArDSPConfigWrite
Definition
LArDSPConfig.h:73
LArDSPConfigWrite::set
void set(const IdentifierHash febId, const uint8_t peakSample, const bool useMGRampIntercept)
Definition
LArDSPConfig.cxx:74
LArDSPConfigWrite::attributeList
std::unique_ptr< AthenaAttributeList > attributeList()
Definition
LArDSPConfig.h:85
LArDSPConfig
Definition
LArDSPConfig.h:22
LArFillDSPConfig::stop
virtual StatusCode stop() override
Definition
LArFillDSPConfig.cxx:21
LArFillDSPConfig::m_folderName
StringProperty m_folderName
Definition
LArFillDSPConfig.h:38
LArFillDSPConfig::m_dump
BooleanProperty m_dump
Definition
LArFillDSPConfig.h:39
LArFillDSPConfig::m_onlineID
const LArOnlineID * m_onlineID
Definition
LArFillDSPConfig.h:36
LArFillDSPConfig::~LArFillDSPConfig
virtual ~LArFillDSPConfig()
Destructor:
LArFillDSPConfig::m_lowmu
BooleanProperty m_lowmu
Definition
LArFillDSPConfig.h:40
Generated on
for ATLAS Offline Software by
1.17.0