#include <IRegisterSource.h>
Inheritance diagram for IRegisterSource::

Public Methods | |
| virtual StatusCode | registerMe (IFluxSvc *)=0 |
| Pass a pointer to the service to the tool. More... | |
Static Public Methods | |
| const InterfaceID & | interfaceID () |
| Retrieve interface ID. More... | |
Example of an implementation:
include "GaudiKernel/AlgTool.h"
include "GaudiKernel/MsgStream.h"
include "GaudiKernel/ToolFactory.h"
include "FluxSvc/IRegisterSource.h"
include "FluxSvc/ISpectrumFactory.h"
include "FluxSvc/IFluxSvc.h"
// GRB includes
include "GRB/GRBSpectrum.h"
include "GRBmaker/GRBobsSpectrum.h"
class RegisterGRB : public AlgTool, virtual public IRegisterSource {
public:
RegisterGRB( const std::string& type, const std::string& name, const IInterface* parent);
virtual ~RegisterGRB() { }
/// implement to define sources: will be called from FluxSvc
StatusCode registerMe(IFluxSvc* );
};
// Static factory for instantiation of algtool objects
static ToolFactory<RegisterGRB> s_factory;
const IToolFactory& RegisterGRBFactory = s_factory;
// Standard Constructor
RegisterGRB::RegisterGRB(const std::string& type,
const std::string& name,
const IInterface* parent)
: AlgTool( type, name, parent ) {
// Declare additional interface
declareInterface<IRegisterSource>(this);
}
StatusCode RegisterGRB::registerMe(IFluxSvc* fsvc)
{
MsgStream log(msgSvc(), name());
log << MSG::INFO << "Register GRB Spectra..." << endreq;
static RemoteSpectrumFactory<GRBSpectrum> factory(fsvc);
log << MSG::INFO << "Register Sandhia GRB Spectra..." << endreq;
static RemoteSpectrumFactory<GRBobsSpectrum> factory2(fsvc);
return StatusCode::SUCCESS;
}
*
Definition at line 76 of file IRegisterSource.h.
|
|
Retrieve interface ID.
Definition at line 79 of file IRegisterSource.h. Referenced by FluxSvc::initialize().
00079 { return IID_IRegisterSource; }
|
|
|
Pass a pointer to the service to the tool.
Reimplemented in RegisterTest. |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001