The Gaudi Framework  master (2df85225)
Loading...
Searching...
No Matches
WriteHandleAlg.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
18
19namespace Gaudi::TestSuite {
20 class WriteHandleAlg : public ::Algorithm {
21 public:
22 WriteHandleAlg( const std::string& n, ISvcLocator* l ) : Algorithm( n, l ) {}
23
24 bool isClonable() const override { return true; }
25
27 StatusCode execute() override;
28
29 private:
30 Gaudi::Property<bool> m_useHandle{ this, "UseHandle", true, "Specify the usage of the handle to write" };
31
32 DataObjectWriteHandle<Collision> m_output_handle{ this, "Output", "/Event/MyCollision" };
33 };
34} // namespace Gaudi::TestSuite
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition Algorithm.h:98
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
DataObjectWriteHandle< Collision > m_output_handle
bool isClonable() const override
WriteHandleAlg(const std::string &n, ISvcLocator *l)
StatusCode execute() override
the execution of the algorithm
Gaudi::Property< bool > m_useHandle
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition ISvcLocator.h:42
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64