ATLAS Offline Software
EventWeightFillerTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: EventWeightFillerTool.cxx 603418 2014-06-24 15:37:50Z ssnyder $
6 
7 // Local include(s):
9 
10 // Gaudi/Athena include(s):
12 
13 using xAOD::EventInfo;
14 
15 namespace D3PD {
16 
18  const std::string& name,
19  const IInterface* parent )
21  {
22  EventWeightFillerTool::book().ignore(); // Avoid coverity warnings.
23  }
24 
25 
27  {
28  CHECK( addVariable( "mc_event_weight", m_mc_event_weight,
29  "MC weight, coming from the EventType object" ) );
30  return StatusCode::SUCCESS;
31  }
32 
33 
35  {
36  *m_mc_event_weight = ei.mcEventWeight();
37  return StatusCode::SUCCESS;
38  }
39 
40 } // namespace D3PD
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition: IEventInfoCnvTool.h:17
D3PD::EventWeightFillerTool::book
virtual StatusCode book()
Book variables for this block.
Definition: EventWeightFillerTool.cxx:26
D3PD::AddVariable::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Add a variable to the tuple.
Definition: AddVariable.cxx:85
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
D3PD::EventWeightFillerTool::m_mc_event_weight
float * m_mc_event_weight
Variable: MC event weight.
Definition: EventWeightFillerTool.h:42
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
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition: BlockFillerTool.h:68
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
EventWeightFillerTool.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
errorcheck.h
Helpers for checking error return status codes and reporting errors.
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:42
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::EventWeightFillerTool::EventWeightFillerTool
EventWeightFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard AlgTool constructor.
Definition: EventWeightFillerTool.cxx:17
D3PD::EventWeightFillerTool::fill
virtual StatusCode fill(const xAOD::EventInfo &ei)
Fill the variables for this block.
Definition: EventWeightFillerTool.cxx:34