ATLAS Offline Software
AraAlgToolWrapper.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "AraTool/AraToolBase.h"
6 
7 /////////////////////////////////////////////////////////////////////////////
8 
9 template< class T >
10 AraAlgToolWrapper< T >::AraAlgToolWrapper( const std::string& type, const std::string& name,
11  const IInterface* parent )
12  : AthAlgTool( type, name, parent ),
13  m_log( msgSvc(), name ),
14  m_factor(0)
15 {
16  AlgTool* a = this;
17  m_ptool=new T(a);
18 }
19 
20 //___________________________________________________________________________
21 template< class T >
22 StatusCode AraAlgToolWrapper< T >::queryInterface( const InterfaceID& riid, void** ppvIf )
23 {
24  if ( riid == IAraAlgTool::interfaceID() ) {
25  *ppvIf = (IAraAlgTool*)this;
26  addRef();
27  return StatusCode::SUCCESS;
28  }
29 
30  return AthAlgTool::queryInterface( riid, ppvIf );
31 }
32 
33 //___________________________________________________________________________
34 template< class T>
35 StatusCode AraAlgToolWrapper< T >::initialize()
36 {
37 
38  m_log.setLevel( msgLevel() );
39  StatusCode sc=m_ptool->initialize();
40 
41  return sc;
42 }
43 
44 //___________________________________________________________________________
45 template< class T >
46 StatusCode AraAlgToolWrapper< T >::finalize()
47 {
48 
49 // perform work done at shutdown
50  StatusCode sc=m_ptool->finalize();
51  return sc;
52 }
53 
54