| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

ConversionSvc Class Reference

Base class for all conversion services. More...

#include <GaudiKernel/ConversionSvc.h>

Inheritance diagram for ConversionSvc:

[legend]
Collaboration diagram for ConversionSvc:
[legend]
List of all members.

Public Types

typedef std::vector< WorkerEntryWorkers
 SUCCESS = 1
 Normal successful completion.
 NO_INTERFACE
 Requested interface is not available.
 VERSMISMATCH
 Requested interface version is incompatible.
 LAST_ERROR
 Last error.
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 CONVERSIONSVC_NO_ERROR = ICONVERSIONSVC_LAST_ERROR+1
 Success.
 NO_CONVERTER
 No proper converter is availible to the service.
enum  Status { CONVERSIONSVC_NO_ERROR = ICONVERSIONSVC_LAST_ERROR+1, NO_CONVERTER }
 Status code definitions. More...
 INVALID_ADDRESS = IInterface::LAST_ERROR+1
 Invalid address information.
 INVALID_OBJECT
 Object to be converted is invalid.
 NO_MEMORY
 No more memory availible.
 BAD_STORAGE_TYPE
 Invalid storage type.
 NO_SOURCE_OBJECT
 Error retrieving source data from source store.
 ICONVERSIONSVC_LAST_ERROR
 Last entry.

Public Member Functions

virtual StatusCode initialize ()
 Initialize the service.
virtual StatusCode finalize ()
 stop the service.
virtual long repSvcType () const
 Retrieve the class type of the data store the converter uses.
const CLIDobjType () const
 Implementation of IConverter: dummy call.
virtual StatusCode setDataProvider (IDataProviderSvc *pService)
 Implementation of IConverter: Set Data provider service.
virtual IDataProviderSvcdataProvider () const
 Implementation of IConverter: Get Data provider service.
virtual StatusCode setConversionSvc (IConversionSvc *svc)
 Implementation of IConverter: Set conversion service the converter is connected to.
virtual IConversionSvcconversionSvc () const
 Implementation of IConverter: Get conversion service the converter is connected to.
virtual StatusCode setAddressCreator (IAddressCreator *creator)
 Set address creator facility.
virtual IAddressCreatoraddressCreator () const
 Retrieve address creator facility.
virtual StatusCode createObj (IOpaqueAddress *pAddress, DataObject *&refpObject)
 Implementation of IConverter: Create the transient representation of an object.
virtual StatusCode fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Implementation of IConverter: Resolve the references of the created transient object.
virtual StatusCode updateObj (IOpaqueAddress *pAddress, DataObject *refpObject)
 Implementation of IConverter: Update the transient object from the other representation.
virtual StatusCode updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Implementation of IConverter: Update the references of an updated transient object.
virtual StatusCode createRep (DataObject *pObject, IOpaqueAddress *&refpAddress)
 Implementation of IConverter: Convert the transient object to the requested representation.
virtual StatusCode fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Implementation of IConverter: Resolve the references of the converted object.
virtual StatusCode updateRep (IOpaqueAddress *pAddress, DataObject *pObject)
 Implementation of IConverter: Update the converted representation of a transient object.
virtual StatusCode updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Implementation of IConverter: Update the references of an already converted object.
virtual StatusCode addConverter (const CLID &clid)
 Add converter object to conversion service.
virtual StatusCode addConverter (IConverter *pConverter)
 Add converter object to conversion service.
virtual StatusCode removeConverter (const CLID &clid)
 Remove converter object from conversion service (if present).
virtual IConverterconverter (const CLID &wanted)
 Retrieve converter from list.
virtual StatusCode connectOutput (const std::string &outputFile, const std::string &openMode)
 Connect the output file to the service with open mode.
virtual StatusCode connectOutput (const std::string &output)
 Connect the output file to the service.
virtual StatusCode commitOutput (const std::string &output, bool do_commit)
 Commit pending output.
