|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef ASG_TOOLS__STANDALONE_TOOL_HANDLE_H
9 #define ASG_TOOLS__STANDALONE_TOOL_HANDLE_H
66 const T *
get ()
const {
82 const ToolHandle<std::remove_const_t<T>>&
getHandle ();
104 template<
typename T2>
109 const std::string& toolType) {
149 if (m_pointer ==
nullptr)
152 return StatusCode::SUCCESS;
160 checkNotInitialized ();
161 if (m_config.makeTool (m_toolHandle, m_cleanup,
true).isFailure())
162 return StatusCode::FAILURE;
163 m_pointer = &*m_toolHandle;
164 return StatusCode::SUCCESS;
172 checkIsInitialized ();
182 throw std::logic_error (
"trying to configure StandaloneToolHandle after it was initialized/retrieved");
190 if (m_pointer ==
nullptr)
191 throw std::logic_error (
"trying to use StandaloneToolHandle that was never initialized/retrieved");
196 template <
typename T>
199 return str <<
"StandaloneToolHandle:" <<
obj.typeAndName();
std::ostream & operator<<(std::ostream &str, const AnaToolHandle< T > &obj)
standard output operator
::StatusCode StatusCode
StatusCode definition for legacy code.
void setTypeAndName(const std::string &val_typeAndName)
set type and name at the same time
StatusCode setProperty(const std::string &name, const T &value)
set the given property
std::string typeAndName() const
get type and name at the same time
const std::string & name() const noexcept
the name of the component
StatusCode createPrivateTool(const std::string &name, const std::string &toolType)
create a private tool of the given name and type