Helper class to be used in conjunction with the recursive tool visitor to renounce certain inputs.
More...
#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/RenounceToolInputsVisitor.h>
|
struct | ILogger |
| Helper class interface to optionally log renounce operations. More...
|
|
class | Logger |
|
struct | NoLogger |
| A do-nothing helper class which implements the logger interface. More...
|
|
|
static Logger | createLogger (std::function< void(std::string_view, std::string_view)> func) |
| Create a logger from a function.
|
|
Helper class to be used in conjunction with the recursive tool visitor to renounce certain inputs.
Definition at line 27 of file RenounceToolInputsVisitor.h.
◆ RenounceToolInputsVisitor()
RenounceToolInputsVisitor::RenounceToolInputsVisitor |
( |
std::vector< DataObjID > | input_keys, |
|
|
ILogger & | logger = s_noLogger ) |
|
inline |
construct the renounce visitor helper object
- Parameters
-
input_keys | a list of input keys to be renounced. @parame logger optional helper object to log inputs which are renounced. By default this renounce visitor will renounce inputs with keys found in the inputs_names list, and it operates silently. |
Definition at line 68 of file RenounceToolInputsVisitor.h.
◆ createLogger()
static Logger RenounceToolInputsVisitor::createLogger |
( |
std::function< void(std::string_view, std::string_view)> | func | ) |
|
|
inlinestatic |
Create a logger from a function.
usage:
* auto logger=RenounceToolInputsVisitor::createLogger( [this]( std::string_view tool_name, std::string_view key )
* { this->msg(MSG::INFO) << " Renounce " << tool_name << " . " << key << endmsg;
* });
*
Definition at line 58 of file RenounceToolInputsVisitor.h.
58 {
59 return Logger{ std::move( func ) };
60 }
◆ operator()()
void RenounceToolInputsVisitor::operator() |
( |
IAlgTool * | alg_tool | ) |
|
Definition at line 15 of file RenounceToolInputsVisitor.cpp.
15 {
16 IDataHandleHolder* dh_holder = dynamic_cast<IDataHandleHolder*>( alg_tool );
17 if ( dh_holder ) {
20 }
21 }
22}
virtual bool renounceInput(const DataObjID &)=0
virtual const std::string & name() const =0
Retrieve the name of the instance.
◆ m_logger
ILogger* RenounceToolInputsVisitor::m_logger |
|
private |
◆ m_renounceKeys
std::vector<DataObjID> RenounceToolInputsVisitor::m_renounceKeys |
|
private |
◆ USAGE_IS_THREAD_SAFE
NoLogger s_noLogger RenounceToolInputsVisitor::USAGE_IS_THREAD_SAFE |
|
staticprivate |
The documentation for this class was generated from the following files: