The Gaudi Framework  master (37c0b60a)
RenounceToolInputsVisitor.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #include <GaudiKernel/IAlgTool.h>
14 
16  IDataHandleHolder* dh_holder = dynamic_cast<IDataHandleHolder*>( alg_tool );
17  if ( dh_holder ) {
18  for ( const DataObjID& id : m_renounceKeys ) {
19  if ( dh_holder->renounceInput( id ) ) { m_logger->renounce( alg_tool->name(), id.key() ); }
20  }
21  }
22 }
IDataHandleHolder
Definition: IDataHandleHolder.h:24
RenounceToolInputsVisitor::m_renounceKeys
std::vector< DataObjID > m_renounceKeys
Definition: RenounceToolInputsVisitor.h:77
RenounceToolInputsVisitor::m_logger
ILogger * m_logger
Definition: RenounceToolInputsVisitor.h:78
IAlgTool
Definition: IAlgTool.h:33
RenounceToolInputsVisitor::ILogger::renounce
virtual void renounce(std::string_view tool_name, std::string_view key)=0
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
RenounceToolInputsVisitor.h
IAlgTool.h
DataObjID
Definition: DataObjID.h:47
IDataHandleHolder::renounceInput
virtual bool renounceInput(const DataObjID &)=0
IDataHandleHolder.h
RenounceToolInputsVisitor::operator()
void operator()(IAlgTool *)
Definition: RenounceToolInputsVisitor.cpp:15