ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgExampleTools
AsgExampleTools
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
>
13
#include <
AsgExampleTools/IDataHandleTestTool.h
>
14
#include <
AsgDataHandles/ReadHandleKey.h
>
15
#include <
AsgDataHandles/ReadHandleKeyArray.h
>
16
#include <
AsgDataHandles/ReadDecorHandleKey.h
>
17
#include <
AsgDataHandles/WriteHandleKey.h
>
18
#include <
AsgDataHandles/WriteDecorHandleKey.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
24
#include <
xAODMuon/MuonContainer.h
>
25
#endif
26
27
namespace
asg
28
{
33
34
struct
DataHandleTestTool
:
virtual
public
IDataHandleTestTool
,
35
public
AsgTool
36
{
37
ASG_TOOL_CLASS
(
DataHandleTestTool
,
IDataHandleTestTool
)
38
39
40
public
:
41
DataHandleTestTool
(
const
std::string& val_name);
42
44
public
:
45
~DataHandleTestTool
();
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
;
69
std::string
m_doWriteDecorNameExisting
;
70
};
71
}
72
73
#endif
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ReadHandleKeyArray.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteDecorHandleKey.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
MuonContainer.h
IDataHandleTestTool.h
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition
StoreGate/StoreGate/ReadDecorHandleKey.h:86
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
asg::IDataHandleTestTool
the interface for DataHandleTestTool
Definition
IDataHandleTestTool.h:19
SG::ReadHandleKeyArray
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Definition
StoreGate/StoreGate/ReadHandleKeyArray.h:32
asg
Definition
DataHandleTestTool.h:28
asg::DataHandleTestTool::m_doWriteDecorName
std::string m_doWriteDecorName
Definition
DataHandleTestTool.h:68
asg::DataHandleTestTool::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
DataHandleTestTool.cxx:54
asg::DataHandleTestTool::m_readKey
SG::ReadHandleKey< xAOD::MuonContainer > m_readKey
Definition
DataHandleTestTool.h:55
asg::DataHandleTestTool::m_writeDecorKeyExisting
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_writeDecorKeyExisting
Definition
DataHandleTestTool.h:62
asg::DataHandleTestTool::m_readDecorKey
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_readDecorKey
Definition
DataHandleTestTool.h:57
asg::DataHandleTestTool::m_readDecorKeyEmpty
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_readDecorKeyEmpty
Definition
DataHandleTestTool.h:58
asg::DataHandleTestTool::m_writeDecorKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_writeDecorKey
Definition
DataHandleTestTool.h:61
asg::DataHandleTestTool::m_doWriteName
std::string m_doWriteName
Definition
DataHandleTestTool.h:67
asg::DataHandleTestTool::m_readArray
bool m_readArray
Definition
DataHandleTestTool.h:65
asg::DataHandleTestTool::m_doWriteDecorNameExisting
std::string m_doWriteDecorNameExisting
Definition
DataHandleTestTool.h:69
asg::DataHandleTestTool::~DataHandleTestTool
~DataHandleTestTool()
standard destructor
Definition
DataHandleTestTool.cxx:47
asg::DataHandleTestTool::m_writeKey
SG::WriteHandleKey< xAOD::MuonContainer > m_writeKey
Definition
DataHandleTestTool.h:60
asg::DataHandleTestTool::DataHandleTestTool
DataHandleTestTool(const std::string &val_name)
standard constructor
Definition
DataHandleTestTool.cxx:33
asg::DataHandleTestTool::runTest
void runTest() override
run the test
Definition
DataHandleTestTool.cxx:72
asg::DataHandleTestTool::m_readKeyArray
SG::ReadHandleKeyArray< xAOD::MuonContainer > m_readKeyArray
Definition
DataHandleTestTool.h:59
asg::DataHandleTestTool::m_readDecorFailure
bool m_readDecorFailure
Definition
DataHandleTestTool.h:66
asg::DataHandleTestTool::m_readFailure
bool m_readFailure
Definition
DataHandleTestTool.h:64
asg::DataHandleTestTool::m_readKeyEmpty
SG::ReadHandleKey< xAOD::MuonContainer > m_readKeyEmpty
Definition
DataHandleTestTool.h:56
Generated on
for ATLAS Offline Software by
1.17.0