ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCalibTools
src
LArFebTimeOffset2Ntuple.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArCalibTools/LArFebTimeOffset2Ntuple.h
"
6
#include "
LArRawConditions/LArFEBTimeOffset.h
"
7
8
#include "
LArIdentifier/LArOnlineID.h
"
9
10
LArFebTimeOffset2Ntuple::LArFebTimeOffset2Ntuple
(
const
std::string & name, ISvcLocator * pSvcLocator) :
11
LArCond2NtupleBase
(name,pSvcLocator) {
12
13
declareProperty
(
"Gain"
,
m_gain
=0);
14
declareProperty
(
"ContainerKey"
,
m_inputContainer
=
"FebTimeOffset"
);
15
16
m_ntTitle
=
"FebTimeOffsets"
;
17
m_ntpath
=
"/NTUPLES/FILE1/FEBTIME"
;
18
}
19
20
LArFebTimeOffset2Ntuple::~LArFebTimeOffset2Ntuple
() =
default
;
21
22
23
StatusCode
LArFebTimeOffset2Ntuple::initialize
() {
24
25
//m_ntTitle="TimeDiffs";
26
//m_ntpath=std::string("/NTUPLES/FILE1/TIMEDIFF");
27
return
LArCond2NtupleBase::initialize
();
28
}
29
30
StatusCode LArFebTimeOffset2Ntuple::stop
ATLAS_NOT_THREAD_SAFE
() {
31
32
//std::cout << detStore()->dump() << std::endl;
33
NTuple::Item<float> offset;
34
NTuple::Item<long> gain;
35
36
37
m_nt->addItem(
"gain"
,gain,0,3).ignore();
38
m_nt->addItem(
"offset"
,offset,-5000,5000).ignore();
39
40
const
LArFEBTimeOffset
* feboffsets;
41
//if (detStore()->retrieve(feboffsets,m_inputContainer).isFailure()) {
42
if
(detStore()->retrieve(feboffsets).isFailure()) {
43
ATH_MSG_ERROR
(
"Failed to retrieve LArFEBTimeOffset with key "
<< m_inputContainer );
44
return
StatusCode::FAILURE;
45
}
46
47
const
float
novalue=-99999;
48
(
const_cast<
LArFEBTimeOffset
*
>
(feboffsets))->setDefaultReturnValue(novalue);
49
50
51
for
(
const
HWIdentifier
fid: m_onlineId->feb_range()) {
52
offset=feboffsets->
TimeOffset
(fid);
53
54
//FIXME: The PhysWave shifter fills 0 for all not-present FEBs.
55
if
(offset!=0 && offset!=novalue) {
56
gain=m_gain;
57
fillFromIdentifier(fid);
58
59
StatusCode
sc
=
ntupleSvc
()->writeRecord(m_nt);
60
if
(
sc
!=StatusCode::SUCCESS) {
61
ATH_MSG_ERROR
(
"writeRecord failed"
);
62
return
StatusCode::FAILURE;
63
}
64
}
//end if have value
65
}
// end loop over feb identifiers
66
67
return
StatusCode::SUCCESS;
68
}
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
LArFEBTimeOffset.h
ATLAS_NOT_THREAD_SAFE
StatusCode LArFebTimeOffset2Ntuple::stop ATLAS_NOT_THREAD_SAFE()
Install fatal handler with default options.
Definition
LArFebTimeOffset2Ntuple.cxx:30
LArFebTimeOffset2Ntuple.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
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_ntpath
std::string m_ntpath
Definition
LArCond2NtupleBase.h:68
LArCond2NtupleBase::LArCond2NtupleBase
LArCond2NtupleBase(const std::string &name, ISvcLocator *pSvcLocator)
Definition
LArCond2NtupleBase.cxx:15
LArFEBTimeOffset
Definition
LArFEBTimeOffset.h:13
LArFEBTimeOffset::TimeOffset
float TimeOffset(const HWIdentifier fId) const
Definition
LArFEBTimeOffset.h:33
LArFebTimeOffset2Ntuple::m_inputContainer
std::string m_inputContainer
Definition
LArFebTimeOffset2Ntuple.h:26
LArFebTimeOffset2Ntuple::~LArFebTimeOffset2Ntuple
virtual ~LArFebTimeOffset2Ntuple()
LArFebTimeOffset2Ntuple::m_gain
int m_gain
Definition
LArFebTimeOffset2Ntuple.h:27
LArFebTimeOffset2Ntuple::initialize
virtual StatusCode initialize() override
Definition
LArFebTimeOffset2Ntuple.cxx:23
LArFebTimeOffset2Ntuple::LArFebTimeOffset2Ntuple
LArFebTimeOffset2Ntuple(const std::string &name, ISvcLocator *pSvcLocator)
Definition
LArFebTimeOffset2Ntuple.cxx:10
Generated on
for ATLAS Offline Software by
1.17.0