virtual StatusCode createAddress (long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
 Create a Generic address using explicit arguments to identify a single object.
virtual StatusCode convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress)
 Convert an address to string form.
virtual StatusCode createAddress (long svc_type, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress)
 Convert an address in string form to object form.
virtual StatusCode updateServiceState (IOpaqueAddress *pAddress)
 Update state of the service.
 ConversionSvc (const std::string &name, ISvcLocator *svc, long type)
 Standard Constructor.
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 Query interface.
virtual unsigned long addRef ()
 Reference Interface instance.
virtual unsigned long release ()
 Release Interface instance.
virtual const std::string & name () const
 Retrieve name of the service.
virtual const InterfaceIDtype () const
 Retrieve ID of the Service.
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED).
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING).
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED).
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE).
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state.
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us.
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED).
virtual StatusCode sysInitialize ()
 Initilize Service.
virtual StatusCode sysStart ()
 Initilize Service.
virtual StatusCode sysStop ()
 Initilize Service.
virtual StatusCode sysFinalize ()
 Finalize Service.
virtual StatusCode sysReinitialize ()
 Re-initialize the Service.
virtual StatusCode sysRestart ()
 Re-initialize the Service.
virtual StatusCode setProperty (const Property &p)
 Set the property by property.
virtual StatusCode setProperty (const std::string &s)
 Set the property by string.
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string.
template<class TYPE>
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
virtual StatusCode getProperty (Property *p) const
 Get the property by property.
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name.
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string.
virtual const std::vector<
Property * > & 
getProperties () const
 Get list of properties.
ISvcLocatorserviceLocator () const
 Retrieve pointer to service locator.
IMessageSvcmsgSvc ()
 Retrieve pointer to message service.
IMessageSvcmsgSvc () const
IMessageSvcmessageService ()
IMessageSvcmessageService () const
StatusCode setProperties ()
 Method for setting declared properties to the values specifed for the job.
template<class T>
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist.
template<class T>
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist.
template<class T>
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties.
IAuditorSvcauditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked.

Static Public Member Functions

static const InterfaceIDinterfaceID ()
 Retrieve interface ID.
static const InterfaceIDinterfaceID ()
 Retrieve interface ID.
static const InterfaceIDinterfaceID ()
 Retrieve interface ID.
static const InterfaceIDinterfaceID ()
 Retrieve interface ID.
static const InterfaceIDinterfaceID ()
 Retrieve interface ID.

Protected Member Functions

virtual ~ConversionSvc ()
 Standard Destructor.
virtual IConvertercreateConverter (long typ, const CLID &clid, const ICnvFactory *fac)
 Create new Converter using factory.
virtual StatusCode configureConverter (long typ, const CLID &clid, IConverter *cnv)
 Configure the new converter before initialize is called.
virtual StatusCode initializeConverter (long typ, const CLID &clid, IConverter *cnv)
 Initialize the new converter.
virtual StatusCode activateConverter (long typ, const CLID &clid, IConverter *cnv)
 Activate the new converter after initialization.
virtual void loadConverter (DataObject *pObject)
 Load converter or dictionary needed by the converter.
virtual IAddressCreatoraddressCreator ()
 Retrieve address creation interface.
StatusCode makeCall (int typ, bool ignore_add, bool ignore_obj, bool update, IOpaqueAddress *&pAddress, DataObject *&pObject)
int outputLevel () const
 get the Service's output level

Protected Attributes

IDataProviderSvcm_dataSvc
 Pointer to data provider service.
IAddressCreatorm_addressCreator
 Pointer to the address creation service interface.
long m_type
 Conversion service type.
Workersm_workers
 List of conversion workers.
IntegerProperty m_outputLevel
 Service output level.
Gaudi::StateMachine::State m_state
 Service state.
Gaudi::StateMachine::State m_targetState
 Service state.
IMessageSvcm_messageSvc
 MessageSvc reference.

Friends

class ServiceManager

Classes

class  CnvTest
class  WorkerEntry

