ATLAS Offline Software
JetHistoVarTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 JetHistoVarTool::JetHistoVarTool( const std::string& type, const std::string & name ,const IInterface* parent):
10 
11 {
12  declareInterface<IJetHistoVarTool>(this);
13 
14 
15 }
16 
18 
19  if(m_name=="") m_name = name();
21  m_v->setScale(m_scale);
22 
23  if (! bool(m_v) ) {
24  ATH_MSG_ERROR(" could not create Jet Variable "<< m_name << " type: "<< m_type << " index="<< m_index );
25  return StatusCode::FAILURE;
26  }
27  return StatusCode::SUCCESS;
28 
29 }
30 
31 
32 float JetHistoVarTool::value(const xAOD::Jet &j) const {
33  return m_v->value(j) ;
34 }
JetHistoVarTool.h
JetHistoVarTool::m_v
std::unique_ptr< JetVar::Variable > m_v
Definition: JetHistoVarTool.h:61
JetHistoVarTool::initialize
virtual StatusCode initialize()
Definition: JetHistoVarTool.cxx:17
JetHistoVarTool::JetHistoVarTool
JetHistoVarTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: JetHistoVarTool.cxx:8
JetVar::Variable::create
static std::unique_ptr< Variable > create(const std::string &name, const std::string &type="float", int index=-1)
create and return a new Variable of a given name & type.
Definition: JetVariable.cxx:10
JetHistoVarTool::m_type
Gaudi::Property< std::string > m_type
Definition: JetHistoVarTool.h:64
JetHistoVarTool::m_index
Gaudi::Property< int > m_index
Definition: JetHistoVarTool.h:65
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
test_pyathena.parent
parent
Definition: test_pyathena.py:15
JetHistoVarTool::value
virtual float value(const xAOD::Jet &) const
the value of the variable for a given Jet
Definition: JetHistoVarTool.cxx:32
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
JetHistoVarTool::m_name
Gaudi::Property< std::string > m_name
Definition: JetHistoVarTool.h:63
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JetHistoVarTool::m_scale
Gaudi::Property< float > m_scale
Definition: JetHistoVarTool.h:66
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26