ATLAS Offline Software
Loading...
Searching...
No Matches
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
15TrigL2MuonSA::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
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
Gaudi::Property< std::string > m_lut_fileNameRun3
Gaudi::Property< std::string > m_lut_fileNameRun2
PtEndcapLUTSvc(const std::string &name, ISvcLocator *sl)
Gaudi::Property< bool > m_useRun3LUT
virtual StatusCode initialize() override
ToolHandle< PtEndcapLUT > m_ptEndcapLUT