ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetRec
JetRec
JetCopier.h
Go to the documentation of this file.
1
// this file is -*- C++ -*-
2
/*
3
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4
*/
5
6
#ifndef JETREC_JETCOPIER_H
7
#define JETREC_JETCOPIER_H
8
18
19
#include "
AsgTools/PropertyWrapper.h
"
20
#include "
AsgTools/AsgTool.h
"
21
#include "
AsgDataHandles/ReadHandleKey.h
"
22
#include "
AsgDataHandles/WriteHandleKey.h
"
23
#include "
JetInterface/IJetProvider.h
"
24
#include "
xAODJet/JetContainer.h
"
25
#include "
xAODCore/ShallowAuxContainer.h
"
26
27
// This class doesn't (yet) exist for AnalysisBase, so in that release
28
// we will simply have to rerun modifiers if we need them.
29
#ifndef XAOD_STANDALONE
30
#include "
StoreGate/ShallowCopyDecorDeps.h
"
31
#endif
32
33
class
JetCopier
34
:
public
asg::AsgTool
,
35
virtual
public
IJetProvider
36
{
37
ASG_TOOL_CLASS
(
JetCopier
,
IJetProvider
)
38
39
public
:
40
using
asg::AsgTool::AsgTool
;
41
42
// Called in parent initialize()
43
virtual
StatusCode
initialize
()
override
;
44
45
#ifndef XAOD_STANDALONE
46
// Needed to initialise the ShallowCopyDecorDeps object, which propagates
47
// decorations on the original into the copy in StoreGate.
48
// Override interface implementation in Athena only
49
virtual
StatusCode
initWithOutput
(
const
SG::WriteHandleKey<xAOD::JetContainer>
& outputJets)
override
;
50
#endif
51
52
// Called during execution
53
virtual
StatusCode
getAndRecordJets
(
SG::WriteHandle<xAOD::JetContainer>
& jetHandle)
const override
;
54
virtual
std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
getJets
()
const override
;
55
56
private
:
57
58
virtual
std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
ShallowCopyJets
()
const
;
59
virtual
std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
DeepCopyJets
()
const
;
60
61
// Handle Input JetContainer
62
SG::ReadHandleKey<xAOD::JetContainer>
m_inputJets
{
this
,
"InputJets"
,
""
,
"Jet collection to be copied"
};
63
64
Gaudi::Property<bool>
m_shallowCopy
{
this
,
"ShallowCopy"
,
true
,
"True for shallow copy, false for deep copy"
};
65
Gaudi::Property<bool>
m_shallowIO
{
this
,
"ShallowIO"
,
false
,
"True for storing only modified data"
};
66
67
#ifndef XAOD_STANDALONE
68
SG::ShallowCopyDecorDeps<xAOD::JetContainer>
m_decorDeps
{
this
,
"DecorDeps"
, {},
69
"List of decorations to propagate through the shallow copy."
};
70
#endif
71
};
72
73
#endif
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
IJetProvider.h
JetContainer.h
PropertyWrapper.h
ShallowAuxContainer.h
ShallowCopyDecorDeps.h
Helper to propagate decoration dependencies to a shallow copy.
IJetProvider
Definition
IJetProvider.h:27
JetCopier
Creates a new JetContainer by doing a shallow copy of an input JetVector.
Definition
JetCopier.h:36
JetCopier::ShallowCopyJets
virtual std::pair< std::unique_ptr< xAOD::JetContainer >, std::unique_ptr< SG::IAuxStore > > ShallowCopyJets() const
Definition
JetCopier.cxx:81
JetCopier::DeepCopyJets
virtual std::pair< std::unique_ptr< xAOD::JetContainer >, std::unique_ptr< SG::IAuxStore > > DeepCopyJets() const
Definition
JetCopier.cxx:106
JetCopier::m_shallowCopy
Gaudi::Property< bool > m_shallowCopy
Definition
JetCopier.h:64
JetCopier::getAndRecordJets
virtual StatusCode getAndRecordJets(SG::WriteHandle< xAOD::JetContainer > &jetHandle) const override
Method to allow the client to pass in a WriteHandle for the container and aux container to be recorde...
Definition
JetCopier.cxx:48
JetCopier::m_decorDeps
SG::ShallowCopyDecorDeps< xAOD::JetContainer > m_decorDeps
Definition
JetCopier.h:68
JetCopier::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
JetCopier.cxx:16
JetCopier::m_inputJets
SG::ReadHandleKey< xAOD::JetContainer > m_inputJets
Definition
JetCopier.h:62
JetCopier::getJets
virtual std::pair< std::unique_ptr< xAOD::JetContainer >, std::unique_ptr< SG::IAuxStore > > getJets() const override
Method to build the collection and return it to the caller.
Definition
JetCopier.cxx:72
JetCopier::m_shallowIO
Gaudi::Property< bool > m_shallowIO
Definition
JetCopier.h:65
JetCopier::initWithOutput
virtual StatusCode initWithOutput(const SG::WriteHandleKey< xAOD::JetContainer > &outputJets) override
Method to allow the client to pass in a WriteHandle during initialisation, in case this is needed for...
Definition
JetCopier.cxx:42
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::ShallowCopyDecorDeps
Helper to propagate decoration dependencies to a shallow copy.
Definition
StoreGate/StoreGate/ShallowCopyDecorDeps.h:75
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
SG::WriteHandle
Definition
StoreGate/StoreGate/WriteHandle.h:73
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
Generated on
for ATLAS Offline Software by
1.17.0