Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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  */
13 #ifndef ATHEXSTOREGATEEXAMPLE_EXAMPLEALG_H
14 #define ATHEXSTOREGATEEXAMPLE_EXAMPLEALG_H
15 
16 
21 
22 
23 // An example algorithm that reads and writes objects from the event store
24 // using handles.
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
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ExampleAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: ExampleAlg.cxx:25
ExampleAlg::m_writeKey
SG::WriteHandleKey< MyDataObj > m_writeKey
Definition: ExampleAlg.h:36
SG::ReadHandleKey< MyDataObj >
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
SG::WriteHandleKey< MyDataObj >
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ExampleAlg
Definition: ExampleAlg.h:27
MyDataObj.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
ExampleAlg::initialize
virtual StatusCode initialize() override
Definition: ExampleAlg.cxx:15
ExampleAlg::m_readKey
SG::ReadHandleKey< MyDataObj > m_readKey
Definition: ExampleAlg.h:35