00001 00002 #include "GaudiKernel/AlgTool.h" 00003 #include "GaudiKernel/MsgStream.h" 00004 #include "GaudiKernel/ToolFactory.h" 00005 00006 #include "FluxSvc/IRegisterSource.h" 00007 #include "FluxSvc/ISpectrumFactory.h" 00008 #include "FluxSvc/IFluxSvc.h" 00009 00010 class RegisterTest : public AlgTool, virtual public IRegisterSource { 00011 public: 00012 00013 RegisterTest( const std::string& type, const std::string& name, const IInterface* parent); 00014 virtual ~RegisterTest() { } 00015 00017 StatusCode registerMe(IFluxSvc* ); 00018 00019 }; 00020 00021 00022 // Static factory for instantiation of algtool objects 00023 static ToolFactory<RegisterTest> s_factory; 00024 const IToolFactory& RegisterTestFactory = s_factory; 00025 00026 // Standard Constructor 00027 RegisterTest::RegisterTest(const std::string& type, 00028 const std::string& name, 00029 const IInterface* parent) 00030 : AlgTool( type, name, parent ) { 00031 00032 // Declare additional interface 00033 declareInterface<IRegisterSource>(this); 00034 00035 } 00036 00037 00038 StatusCode RegisterTest::registerMe(IFluxSvc* fsvc) 00039 { 00040 MsgStream log(msgSvc(), name()); 00041 log << MSG::INFO << "Register test called..." << endreq; 00042 /* the following is an example 00043 static RemoteSpectrumFactory<GRBSpectrum> factory(fsvc); 00044 */ 00045 return StatusCode::SUCCESS; 00046 }
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001