Detailed Description

Base class for all conversion services.

It manages a set of Converters that are specialized for conversions of specific objects.

This supports self learning converters: User hooks include the following (overridable) entries:

configureConverter and activateConverter are user hooks, where the convetrer can be manipulated by the hosting service and knowledge can be supplied, which a "generic" converter cannot aquire itself.

These hooks allow any sub-classed conversion service to override the calls and create converters, which aquire the knowledge about their persistency type and the object type they convert during the initialization.

Only AFTER these three steps the converter must satisfy the storage type of the hosting service and the class type of the required object type.

Author:
Markus Frank
Version:
1.0

Definition at line 46 of file ConversionSvc.h.


Member Typedef Documentation

typedef std::vector<WorkerEntry> ConversionSvc::Workers

Definition at line 76 of file ConversionSvc.h.


Member Enumeration Documentation

enum IInterface::Status [inherited]

Return status.

Enumerator:
SUCCESS  Normal successful completion.
NO_INTERFACE  Requested interface is not available.
VERSMISMATCH  Requested interface version is incompatible.
LAST_ERROR  Last error.

Reimplemented in IConversionSvc, IConverter, and IDataProviderSvc.

Definition at line 113 of file IInterface.h.

00113                 {
00115     SUCCESS = 1,
00117     NO_INTERFACE,
00119     VERSMISMATCH,
00121     LAST_ERROR
00122   };

enum IConversionSvc::Status [inherited]

Status code definitions.

Enumerator:
CONVERSIONSVC_NO_ERROR  Success.
NO_CONVERTER  No proper converter is availible to the service.

Reimplemented from IConverter.

Definition at line 99 of file IConversionSvc.h.


Constructor & Destructor Documentation

ConversionSvc::ConversionSvc ( const std::string &  name,
ISvcLocator svc,
long  type 
)

Standard Constructor.

virtual ConversionSvc::~ConversionSvc (  )  [protected, virtual]

Standard Destructor.


Member Function Documentation

virtual StatusCode ConversionSvc::initialize (  )  [virtual]

Initialize the service.

Reimplemented from Service.

virtual StatusCode ConversionSvc::finalize (  )  [virtual]

stop the service.

Reimplemented from Service.

virtual long ConversionSvc::repSvcType (  )  const [virtual]

Retrieve the class type of the data store the converter uses.

Implements IConverter.

const CLID& ConversionSvc::objType (  )  const [virtual]

Implementation of IConverter: dummy call.

Implements IConverter.

virtual StatusCode ConversionSvc::setDataProvider ( IDataProviderSvc pService  )  [virtual]

Implementation of IConverter: Set Data provider service.

Returns:
Status code indicating success or failure
Parameters:
pService Pointer to data provider service

Implements IConverter.

virtual IDataProviderSvc* ConversionSvc::dataProvider (  )  const [virtual]

Implementation of IConverter: Get Data provider service.

Returns:
Pointer to data provider service

Implements IConverter.

virtual StatusCode ConversionSvc::setConversionSvc ( IConversionSvc svc  )  [virtual]

Implementation of IConverter: Set conversion service the converter is connected to.

Implements IConverter.

virtual IConversionSvc* ConversionSvc::conversionSvc (  )  const [virtual]

Implementation of IConverter: Get conversion service the converter is connected to.

Implements IConverter.

virtual StatusCode ConversionSvc::setAddressCreator ( IAddressCreator creator  )  [virtual]

Set address creator facility.

Implements IConverter.

virtual IAddressCreator* ConversionSvc::addressCreator (  )  const [virtual]

Retrieve address creator facility.

Implements IConverter.

virtual StatusCode ConversionSvc::createObj ( IOpaqueAddress pAddress,
DataObject *&  refpObject 
) [virtual]

Implementation of IConverter: Create the transient representation of an object.

Implements IConverter.

virtual StatusCode ConversionSvc::fillObjRefs ( IOpaqueAddress pAddress,
DataObject pObject 
) [virtual]

