ATLAS Offline Software
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-2017 CERN for the benefit of the ATLAS collaboration.
4  */
5 // $Id$
14 #ifndef ATHEXSTOREGATEEXAMPLE_EXAMPLEALG_H
15 #define ATHEXSTOREGATEEXAMPLE_EXAMPLEALG_H
16 
17 
22 
23 
24 // An example algorithm that reads and writes objects from the event store
25 // using handles.
27  : public AthReentrantAlgorithm
28 {
29 public:
30  ExampleAlg (const std::string& name, ISvcLocator* svcLocator);
31  virtual StatusCode initialize() override;
32  virtual StatusCode execute (const EventContext& ctx) const override;
33 
34 private:
35  // Declare the keys used to access the data: one for reading and one
36  // for writing.
39 };
40 
41 
42 #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:36
ExampleAlg::m_writeKey
SG::WriteHandleKey< MyDataObj > m_writeKey
Definition: ExampleAlg.h:38
SG::ReadHandleKey< MyDataObj >
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
SG::WriteHandleKey< MyDataObj >
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ExampleAlg
Definition: ExampleAlg.h:28
ExampleAlg::ExampleAlg
ExampleAlg(const std::string &name, ISvcLocator *svcLocator)
Definition: ExampleAlg.cxx:16
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:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
MyDataObj.h
ExampleAlg::m_readKey
SG::ReadHandleKey< MyDataObj > m_readKey
Definition: ExampleAlg.h:37