ATLAS Offline Software
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  */
13 #ifndef CALOUTILS_TOOLWITHCONSTANTSTESTTOOL_H
14 #define CALOUTILS_TOOLWITHCONSTANTSTESTTOOL_H
15 
16 
19 
20 
21 namespace CaloUtils {
22 
23 
28  : public CaloUtils::ToolWithConstants<AthAlgTool>
29 {
30 public:
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 
51 private:
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
CaloUtils::ToolWithConstantsTestTool::execute
StatusCode execute(const EventContext &ctx) const
Gaudi execute method.
Definition: ToolWithConstantsTestTool.cxx:100
CaloUtils::ToolWithConstants::base_class
ToolWithConstants base_class
Shorthand for derived classes.
Definition: ToolWithConstants.h:443
CaloUtils
Definition: ToolWithConstantsTestTool.h:21
CaloUtils::ToolWithConstantsTestTool::m_runNumber
IntegerProperty m_runNumber
Definition: ToolWithConstantsTestTool.h:56
ToolWithConstants.h
Hold constants for a tool.
CaloUtils::ToolWithConstantsTestTool::m_cf1
Constant< float > m_cf1
Definition: ToolWithConstantsTestTool.h:58
CaloUtils::ToolWithConstantsTestTool::toolVersion
virtual int toolVersion() const override
A non-default tool version, for testing.
Definition: ToolWithConstantsTestTool.cxx:125
CaloUtils::ToolWithConstantsTestTool::m_condKey
StringProperty m_condKey
Definition: ToolWithConstantsTestTool.h:53
CaloUtils::ToolWithConstantsTestTool::m_cb1
Constant< bool > m_cb1
Definition: ToolWithConstantsTestTool.h:60
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
CaloUtils::ToolWithConstantsTestTool::m_ca1
Constant< CaloRec::Array< 1 > > m_ca1
Definition: ToolWithConstantsTestTool.h:61
CaloUtils::ToolWithConstantsTestTool::initialize
StatusCode initialize() override
Gaudi initialize method.
Definition: ToolWithConstantsTestTool.cxx:28
CaloUtils::ToolWithConstantsTestTool
Algorithm used for testing ToolWithConstants.
Definition: ToolWithConstantsTestTool.h:29
CaloUtils::ToolWithConstantsTestTool::m_ca2
Constant< CaloRec::Array< 2 > > m_ca2
Definition: ToolWithConstantsTestTool.h:62
CaloUtils::ToolWithConstants
Definition: ToolWithConstants.h:440
CaloUtils::ToolConstant
Constant of a ToolWithConstants.
Definition: ToolWithConstants.h:202
CaloUtils::ToolWithConstantsTestTool::m_ci1
Constant< int > m_ci1
Definition: ToolWithConstantsTestTool.h:59
CaloUtils::ToolWithConstantsTestTool::testWriteConstants
void testWriteConstants(const EventContext &ctx) const
For testing writeConstants().
Definition: ToolWithConstantsTestTool.cxx:134