ATLAS Offline Software
RegSelTool.cxx
Go to the documentation of this file.
1 
14 #include "RegSelLUT/RegSelSiLUT.h"
15 
16 #include "RegSelTool.h"
17 
18 
19 
21 RegSelTool::RegSelTool( const std::string& type, const std::string& name, const IInterface* parent )
22  : base_class( type, name, parent ),
23  m_initialised(false),
24  m_dumpTable(false)
25 {
27  declareProperty( "WriteTable", m_dumpTable, "write out maps to files for debugging" );
28  declareProperty( "Initialised", m_initialised=false, "flag to determine whether the corresponding subsystem is initilised" );
29 }
30 
31 
34 
35 
36 
38  ATH_MSG_DEBUG( "Initialising RegSelTool " << name() << "\ttable: " << m_tableKey );
39  if ( !m_initialised ) {
40  ATH_MSG_WARNING( "Lookup table will not be initialised " << name() << "\tkey " << m_tableKey );
41  }
42  ATH_CHECK( m_tableKey.initialize(m_initialised) );
43  return StatusCode::SUCCESS;
44 }
45 
46 
47 
48 const IRegSelLUT* RegSelTool::lookup( const EventContext& ctx ) const {
49  if ( !m_initialised ) return nullptr;
51  return (*table_handle)->payload();
52 }
53 
54 
55 
56 
57 
RegSelTool::RegSelTool
RegSelTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor for tool (obviously).
Definition: RegSelTool.cxx:21
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
RegSelTool::m_tableKey
SG::ReadCondHandleKey< IRegSelLUTCondData > m_tableKey
Definition: RegSelTool.h:67
RegSelTool::initialize
virtual StatusCode initialize() override
@method initialize, loads lookup tables for retrieve Identifier Hash and ROBID
Definition: RegSelTool.cxx:37
RegSelTool::m_initialised
bool m_initialised
Flag to determine whether it has yet been initialised.
Definition: RegSelTool.h:62
RegSelSiLUT.h
emacs: this is -*- c++ -*-
RegSelTool.h
RegSelTool::~RegSelTool
virtual ~RegSelTool() override
Destructor.
Definition: RegSelTool.cxx: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
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IRegSelLUT
Definition: IRegSelLUT.h:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
RegSelTool::m_dumpTable
BooleanProperty m_dumpTable
Flag to dump loaded table in data file.
Definition: RegSelTool.h:65
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
RegSelTool::lookup
const IRegSelLUT * lookup(const EventContext &ctx) const override
@method lookup, actually retrieve the lookup table as conditions data
Definition: RegSelTool.cxx:48