ATLAS Offline Software
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"
9 
11 
12 // --------------------------------------------------------------------------------
13 // --------------------------------------------------------------------------------
14 
15 TrigL2MuonSA::PtEndcapLUTSvc::PtEndcapLUTSvc(const std::string& name, ISvcLocator* sl) :
16  AthService(name,sl)
17 {
18 }
19 
20 // --------------------------------------------------------------------------------
21 // --------------------------------------------------------------------------------
22 
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_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
AthMsgStreamMacros.h
TrigL2MuonSA::PtEndcapLUTSvc::initialize
virtual StatusCode initialize() override
Definition: PtEndcapLUTSvc.cxx:23
PtEndcapLUTSvc.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthService
Definition: AthService.h:32
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
PathResolver.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrigL2MuonSA::PtEndcapLUTSvc::PtEndcapLUTSvc
PtEndcapLUTSvc(const std::string &name, ISvcLocator *sl)
Definition: PtEndcapLUTSvc.cxx:15