ATLAS Offline Software
Loading...
Searching...
No Matches
ToolWithConstantsTestTool.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-2020 CERN for the benefit of the ATLAS collaboration.
4 */
11
12
13#ifndef CALOUTILS_TOOLWITHCONSTANTSTESTTOOL_H
14#define CALOUTILS_TOOLWITHCONSTANTSTESTTOOL_H
15
16
19
20
21namespace CaloUtils {
22
23
28 : public CaloUtils::ToolWithConstants<AthAlgTool>
29{
30public:
33
34
36 StatusCode initialize () override;
37
38
40 StatusCode execute (const EventContext& ctx) const;
41
42
44 virtual int toolVersion() const override;
45
46
48 void testWriteConstants (const EventContext& ctx) const;
49
50
51private:
52 StringProperty m_condKey
53 { this, "CondKey", "", "" };
54
55 IntegerProperty m_runNumber
56 { this, "RunNumber", 284500, "" };
57
58 Constant<float> m_cf1 { this, "cf1", 1.5, "cf1 doc" };
59 Constant<int> m_ci1 { this, "ci1", "ci1 doc" };
60 Constant<bool> m_cb1 { this, "cb1", "cb1 doc" };
61 Constant<CaloRec::Array<1> > m_ca1 { this, "ca1", "ca1 doc" };
62 Constant<CaloRec::Array<2> > m_ca2 { this, "ca2", "ca2 doc" };
63};
64
65
66} // namespace CaloUtils
67
68
69#endif // not CALOUTILS_TOOLWITHCONSTANTSTESTTOOL_H
Hold constants for a tool.
Algorithm used for testing ToolWithConstants.
StatusCode execute(const EventContext &ctx) const
Gaudi execute method.
void testWriteConstants(const EventContext &ctx) const
For testing writeConstants().
virtual int toolVersion() const override
A non-default tool version, for testing.
StatusCode initialize() override
Gaudi initialize method.
Hold constants for a tool.
ToolWithConstants base_class
Shorthand for derived classes.