ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAlgorithms
TrigL2MuonSA
src
PtEndcapLUTSvc.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 "GaudiKernel/ISvcLocator.h"
6
7
#include "
PtEndcapLUTSvc.h
"
8
#include "
PathResolver/PathResolver.h
"
9
10
#include "
AthenaBaseComps/AthMsgStreamMacros.h
"
11
12
// --------------------------------------------------------------------------------
13
// --------------------------------------------------------------------------------
14
15
TrigL2MuonSA::PtEndcapLUTSvc::PtEndcapLUTSvc
(
const
std::string& name, ISvcLocator* sl) :
16
AthService
(name,sl)
17
{
18
}
19
20
// --------------------------------------------------------------------------------
21
// --------------------------------------------------------------------------------
22
23
StatusCode
TrigL2MuonSA::PtEndcapLUTSvc::initialize
()
24
{
25
// implement the search of LUT trought the pathresolver Tool.
26
std::string lut_fileName;
27
if
(
m_useRun3LUT
){
28
lut_fileName =
PathResolver::find_file
(
m_lut_fileNameRun3
,
"DATAPATH"
);
29
}
else
{
30
lut_fileName =
PathResolver::find_file
(
m_lut_fileNameRun2
,
"DATAPATH"
);
31
}
32
ATH_MSG_INFO
(lut_fileName);
33
34
if
(lut_fileName.empty()) {
35
ATH_MSG_ERROR
(
"Cannot find EndcapLUT file "
<<
m_lut_fileNameRun3
);
36
return
StatusCode::FAILURE;
37
}
38
39
ATH_CHECK
(
m_ptEndcapLUT
.retrieve() );
40
ATH_MSG_DEBUG
(
"Retrieved service "
<<
m_ptEndcapLUT
);
41
42
// read LUT
43
ATH_CHECK
(
m_ptEndcapLUT
->readLUT(lut_fileName) );
44
if
(
m_useRun3LUT
){
45
ATH_MSG_DEBUG
(
"Read endcap LUT"
<<
m_lut_fileNameRun3
);
46
}
else
{
47
ATH_MSG_DEBUG
(
"Read endcap LUT"
<<
m_lut_fileNameRun2
);
48
}
49
50
return
StatusCode::SUCCESS;
51
}
52
53
// --------------------------------------------------------------------------------
54
// --------------------------------------------------------------------------------
55
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
AthMsgStreamMacros.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
PathResolver.h
PtEndcapLUTSvc.h
AthService::AthService
AthService()
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
Definition
PathResolver.cxx:220
TrigL2MuonSA::PtEndcapLUTSvc::m_lut_fileNameRun3
Gaudi::Property< std::string > m_lut_fileNameRun3
Definition
PtEndcapLUTSvc.h:30
TrigL2MuonSA::PtEndcapLUTSvc::m_lut_fileNameRun2
Gaudi::Property< std::string > m_lut_fileNameRun2
Definition
PtEndcapLUTSvc.h:32
TrigL2MuonSA::PtEndcapLUTSvc::PtEndcapLUTSvc
PtEndcapLUTSvc(const std::string &name, ISvcLocator *sl)
Definition
PtEndcapLUTSvc.cxx:15
TrigL2MuonSA::PtEndcapLUTSvc::m_useRun3LUT
Gaudi::Property< bool > m_useRun3LUT
Definition
PtEndcapLUTSvc.h:40
TrigL2MuonSA::PtEndcapLUTSvc::initialize
virtual StatusCode initialize() override
Definition
PtEndcapLUTSvc.cxx:23
TrigL2MuonSA::PtEndcapLUTSvc::m_ptEndcapLUT
ToolHandle< PtEndcapLUT > m_ptEndcapLUT
Definition
PtEndcapLUTSvc.h:43
Generated on
for ATLAS Offline Software by
1.17.0