ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExStoreGateExample
src
ExampleAlg.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
/*
3
* Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
4
*/
11
12
13
#ifndef ATHEXSTOREGATEEXAMPLE_EXAMPLEALG_H
14
#define ATHEXSTOREGATEEXAMPLE_EXAMPLEALG_H
15
16
17
#include "
AthExStoreGateExample/MyDataObj.h
"
18
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
19
#include "
StoreGate/ReadHandleKey.h
"
20
#include "
StoreGate/WriteHandleKey.h
"
21
22
23
// An example algorithm that reads and writes objects from the event store
24
// using handles.
25
class
ExampleAlg
26
:
public
AthReentrantAlgorithm
27
{
28
public
:
29
virtual
StatusCode
initialize
()
override
;
30
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
31
32
private
:
33
// Declare the keys used to access the data: one for reading and one
34
// for writing.
35
SG::ReadHandleKey<MyDataObj>
m_readKey
{
this
,
"ReadKey"
,
"in"
};
36
SG::WriteHandleKey<MyDataObj>
m_writeKey
{
this
,
"WriteKey"
,
"out"
};
37
};
38
39
40
#endif
AthReentrantAlgorithm.h
MyDataObj.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
ExampleAlg
Definition
ExampleAlg.h:27
ExampleAlg::m_writeKey
SG::WriteHandleKey< MyDataObj > m_writeKey
Definition
ExampleAlg.h:36
ExampleAlg::initialize
virtual StatusCode initialize() override
Definition
ExampleAlg.cxx:15
ExampleAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
ExampleAlg.cxx:25
ExampleAlg::m_readKey
SG::ReadHandleKey< MyDataObj > m_readKey
Definition
ExampleAlg.h:35
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
Generated on
for ATLAS Offline Software by
1.17.0