ATLAS Offline Software
Loading...
Searching...
No Matches
TrackParticleChargeFillerTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id$
12
13
16
17
18namespace D3PD {
19
20
28 (const std::string& type,
29 const std::string& name,
30 const IInterface* parent)
31 : BlockFillerTool<xAOD::TrackParticle> (type, name, parent)
32{
33 book().ignore(); // Avoid coverity warnings.
34}
35
36
37
42{
43 CHECK( addVariable ("charge", m_charge) );
44 return StatusCode::SUCCESS;
45}
46
47
57{
58 *m_charge = p.charge();
59 return StatusCode::SUCCESS;
60}
61
62
63} // namespace D3PD
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Type-safe wrapper for block filler tools.
TrackParticleChargeFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
virtual StatusCode fill(const xAOD::TrackParticle &p) override
Fill one block — type-safe version.
virtual StatusCode book() final
Book variables for this block.
Block filler tool for noisy FEB information.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
TrackParticle_v1 TrackParticle
Reference the current persistent version: