ATLAS Offline Software
Loading...
Searching...
No Matches
CloneTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ATHENAKERNEL_CLONETOOL_H
6#define ATHENAKERNEL_CLONETOOL_H
7#include "GaudiKernel/StatusCode.h"
8#include <string>
9class InterfaceID;
10class IAlgTool;
11namespace CloneTool {
13 StatusCode typeless_clone(const IAlgTool& cloned,
14 const std::string& cloneName,
15 const InterfaceID& cloneID,
16 IAlgTool*& result);
17
19 template <class CLONEDTOOL>
20 StatusCode clone(const CLONEDTOOL& cloned,
21 const std::string& cloneName,
22 CLONEDTOOL*& result) {
23 return typeless_clone(cloned, cloneName, CLONEDTOOL::interfaceID(),
24 static_cast<IAlgTool*&>(result));
25 }
26}
27#endif
StatusCode typeless_clone(const IAlgTool &cloned, const std::string &cloneName, const InterfaceID &cloneID, IAlgTool *&result)
implementation, experts only
Definition CloneTool.cxx:16
StatusCode clone(const CLONEDTOOL &cloned, const std::string &cloneName, CLONEDTOOL *&result)
given a reference to a cloned AlgTool sets a reference to its clone
Definition CloneTool.h:20