ATLAS Offline Software
Loading...
Searching...
No Matches
DataHandleTestTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8
9#ifndef ASG_TOOLS__DATA_HANDLES_TEST_TOOL_H
10#define ASG_TOOLS__DATA_HANDLES_TEST_TOOL_H
11
12#include <AsgTools/AsgTool.h>
19
20// AthSimulation doesn't contain the muon-container, so we can't
21// really build the tool, but it is simpler to build an empty tool
22// than to exclude the tool completely from the AthSimulation build.
23#ifndef SIMULATIONBASE
25#endif
26
27namespace asg
28{
33
34 struct DataHandleTestTool : virtual public IDataHandleTestTool,
35 public AsgTool
36 {
38
39
40 public:
41 DataHandleTestTool (const std::string& val_name);
42
44 public:
46
47 public:
48 StatusCode initialize () override;
49
50 public:
51 void runTest () override;
52
53 public:
54#ifndef SIMULATIONBASE
55 SG::ReadHandleKey<xAOD::MuonContainer> m_readKey {this, "readKey", "Muons", "regular read key"};
56 SG::ReadHandleKey<xAOD::MuonContainer> m_readKeyEmpty {this, "readKeyEmpty", "", "regular read key (empty by default)"};
57 SG::ReadDecorHandleKey<xAOD::MuonContainer> m_readDecorKey {this, "readDecorKey", "Muons.pt", "read decor key"};
58 SG::ReadDecorHandleKey<xAOD::MuonContainer> m_readDecorKeyEmpty {this, "readDecorKeyEmpty", "", "read decor key (empty by default)"};
59 SG::ReadHandleKeyArray<xAOD::MuonContainer> m_readKeyArray {this, "readKeyArray", {}, "array read key"};
60 SG::WriteHandleKey<xAOD::MuonContainer> m_writeKey {this, "writeKey", "", "regular write key"};
61 SG::WriteDecorHandleKey<xAOD::MuonContainer> m_writeDecorKey {this, "writeDecorKey", "", "write decor key"};
62 SG::WriteDecorHandleKey<xAOD::MuonContainer> m_writeDecorKeyExisting {this, "writeDecorKeyExisting", "", "write decor key (existing)"};
63#endif
64 bool m_readFailure {false};
65 bool m_readArray {false};
66 bool m_readDecorFailure {false};
67 std::string m_doWriteName;
68 std::string m_doWriteDecorName;
70 };
71}
72
73#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
the interface for DataHandleTestTool
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
StatusCode initialize() override
Dummy implementation of the initialisation function.
SG::ReadHandleKey< xAOD::MuonContainer > m_readKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_writeDecorKeyExisting
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_readDecorKey
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_readDecorKeyEmpty
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_writeDecorKey
~DataHandleTestTool()
standard destructor
SG::WriteHandleKey< xAOD::MuonContainer > m_writeKey
DataHandleTestTool(const std::string &val_name)
standard constructor
void runTest() override
run the test
SG::ReadHandleKeyArray< xAOD::MuonContainer > m_readKeyArray
SG::ReadHandleKey< xAOD::MuonContainer > m_readKeyEmpty