ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
EventCommonD3PDMaker
src
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):
8
#include "
EventWeightFillerTool.h
"
9
10
// Gaudi/Athena include(s):
11
#include "
AthenaKernel/errorcheck.h
"
12
13
using
xAOD::EventInfo
;
14
15
namespace
D3PD
{
16
17
EventWeightFillerTool::EventWeightFillerTool
(
const
std::string&
type
,
18
const
std::string& name,
19
const
IInterface* parent )
20
:
BlockFillerTool
<
EventInfo
>(
type
, name, parent )
21
{
22
EventWeightFillerTool::book
().ignore();
// Avoid coverity warnings.
23
}
24
25
26
StatusCode
EventWeightFillerTool::book
()
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
34
StatusCode
EventWeightFillerTool::fill
(
const
EventInfo
& ei )
35
{
36
*
m_mc_event_weight
= ei.mcEventWeight();
37
return
StatusCode::SUCCESS;
38
}
39
40
}
// namespace D3PD
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
EventWeightFillerTool.h
D3PD::BlockFillerTool< xAOD::EventInfo >::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Definition
AddVariable.cxx:85
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition
BlockFillerTool.h:65
D3PD::EventWeightFillerTool::m_mc_event_weight
float * m_mc_event_weight
Variable: MC event weight.
Definition
EventWeightFillerTool.h:42
D3PD::EventWeightFillerTool::EventWeightFillerTool
EventWeightFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard AlgTool constructor.
Definition
EventWeightFillerTool.cxx:17
D3PD::EventWeightFillerTool::book
virtual StatusCode book()
Book variables for this block.
Definition
EventWeightFillerTool.cxx:26
D3PD::EventWeightFillerTool::fill
virtual StatusCode fill(const xAOD::EventInfo &ei)
Fill the variables for this block.
Definition
EventWeightFillerTool.cxx:34
D3PD
Block filler tool for noisy FEB information.
Definition
CaloCellDetailsFillerTool.cxx:29
EventInfo
Definition
EventInfo.py:1
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
type
Generated on
for ATLAS Offline Software by
1.17.0