19 return StatusCode::SUCCESS;
31 if (!selHandle(*muon)) {
34 for (
unsigned int s =0; s < muon->nMuonSegments(); ++s){
36 if (seg->
container() != decorHandle.cptr()) {
38 return StatusCode::FAILURE;
40 decorHandle(*seg)= selHandle(*muon);
43 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading a decoration on an object.
Handle class for reading from StoreGate.
Handle class for adding a decoration to an object.
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_writeMarkKey
Key to the decoration.
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_readMarkKey
Key to the decoration to fetch the marked muons.
virtual StatusCode initialize() override final
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
Key to the primary muon container to select the muon from.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segKey
Key to the segment container to fetch the marked segments.
virtual StatusCode execute(const EventContext &ctx) const override final
const SG::AuxVectorData * container() const
Return the container holding this element.
Handle class for reading a decoration on an object.
SG::WriteDecorHandle< ContType, dType > makeHandle(const EventContext &ctx, const SG::WriteDecorHandleKey< ContType > &key, const dType &defValue=dType{})
This header ties the generic definitions in this package.
std::string decorKeyFromKey(const std::string &key, const std::string &deflt)
Extract the decoration part of key.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Muon_v1 Muon
Reference the current persistent version:
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
MuonSegment_v1 MuonSegment
Reference the current persistent version: