|
ATLAS Offline Software
|
Go to the documentation of this file.
22 return StatusCode::FAILURE;
26 ATH_MSG_ERROR(
"ShallowIO set to True while ShallowCopy is False");
28 return StatusCode::FAILURE;
35 return StatusCode::SUCCESS;
39 #ifndef XAOD_STANDALONE
48 std::unique_ptr<xAOD::JetContainer>
jets(
nullptr);
49 std::unique_ptr<SG::IAuxStore> auxCont(
nullptr);
52 if(
jets.get() ==
nullptr || auxCont.get() ==
nullptr) {
return StatusCode::FAILURE;}
57 #ifndef XAOD_STANDALONE
62 std::unique_ptr<xAOD::JetAuxContainer> auxCont_derived(
static_cast<xAOD::JetAuxContainer*
>(auxCont.release()));
64 #ifndef XAOD_STANDALONE
68 return StatusCode::SUCCESS;
71 std::pair<std::unique_ptr<xAOD::JetContainer>,std::unique_ptr<SG::IAuxStore> >
JetCopier::getJets()
const {
89 return std::make_pair(std::unique_ptr<xAOD::JetContainer>(
nullptr),std::unique_ptr<SG::IAuxStore>(
nullptr));
99 std::unique_ptr<xAOD::JetContainer> outjets(shallowcopy.first);
100 std::unique_ptr<xAOD::ShallowAuxContainer> shallowaux(shallowcopy.second);
105 return std::make_pair(std::move(outjets),std::move(shallowaux));
113 if(inputJetsHandle.
isValid()) {
117 return std::make_pair(std::unique_ptr<xAOD::JetContainer>(
nullptr),std::unique_ptr<SG::IAuxStore>(
nullptr));
122 std::unique_ptr<xAOD::JetContainer> goodJets = std::make_unique<xAOD::JetContainer>();
123 std::unique_ptr<xAOD::JetAuxContainer> goodJetsAux = std::make_unique<xAOD::JetAuxContainer>();
125 goodJets->setStore (goodJetsAux.get());
133 return std::make_pair(std::move(goodJets),std::move(goodJetsAux));
SG::ShallowCopyDecorDeps< xAOD::JetContainer > m_decorDeps
virtual std::pair< std::unique_ptr< xAOD::JetContainer >, std::unique_ptr< SG::IAuxStore > > DeepCopyJets() const
Class creating a shallow copy of an existing auxiliary container.
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...
Temporary container used until we have I/O for AuxStoreInternal.
Property holding a SG store/key/clid from which a WriteHandle is made.
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.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
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...
Gaudi::Property< bool > m_shallowCopy
value_type push_back(value_type pElem)
Add an element to the end of the collection.
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
SG::ReadHandleKey< xAOD::JetContainer > m_inputJets
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
bool setOriginalObjectLink(const IParticle &original, IParticle ©)
This function should be used by CP tools when they make a deep copy of an object in their correctedCo...
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Gaudi::Property< bool > m_shallowIO
Jet_v1 Jet
Definition of the current "jet version".
virtual std::pair< std::unique_ptr< xAOD::JetContainer >, std::unique_ptr< SG::IAuxStore > > ShallowCopyJets() const