![]() |
|
|
Generated: 8 Jan 2009 |
00001 // $Id: AlgDecorators.cpp,v 1.2 2005/11/08 16:31:03 mato Exp $ 00002 // ============================================================================ 00003 // Include files 00004 // ============================================================================ 00005 // GaudiKernel 00006 // ============================================================================ 00007 #include "GaudiKernel/IAlgTool.h" 00008 #include "GaudiKernel/IInterface.h" 00009 // ============================================================================ 00010 // GaudiAlg 00011 // ============================================================================ 00012 #include "GaudiAlg/GaudiAlgorithm.h" 00013 // ============================================================================ 00014 // GaudiPython 00015 // ============================================================================ 00016 #include "GaudiPython/AlgDecorators.h" 00017 // ============================================================================ 00018 00025 // ============================================================================ 00034 // ============================================================================ 00035 IAlgTool* GaudiPython::AlgDecorator::tool_ 00036 ( const GaudiAlgorithm* alg , 00037 const std::string& type , 00038 const std::string& name , 00039 const IInterface* parent , 00040 const bool create ) 00041 { 00042 if ( 0 == alg ) { return 0 ; } 00043 return alg -> tool<IAlgTool> ( type , name , parent , create ) ; 00044 }; 00045 // ============================================================================ 00046 00047 // ============================================================================ 00055 // ============================================================================ 00056 IAlgTool* GaudiPython::AlgDecorator::tool_ 00057 ( const GaudiAlgorithm* alg , 00058 const std::string& typeAndName , 00059 const IInterface* parent , 00060 const bool create ) 00061 { 00062 if ( 0 == alg ) { return 0 ; } 00063 return alg->tool<IAlgTool>( typeAndName , parent , create ) ; 00064 }; 00065 // ============================================================================ 00066 00067 // ============================================================================ 00074 // ============================================================================ 00075 IInterface* GaudiPython::AlgDecorator::svc_ 00076 ( const GaudiAlgorithm* alg , 00077 const std::string& name , 00078 const bool create ) 00079 { 00080 if ( 0 == alg ) { return 0 ; } 00081 return alg -> svc<IInterface> ( name , create ) ; 00082 }; 00083 // ============================================================================