Implementation of IConverter: Resolve the references of the created transient object.

Implements IConverter.

virtual StatusCode ConversionSvc::updateObj ( IOpaqueAddress pAddress,
DataObject refpObject 
) [virtual]

Implementation of IConverter: Update the transient object from the other representation.

Implements IConverter.

virtual StatusCode ConversionSvc::updateObjRefs ( IOpaqueAddress pAddress,
DataObject pObject 
) [virtual]

Implementation of IConverter: Update the references of an updated transient object.

Implements IConverter.

virtual StatusCode ConversionSvc::createRep ( DataObject pObject,
IOpaqueAddress *&  refpAddress 
) [virtual]

Implementation of IConverter: Convert the transient object to the requested representation.

Implements IConverter.

virtual StatusCode ConversionSvc::fillRepRefs ( IOpaqueAddress pAddress,
DataObject pObject 
) [virtual]

Implementation of IConverter: Resolve the references of the converted object.

Implements IConverter.

virtual StatusCode ConversionSvc::updateRep ( IOpaqueAddress pAddress,
DataObject pObject 
) [virtual]

Implementation of IConverter: Update the converted representation of a transient object.

Implements IConverter.

virtual StatusCode ConversionSvc::updateRepRefs ( IOpaqueAddress pAddress,
DataObject pObject 
) [virtual]

Implementation of IConverter: Update the references of an already converted object.

Implements IConverter.

virtual StatusCode ConversionSvc::addConverter ( const CLID clid  )  [virtual]

Add converter object to conversion service.

Implements IConversionSvc.

virtual StatusCode ConversionSvc::addConverter ( IConverter pConverter  )  [virtual]

Add converter object to conversion service.

Implements IConversionSvc.

virtual StatusCode ConversionSvc::removeConverter ( const CLID clid  )  [virtual]

Remove converter object from conversion service (if present).

Implements IConversionSvc.

virtual IConverter* ConversionSvc::converter ( const CLID wanted  )  [virtual]

Retrieve converter from list.

Implements IConversionSvc.

virtual StatusCode ConversionSvc::connectOutput ( const std::string &  outputFile,
const std::string &  openMode 
) [virtual]

Connect the output file to the service with open mode.

Implements IConversionSvc.

virtual StatusCode ConversionSvc::connectOutput ( const std::string &  output  )  [virtual]

Connect the output file to the service.

Implements IConversionSvc.

virtual StatusCode ConversionSvc::commitOutput ( const std::string &  output,
bool  do_commit 
) [virtual]

Commit pending output.

Implements IConversionSvc.

virtual StatusCode ConversionSvc::createAddress ( long  svc_type,
const CLID clid,
const std::string *  par,
const unsigned long *  ip,
IOpaqueAddress *&  refpAddress 
) [virtual]

Create a Generic address using explicit arguments to identify a single object.

Implements IAddressCreator.

virtual StatusCode ConversionSvc::convertAddress ( const IOpaqueAddress pAddress,
std::string &  refAddress 
) [virtual]

Convert an address to string form.

Implements IAddressCreator.

virtual StatusCode ConversionSvc::createAddress ( long  svc_type,
const CLID clid,
const std::string &  refAddress,
IOpaqueAddress *&  refpAddress 
) [virtual]

Convert an address in string form to object form.

Implements IAddressCreator.

virtual StatusCode ConversionSvc::updateServiceState ( IOpaqueAddress pAddress  )  [virtual]

Update state of the service.

virtual StatusCode ConversionSvc::queryInterface ( const InterfaceID riid,
void **  ppvInterface 
) [virtual]

Query interface.

Reimplemented from Service.

virtual IConverter* ConversionSvc::createConverter ( long  typ,
const CLID clid,
const ICnvFactory *  fac 
) [protected, virtual]

Create new Converter using factory.

virtual StatusCode ConversionSvc::configureConverter ( long  typ,
const CLID clid,
IConverter cnv 
) [protected, virtual]

