ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCalibTools
src
LArDSPConfig2Ntuple.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/LArDSPConfig2Ntuple.h
"
6
#include "
LArIdentifier/LArOnlineID.h
"
7
8
#include "
LArCOOLConditions/LArDSPConfig.h
"
9
10
#include "CoralBase/Blob.h"
11
#include "
AthenaPoolUtilities/AthenaAttributeList.h
"
12
13
LArDSPConfig2Ntuple::LArDSPConfig2Ntuple
(
const
std::string& name, ISvcLocator* pSvcLocator):
14
LArCond2NtupleBase
(name, pSvcLocator){
15
16
declareProperty
(
"NtupleTitle"
,
m_ntTitle
=
"DSP Config"
);
17
declareProperty
(
"NtupleName"
,
m_ntname
=
"DSPCONFIG"
);
18
declareProperty
(
"Folder"
,
m_folder
);
19
m_ntpath
=
"/NTUPLES/FILE1/"
+
m_ntname
;
20
m_addFEBTemp
=
false
;
21
}
22
23
24
StatusCode
LArDSPConfig2Ntuple::initialize
() {
25
26
StatusCode
sc
=
LArCond2NtupleBase::initialize
();
27
if
(
sc
!=StatusCode::SUCCESS) {
28
ATH_MSG_ERROR
(
"Base init failed"
);
29
return
StatusCode::FAILURE;
30
}
31
32
sc
=
m_nt
->addItem(
"peakSample"
,
m_peakSample
);
33
if
(
sc
!=StatusCode::SUCCESS) {
34
ATH_MSG_ERROR
(
"addItem peakSample failed"
);
35
return
StatusCode::FAILURE;
36
}
37
38
sc
=
m_nt
->addItem(
"useHGIntercept"
,
m_useHgIntercept
);
39
if
(
sc
!=StatusCode::SUCCESS) {
40
ATH_MSG_ERROR
(
"addItem useHGIntercept failed"
);
41
return
StatusCode::FAILURE;
42
}
43
44
sc
=
m_nt
->addItem(
"useMGIntercept"
,
m_useMgIntercept
);
45
if
(
sc
!=StatusCode::SUCCESS) {
46
ATH_MSG_ERROR
(
"addItem useMGIntercept failed"
);
47
return
StatusCode::FAILURE;
48
}
49
50
sc
=
m_nt
->addItem(
"useLGIntercept"
,
m_useLgIntercept
);
51
if
(
sc
!=StatusCode::SUCCESS) {
52
ATH_MSG_ERROR
(
"addItem useLGIntercept failed"
);
53
return
StatusCode::FAILURE;
54
}
55
56
return
StatusCode::SUCCESS;
57
}
58
59
LArDSPConfig2Ntuple::~LArDSPConfig2Ntuple
()
60
=
default
;
61
62
StatusCode
LArDSPConfig2Ntuple::stop
() {
63
StatusCode
sc
;
64
65
66
//const LArDSPConfig *dc = 0;
67
const
AthenaAttributeList
* attrList=
nullptr
;
68
sc
=
detStore
()->retrieve(attrList,
m_folder
);
69
if
(
sc
.isFailure()) {
70
ATH_MSG_ERROR
(
"Failed to retrieve AthenaAttributeList with key "
<<
m_folder
);
71
return
sc
;
72
}
73
74
LArDSPConfig
larDSPConfig(attrList);
75
if
(!larDSPConfig.
good
()) {
76
ATH_MSG_ERROR
(
"larDSPConfig failed to initialise correctly."
);
77
return
StatusCode::FAILURE;
78
}
79
80
for
(
const
HWIdentifier
hwid:
m_onlineId
->channel_range()) {
81
m_peakSample
=larDSPConfig.
peakSample
(hwid);
82
m_useMgIntercept
=larDSPConfig.
useMGRampIntercept
(hwid);
83
m_useHgIntercept
=larDSPConfig.
useHGRampIntercept
(hwid);
84
m_useLgIntercept
=larDSPConfig.
useLGRampIntercept
(hwid);
85
fillFromIdentifier
(hwid);
86
//ATH_MSG_INFO("hwid: "<<hwid.getString()<<" "<<tQThr<<" : "<<samplesThr<<" : "<<trigThr);
87
88
sc
=
ntupleSvc
()->writeRecord(
m_nt
);
89
if
(
sc
!=StatusCode::SUCCESS) {
90
ATH_MSG_ERROR
(
"writeRecord failed"
);
91
return
StatusCode::FAILURE;
92
}
93
}
94
95
ATH_MSG_INFO
(
"LArDSPConfig2Ntuple has finished."
);
96
return
StatusCode::SUCCESS;
97
98
}
// end finalize-method.
99
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
LArDSPConfig2Ntuple.h
LArDSPConfig.h
LArOnlineID.h
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
ntupleSvc
INTupleSvc * ntupleSvc()
Definition
ServiceAccessor.h:14
AthCommonAlgorithm< Gaudi::Algorithm >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
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
LArCond2NtupleBase::initialize
StatusCode initialize()
Definition
LArCond2NtupleBase.cxx:33
LArCond2NtupleBase::m_ntTitle
std::string m_ntTitle
Definition
LArCond2NtupleBase.h:68
LArCond2NtupleBase::m_nt
NTuple::Tuple * m_nt
Definition
LArCond2NtupleBase.h:71
LArCond2NtupleBase::m_onlineId
const LArOnlineID_Base * m_onlineId
Definition
LArCond2NtupleBase.h:88
LArCond2NtupleBase::m_ntpath
std::string m_ntpath
Definition
LArCond2NtupleBase.h:68
LArCond2NtupleBase::fillFromIdentifier
bool fillFromIdentifier(const HWIdentifier &id)
Definition
LArCond2NtupleBase.cxx:290
LArCond2NtupleBase::m_addFEBTemp
Gaudi::Property< bool > m_addFEBTemp
Definition
LArCond2NtupleBase.h:56
LArCond2NtupleBase::LArCond2NtupleBase
LArCond2NtupleBase(const std::string &name, ISvcLocator *pSvcLocator)
Definition
LArCond2NtupleBase.cxx:15
LArDSPConfig2Ntuple::m_useMgIntercept
NTuple::Item< short > m_useMgIntercept
Definition
LArDSPConfig2Ntuple.h:28
LArDSPConfig2Ntuple::LArDSPConfig2Ntuple
LArDSPConfig2Ntuple(const std::string &name, ISvcLocator *pSvcLocator)
Definition
LArDSPConfig2Ntuple.cxx:13
LArDSPConfig2Ntuple::~LArDSPConfig2Ntuple
~LArDSPConfig2Ntuple()
LArDSPConfig2Ntuple::m_ntname
std::string m_ntname
Definition
LArDSPConfig2Ntuple.h:23
LArDSPConfig2Ntuple::m_folder
std::string m_folder
Definition
LArDSPConfig2Ntuple.h:24
LArDSPConfig2Ntuple::m_useHgIntercept
NTuple::Item< short > m_useHgIntercept
Definition
LArDSPConfig2Ntuple.h:27
LArDSPConfig2Ntuple::initialize
StatusCode initialize()
Definition
LArDSPConfig2Ntuple.cxx:24
LArDSPConfig2Ntuple::stop
StatusCode stop()
Definition
LArDSPConfig2Ntuple.cxx:62
LArDSPConfig2Ntuple::m_peakSample
NTuple::Item< short > m_peakSample
Definition
LArDSPConfig2Ntuple.h:26
LArDSPConfig2Ntuple::m_useLgIntercept
NTuple::Item< short > m_useLgIntercept
Definition
LArDSPConfig2Ntuple.h:29
LArDSPConfig
Definition
LArDSPConfig.h:22
LArDSPConfig::useLGRampIntercept
bool useLGRampIntercept(const HWIdentifier FEBid) const
Definition
LArDSPConfig.h:54
LArDSPConfig::useMGRampIntercept
bool useMGRampIntercept(const HWIdentifier FEBid) const
Definition
LArDSPConfig.h:48
LArDSPConfig::good
bool good() const
Definition
LArDSPConfig.h:42
LArDSPConfig::peakSample
uint8_t peakSample(const HWIdentifier FEBid) const
Definition
LArDSPConfig.h:59
LArDSPConfig::useHGRampIntercept
bool useHGRampIntercept(const HWIdentifier FEBid) const
Definition
LArDSPConfig.h:51
Generated on
for ATLAS Offline Software by
1.17.0