ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
AthenaPOOL
AthenaPoolExample
AthenaPoolExampleAlgorithms
src
WriteExampleElectron.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ATHENAPOOLEXAMPLEALGORITHMS_WRITEEXAMPLEELECTRON_H
6
#define ATHENAPOOLEXAMPLEALGORITHMS_WRITEEXAMPLEELECTRON_H
7
12
13
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
14
#include "
AthenaPoolExampleData/ExampleElectronContainer.h
"
15
#include "
AthenaPoolExampleData/ExampleHitContainer.h
"
16
#include "
AthenaPoolExampleData/ExampleTrackContainer.h
"
17
#include "
StoreGate/WriteDecorHandleKey.h
"
18
#include "
StoreGate/WriteHandleKey.h
"
19
20
namespace
AthPoolEx
{
21
26
class
WriteExampleElectron
:
public
AthReentrantAlgorithm
{
27
public
:
28
WriteExampleElectron
(
const
std::string& name, ISvcLocator* pSvcLocator);
29
virtual
~WriteExampleElectron
() =
default
;
30
31
public
:
33
virtual
StatusCode
initialize
() override final;
34
virtual StatusCode
execute
(
const
EventContext& ctx)
const
override final;
35
virtual StatusCode
finalize
() override final;
36
37
// Read in ExampleTracks and ExampleHits
38
SG
::ReadHandleKey<
ExampleTrackContainer
>
m_exampleTrackKey
{
39
this
,
"ExampleTrackKey"
,
"MyTracks"
};
40
SG::ReadHandleKey<ExampleHitContainer>
m_exampleHitKey
{
this
,
"ExampleHitKey"
,
41
"MyHits"
};
42
43
// We will want to write some of those tracks as an ExampleElectron and place
44
// them into a container
45
SG::WriteHandleKey<xAOD::ExampleElectronContainer>
46
m_exampleElectronContainerKey
{
this
,
"ExampleElectronContainerName"
,
47
"TestContainer"
};
48
49
// Testing writing decorations, need keys
50
SG::WriteDecorHandleKey<xAOD::ExampleElectronContainer>
m_decor1Key
{
51
this
,
"ExampleElectronContainerDecorKey1"
,
"TestContainer.decor1"
,
52
"decorator1 key"
};
53
SG::WriteDecorHandleKey<xAOD::ExampleElectronContainer>
m_decor2Key
{
54
this
,
"ExampleElectronContainerDecorKey2"
,
"TestContainer.decor2"
,
55
"decorator2 key"
};
56
};
57
58
}
// namespace AthPoolEx
59
60
#endif
AthReentrantAlgorithm.h
ExampleElectronContainer.h
ExampleHitContainer.h
This file contains the class definition for the ExampleHitContainer class.
ExampleTrackContainer.h
This file contains the class definition for the ExampleTrackContainer class.
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
AthPoolEx::WriteExampleElectron::WriteExampleElectron
WriteExampleElectron(const std::string &name, ISvcLocator *pSvcLocator)
Definition
WriteExampleElectron.cxx:20
AthPoolEx::WriteExampleElectron::m_decor1Key
SG::WriteDecorHandleKey< xAOD::ExampleElectronContainer > m_decor1Key
Definition
WriteExampleElectron.h:50
AthPoolEx::WriteExampleElectron::m_decor2Key
SG::WriteDecorHandleKey< xAOD::ExampleElectronContainer > m_decor2Key
Definition
WriteExampleElectron.h:53
AthPoolEx::WriteExampleElectron::m_exampleHitKey
SG::ReadHandleKey< ExampleHitContainer > m_exampleHitKey
Definition
WriteExampleElectron.h:40
AthPoolEx::WriteExampleElectron::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition
WriteExampleElectron.cxx:38
AthPoolEx::WriteExampleElectron::m_exampleTrackKey
SG::ReadHandleKey< ExampleTrackContainer > m_exampleTrackKey
Definition
WriteExampleElectron.h:38
AthPoolEx::WriteExampleElectron::finalize
virtual StatusCode finalize() override final
Definition
WriteExampleElectron.cxx:106
AthPoolEx::WriteExampleElectron::~WriteExampleElectron
virtual ~WriteExampleElectron()=default
AthPoolEx::WriteExampleElectron::initialize
virtual StatusCode initialize() override final
Gaudi Service Interface method implementations:
Definition
WriteExampleElectron.cxx:25
AthPoolEx::WriteExampleElectron::m_exampleElectronContainerKey
SG::WriteHandleKey< xAOD::ExampleElectronContainer > m_exampleElectronContainerKey
Definition
WriteExampleElectron.h:46
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
ExampleTrackContainer
This class provides a data vector for ExampleTrack objects in AthenaPool.
Definition
ExampleTrackContainer.h:20
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
const
AthPoolEx
Definition
PassNoneFilter.h:16
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
Generated on
for ATLAS Offline Software by
1.17.0