Configure the new converter before initialize is called.

virtual StatusCode ConversionSvc::initializeConverter ( long  typ,
const CLID clid,
IConverter cnv 
) [protected, virtual]

Initialize the new converter.

virtual StatusCode ConversionSvc::activateConverter ( long  typ,
const CLID clid,
IConverter cnv 
) [protected, virtual]

Activate the new converter after initialization.

virtual void ConversionSvc::loadConverter ( DataObject pObject  )  [protected, virtual]

Load converter or dictionary needed by the converter.

virtual IAddressCreator* ConversionSvc::addressCreator (  )  [inline, protected, virtual]

Retrieve address creation interface.

Definition at line 220 of file ConversionSvc.h.

00220                                               {
00221     return m_addressCreator;
00222   }

StatusCode ConversionSvc::makeCall ( int  typ,
bool  ignore_add,
bool  ignore_obj,
bool  update,
IOpaqueAddress *&  pAddress,
DataObject *&  pObject 
) [protected]

virtual unsigned long Service::addRef (  )  [virtual, inherited]

Reference Interface instance.

Implements IInterface.

virtual unsigned long Service::release (  )  [virtual, inherited]

Release Interface instance.

Implements IInterface.

virtual const std::string& Service::name (  )  const [virtual, inherited]

Retrieve name of the service.

Implements INamedInterface.

virtual const InterfaceID& Service::type (  )  const [virtual, inherited]

Retrieve ID of the Service.

Implements IService.

virtual StatusCode Service::configure (  )  [inline, virtual, inherited]

Configuration (from OFFLINE to CONFIGURED).

Implements IService.

Definition at line 53 of file Service.h.

00053 { return StatusCode::SUCCESS; }

virtual StatusCode Service::start (  )  [virtual, inherited]

Start (from INITIALIZED to RUNNING).

Implements IService.

Reimplemented in MinimalEventLoopMgr.

virtual StatusCode Service::stop (  )  [virtual, inherited]

Stop (from RUNNING to INITIALIZED).

Implements IService.

Reimplemented in MinimalEventLoopMgr.

virtual StatusCode Service::terminate (  )  [inline, virtual, inherited]

Initialization (from CONFIGURED to OFFLINE).

Implements IService.

Definition at line 58 of file Service.h.

00058 { return StatusCode::SUCCESS; }

virtual Gaudi::StateMachine::State Service::FSMState (  )  const [inline, virtual, inherited]

Get the current state.

Implements IService.

Definition at line 59 of file Service.h.

00059 { return m_state; }

virtual Gaudi::StateMachine::State Service::targetFSMState (  )  const [inline, virtual, inherited]

When we are in the middle of a transition, get the state where the transition is leading us.

Otherwise it returns the same state as state().

Implements IService.

Definition at line 60 of file Service.h.

00060 { return m_targetState; }

virtual StatusCode Service::reinitialize (  )  [virtual, inherited]

Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).

Implements IService.

Reimplemented in DataSvc, and MinimalEventLoopMgr.

virtual StatusCode Service::restart (  )  [virtual, inherited]

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Implements IService.

Reimplemented in MinimalEventLoopMgr.

virtual StatusCode Service::sysInitialize (  )  [virtual, inherited]

Initilize Service.

Implements IService.

virtual StatusCode Service::sysStart (  )  [virtual, inherited]

Initilize Service.

Implements IService.

virtual StatusCode Service::sysStop (  )  [virtual, inherited]

Initilize Service.

Implements IService.

virtual StatusCode Service::sysFinalize (  )  [virtual, inherited]

Finalize Service.

Implements IService.

virtual StatusCode Service::sysReinitialize (  )  [virtual, inherited]

Re-initialize the Service.

Implements IService.

virtual StatusCode Service::sysRestart (  )  [virtual, inherited]

Re-initialize the Service.

Implements IService.

virtual StatusCode Service::setProperty ( const Property p  )  [virtual, inherited]

