ATLAS Offline Software
Loading...
Searching...
No Matches
RenameHitCollectionsAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8ISF::RenameHitCollectionsAlg::RenameHitCollectionsAlg( const std::string& name, ISvcLocator* pSvcLocator ) :
9 ::AthReentrantAlgorithm( name, pSvcLocator )
10{
11}
12
13
16{
23
31
37
44
48
52
59
67
73
80
84
88
89 return StatusCode::SUCCESS;
90}
91
92
94StatusCode ISF::RenameHitCollectionsAlg::execute(const EventContext &ctx) const
95{
97 if (!inputMcEventCollection.isValid()) {
98 ATH_MSG_ERROR("Could not find input McEventCollection called " << inputMcEventCollection.name() << " in store " << inputMcEventCollection.store() << ".");
99 return StatusCode::FAILURE;
100 }
102 ATH_CHECK(outputMcEventCollection.record(std::make_unique<McEventCollection>(*inputMcEventCollection)));
103 if (!outputMcEventCollection.isValid()) {
104 ATH_MSG_ERROR("Could not record output McEventCollection called " << outputMcEventCollection.name() << " in store " << outputMcEventCollection.store() << ".");
105 return StatusCode::FAILURE;
106 }
107
113
121
127
134
138
142
143
144
145 return StatusCode::SUCCESS;
146}
147
148
151 if ( varHandleKey.key().empty() )
152 return StatusCode::SUCCESS;
153
154 return varHandleKey.initialize();
155}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteHandleKey< CSCSimHitCollection > m_outputCSCHits
SG::WriteHandleKey< CaloCalibrationHitContainer > m_outputTileActiveCalibHits
SG::ReadHandleKey< MDTSimHitCollection > m_inputMDTHits
SG::WriteHandleKey< CaloCalibrationHitContainer > m_outputTileDeadCalibHits
SG::WriteHandleKey< SiHitCollection > m_outputSCTHits
SG::WriteHandleKey< TrackRecordCollection > m_outputMuonEntryLayer
SG::WriteHandleKey< CaloCalibrationHitContainer > m_outputTileInactiveCalibHits
SG::ReadHandleKey< TrackRecordCollection > m_inputMuonExitLayer
SG::ReadHandleKey< SiHitCollection > m_inputITkStripHits
SG::ReadHandleKey< CaloCalibrationHitContainer > m_inputTileActiveCalibHits
SG::ReadHandleKey< SiHitCollection > m_inputITkPixelHits
SG::WriteHandleKey< LArHitContainer > m_outputLArFCALHits
virtual StatusCode initialize() override final
Athena algorithm's interface methods.
RenameHitCollectionsAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::ReadHandleKey< CaloCalibrationHitContainer > m_inputTileInactiveCalibHits
SG::WriteHandleKey< TGCSimHitCollection > m_outputTGCHits
SG::WriteHandleKey< SiHitCollection > m_outputBLMHits
SG::WriteHandleKey< SiHitCollection > m_outputITkStripHits
SG::ReadHandleKey< CaloCalibrationHitContainer > m_inputTileDeadCalibHits
SG::ReadHandleKey< TRTUncompressedHitCollection > m_inputTRTUncompressedHits
SG::WriteHandleKey< TileHitVector > m_outputMBTSHits
SG::WriteHandleKey< MMSimHitCollection > m_outputMMHits
SG::ReadHandleKey< LArHitContainer > m_inputLArEMECHits
SG::ReadHandleKey< SiHitCollection > m_inputPixelHits
SG::WriteHandleKey< TrackRecordCollection > m_outputCaloEntryLayer
SG::ReadHandleKey< sTGCSimHitCollection > m_inputsTGCHits
SG::ReadHandleKey< TrackRecordCollection > m_inputCaloEntryLayer
SG::ReadHandleKey< RPCSimHitCollection > m_inputRPCHits
SG::ReadHandleKey< TrackRecordCollection > m_inputMuonEntryLayer
SG::WriteHandleKey< SiHitCollection > m_outputPixelHits
SG::WriteHandleKey< RPCSimHitCollection > m_outputRPCHits
SG::WriteHandleKey< McEventCollection > m_outputMcEventCollection
Output collection WriteHandleKeys.
SG::ReadHandleKey< TileHitVector > m_inputTileHits
SG::ReadHandleKey< CaloCalibrationHitContainer > m_inputLArDeadCalibHits
SG::WriteHandleKey< CaloCalibrationHitContainer > m_outputLArActiveCalibHits
SG::ReadHandleKey< TileHitVector > m_inputMBTSHits
SG::WriteHandleKey< LArHitContainer > m_outputLArEMECHits
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollection
Input collection ReadHandleKeys.
virtual StatusCode execute(const EventContext &ctx) const override final
Athena Algorithm execute.
SG::ReadHandleKey< CSCSimHitCollection > m_inputCSCHits
SG::WriteHandleKey< CaloCalibrationHitContainer > m_outputLArInactiveCalibHits
SG::ReadHandleKey< SiHitCollection > m_inputSCTHits
SG::ReadHandleKey< MMSimHitCollection > m_inputMMHits
SG::ReadHandleKey< TGCSimHitCollection > m_inputTGCHits
SG::WriteHandleKey< TRTUncompressedHitCollection > m_outputTRTUncompressedHits
SG::ReadHandleKey< SiHitCollection > m_inputBLMHits
SG::WriteHandleKey< TileHitVector > m_outputTileHits
SG::ReadHandleKey< CaloCalibrationHitContainer > m_inputLArInactiveCalibHits
SG::WriteHandleKey< sTGCSimHitCollection > m_outputsTGCHits
SG::WriteHandleKey< LArHitContainer > m_outputLArHECHits
SG::ReadHandleKey< SiHitCollection > m_inputBCMHits
StatusCode initializeVarHandleKey(SG::VarHandleKey &varHandleKey) const
Initialize the given VarHandleKey.
SG::WriteHandleKey< LArHitContainer > m_outputLArEMBHits
SG::ReadHandleKey< LArHitContainer > m_inputLArHECHits
SG::WriteHandleKey< CaloCalibrationHitContainer > m_outputLArDeadCalibHits
SG::ReadHandleKey< LArHitContainer > m_inputLArEMBHits
StatusCode copyCollections(const SG::ReadHandleKey< T > &inputReadHandleKeys, const SG::WriteHandleKey< T > &outputWriteHandleKey, const EventContext &ctx) const
Merge all hits of inputReadHandleKeys's collections into outputWriteHandleKey.
SG::ReadHandleKey< CaloCalibrationHitContainer > m_inputLArActiveCalibHits
SG::ReadHandleKey< LArHitContainer > m_inputLArFCALHits
SG::WriteHandleKey< SiHitCollection > m_outputBCMHits
SG::ReadHandleKey< SiHitCollection > m_inputHGTDHits
SG::WriteHandleKey< MDTSimHitCollection > m_outputMDTHits
SG::WriteHandleKey< SiHitCollection > m_outputHGTDHits
SG::WriteHandleKey< TrackRecordCollection > m_outputMuonExitLayer
SG::WriteHandleKey< SiHitCollection > m_outputITkPixelHits
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::string store() const
Return the name of the store holding the object we are proxying.
const std::string & name() const
Return the StoreGate ID for the referenced object.
A property holding a SG store/key/clid from which a VarHandle is made.
const std::string & key() const
Return the StoreGate ID for the referenced object.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual bool isValid() override final
Can the handle be successfully dereferenced?