#include <IRegisterSource.h>
Public Member Functions | |
| virtual StatusCode | registerMe (IFluxSvc *)=0 |
| Pass a pointer to the service to the tool. | |
Static Public Member Functions | |
| const InterfaceID & | interfaceID () |
| Retrieve interface ID. | |
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 79 of file IRegisterSource.h.
Member Function Documentation
|
|
Retrieve interface ID.
Definition at line 82 of file IRegisterSource.h. Referenced by FluxSvc::initialize().
00082 { return IID_IRegisterSource; }
|
|
|
Pass a pointer to the service to the tool.
Referenced by FluxSvc::initialize(). |
1.3.3