Set the property by property.

Implements IProperty.

virtual StatusCode Service::setProperty ( const std::string &  s  )  [virtual, inherited]

Set the property by string.

Implements IProperty.

virtual StatusCode Service::setProperty ( const std::string &  n,
const std::string &  v 
) [virtual, inherited]

Set the property by std::string.

Implements IProperty.

template<class TYPE>
StatusCode Service::setProperty ( const std::string &  name,
const TYPE &  value 
) [inline, inherited]

set the property form the value

  std::vector<double> data = ... ;
  setProperty( "Data" , data ) ;
  
  std::map<std::string,double> cuts = ... ;
  setProperty( "Cuts" , cuts ) ;

  std::map<std::string,std::string> dict = ... ;
  setProperty( "Dictionary" , dict ) ;

Note: the interface IProperty allows setting of the properties either directly from other properties or from strings only

This is very convinient in resetting of the default properties in the derived classes. E.g. without this method one needs to convert everything into strings to use IProperty::setProperty

    setProperty ( "OutputLevel" , "1"    ) ;
    setProperty ( "Enable"      , "True" ) ;
    setProperty ( "ErrorMax"    , "10"   ) ;

For simple cases it is more or less ok, but for complicated properties it is just ugly..

Parameters:
name name of the property
value value of the property
See also:
Gaudi::Utils::setProperty
Author:
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2007-05-13

Definition at line 128 of file Service.h.

00130   { return Gaudi::Utils::setProperty ( m_propertyMgr , name , value ) ; }

virtual StatusCode Service::getProperty ( Property p  )  const [virtual, inherited]

Get the property by property.

Implements IProperty.

virtual const Property& Service::getProperty ( const std::string &  name  )  const [virtual, inherited]

Get the property by name.

Implements IProperty.

virtual StatusCode Service::getProperty ( const std::string &  n,
std::string &  v 
) const [virtual, inherited]

Get the property by std::string.

Implements IProperty.

virtual const std::vector<Property*>& Service::getProperties (  )  const [virtual, inherited]

Get list of properties.

Implements IProperty.

ISvcLocator* Service::serviceLocator (  )  const [inherited]

Retrieve pointer to service locator.

IMessageSvc* Service::msgSvc (  )  [inherited]

Retrieve pointer to message service.

IMessageSvc* Service::msgSvc (  )  const [inherited]

IMessageSvc* Service::messageService (  )  [inherited]

IMessageSvc* Service::messageService (  )  const [inherited]

StatusCode Service::setProperties (  )  [inherited]

Method for setting declared properties to the values specifed for the job.

template<class T>
StatusCode Service::service ( const std::string &  name,
T *&  psvc,
bool  createIf = true 
) const [inline, inherited]

Access a service by name, creating it if it doesn't already exist.

Definition at line 152 of file Service.h.

00152                                                                                     {
00153     return service_i(name, createIf, T::interfaceID(), (void**)&psvc);
00154   }

template<class T>
StatusCode Service::service ( const std::string &  svcType,
const std::string &  svcName,
T *&  psvc 
) const [inline, inherited]

Access a service by name and type, creating it if it doesn't already exist.

Definition at line 159 of file Service.h.

00160                                       {
00161     return service_i(svcType, svcName, T::interfaceID(), (void**)&psvc);
00162   }

template<class T>
Property* Service::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
) const [inline, inherited]

Declare the named property.

  MySvc ( const std::string& name , 
          ISvcLocator*       pSvc ) 
     : Service ( name , pSvc ) 
     , m_property1   ( ... )
     , m_property2   ( ... )
   {
     // declare the property 
     declareProperty( "Property1" , m_property1 , "Doc fro property #1" ) ;

     // declare the property and attach the handler  to it
     declareProperty( "Property2" , m_property2 , "Doc for property #2" ) 
        -> declareUpdateHandler( &MyAlg::handler_2 ) ;
  
   }

See also:
PropertyMgr

PropertyMgr::declareProperty

