1 #ifndef GAUDIKERNEL_SERVICEHANDLE_H
2 #define GAUDIKERNEL_SERVICEHANDLE_H
19 class ServiceHandleProperty;
42 ServiceHandle(
const std::string& serviceName,
const std::string& theParentName )
43 :
GaudiHandle<T>(serviceName,
"Service", theParentName)
120 const std::string& myComponentType,
const std::string& myParentName ):
132 virtual bool push_back(
const std::string& serviceTypeAndName ) {
145 inline std::ostream& operator<<( std::ostream& os, const ServiceHandle<T>& handle ) {
146 return operator<<(os, static_cast<const GaudiHandleInfo&>(handle) );
150 inline std::ostream& operator<<( std::ostream& os, const ServiceHandleArray<T>& handle ) {
151 return operator<<(os, static_cast<const GaudiHandleInfo&>(handle) );
154 #endif // ! GAUDIKERNEL_SERVICEHANDLE_H
Handle to be used in lieu of naked pointers to services.
StatusCode retrieve(T *&service) const
Release the Service.
SmartIF< ISvcLocator > m_pSvcLocator
an helper to share the implementation of service() among the various kernel base classes $Id: ...
Handle to be used in lieu of naked pointers to gaudis.
Define general base for Gaudi exception.
virtual ~ServiceHandleArray()
const std::string messageName() const
name used for printing messages
SmartIF< IMessageSvc > m_pMessageSvc
SmartIF< IMessageSvc > & messageSvc() const
const std::string & parentName() const
The name of the parent.
SmartIF< ISvcLocator > & serviceLocator() const
Do the real release of the Service.
GAUDI_API ISvcLocator * svcLocator()
bool isValid() const
Allow for check if smart pointer is valid.
This class is used for returning status codes from appropriate routines.
StatusCode retrieve() const
Retrieve the component.
Array of Handles to be used in lieu of vector of naked pointers to tools.
StatusCode retrieve() const
Retrieve the Service.
virtual bool push_back(const ServiceHandle< T > &myHandle)
virtual bool push_back(const std::string &serviceTypeAndName)
Add a handle to the array with "type/name" given in .
std::string typeAndName() const
The full type and name: "type/name".
ServiceHandle(const std::string &serviceName, const std::string &theParentName)
Create a handle ('smart pointer') to a service.
StatusCode getService(const std::string &name, bool createIf, const InterfaceID &iid, void **ppSvc) const
ServiceHandleArray(const std::vector< std::string > &myTypesAndNamesList, const std::string &myComponentType, const std::string &myParentName)
Generic constructor.
ServiceHandleArray(const std::string &myParentName)
T is the concrete handle type, e.g.