Parameters:
name the property name
proeprty the property itself,
doc the documentation string
Returns:
the actual property objects

Definition at line 194 of file Service.h.

00197   { 
00198     return m_propertyMgr -> declareProperty ( name , property , doc ) ;
00199   }

Property* Service::declareRemoteProperty ( const std::string &  name,
IProperty rsvc,
const std::string &  rname = "" 
) const [inline, inherited]

Declare remote named properties.

This is used to declare as a local property a property of another services or algorithm. The only needed information is IProperty interface of the remote service and the its property name if different of the current one.

Parameters:
name Local property name
rsvc Remote IProperty interface
rname Name of the property at remote service

Definition at line 210 of file Service.h.

00213   {
00214         return m_propertyMgr -> declareRemoteProperty ( name , rsvc , rname ) ;
00215   }

IAuditorSvc* Service::auditorSvc (  )  const [inherited]

The standard auditor service.May not be invoked before sysInitialize() has been invoked.

int Service::outputLevel (  )  const [inline, protected, inherited]

get the Service's output level

Definition at line 235 of file Service.h.

00235 { return m_outputLevel.value(); }

static const InterfaceID& IService::interfaceID (  )  [inline, static, inherited]

Retrieve interface ID.

Reimplemented from INamedInterface.

Reimplemented in IAuditorSvc, IChronoStatSvc, IHistorySvc, IIssueLogger, IMagneticFieldSvc, IParticlePropertySvc, IPartPropSvc, IRndmGenSvc, IStatusCodeSvc, and ITHistSvc.

Definition at line 26 of file IService.h.

00026 { return IID_IService; }

static const InterfaceID& IProperty::interfaceID (  )  [inline, static, inherited]

Retrieve interface ID.

Reimplemented from IInterface.

Definition at line 28 of file IProperty.h.

00028 { return IID_IProperty; }

static const InterfaceID& IStateful::interfaceID (  )  [inline, static, inherited]

Retrieve interface ID.

Reimplemented from IInterface.

Definition at line 23 of file IStateful.h.

00023 { return IID_IStateful; }

static const InterfaceID& IConversionSvc::interfaceID (  )  [inline, static, inherited]

Retrieve interface ID.

Reimplemented from IConverter.

Definition at line 45 of file IConversionSvc.h.

00045 { return IID_IConversionSvc; }

static const InterfaceID& IAddressCreator::interfaceID (  )  [inline, static, inherited]

Retrieve interface ID.

Reimplemented from IInterface.

Definition at line 36 of file IAddressCreator.h.

00036 { return IID_IAddressCreator; }


Friends And Related Function Documentation

friend class ServiceManager [friend, inherited]

Reimplemented from IService.

Definition at line 34 of file Service.h.


Member Data Documentation

IDataProviderSvc* ConversionSvc::m_dataSvc [protected]

Pointer to data provider service.

Definition at line 233 of file ConversionSvc.h.

IAddressCreator* ConversionSvc::m_addressCreator [protected]

Pointer to the address creation service interface.

Definition at line 235 of file ConversionSvc.h.

long ConversionSvc::m_type [protected]

Conversion service type.

Definition at line 237 of file ConversionSvc.h.

Workers* ConversionSvc::m_workers [protected]

List of conversion workers.

Definition at line 239 of file ConversionSvc.h.

IntegerProperty Service::m_outputLevel [protected, inherited]

Service output level.

Definition at line 226 of file Service.h.

Gaudi::StateMachine::State Service::m_state [protected, inherited]

Service state.

Reimplemented in MinimalEventLoopMgr.

Definition at line 228 of file Service.h.

Gaudi::StateMachine::State Service::m_targetState [protected, inherited]

Service state.

Definition at line 230 of file Service.h.

IMessageSvc* Service::m_messageSvc [mutable, protected, inherited]

MessageSvc reference.

Definition at line 232 of file Service.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:57:06 2011 for GaudiKernel by doxygen 1.4.7