| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

JobOptionsSvc.h
Go to the documentation of this file.
1 #ifndef JOBOPTIONSSVC_H_
2 #define JOBOPTIONSSVC_H_
3
4 #include "GaudiKernel/IJobOptionsSvc.h"
5 #include "GaudiKernel/IProperty.h"
6 #include "GaudiKernel/Property.h"
7 #include "GaudiKernel/PropertyHolder.h"
8 #include "GaudiKernel/Service.h"
9 #include "GaudiKernel/StatusCode.h"
10
11 #include "SvcCatalog.h"
12
13 #include <vector>
14
15 namespace Gaudi
16 {
17 namespace Parsers
18 {
19 class Catalog;
20 }
21 }
22
23 class JobOptionsSvc : public extends<Service, IJobOptionsSvc>
24 {
25 public:
26 typedef std::vector<const Gaudi::Details::PropertyBase*> PropertiesT;
27 // Constructor
28 JobOptionsSvc( const std::string& name, ISvcLocator* svc );
30 ~JobOptionsSvc() override = default;
31 StatusCode initialize() override;
32
37 StatusCode setMyProperties( const std::string& client, IProperty* me ) override;
38
40 StatusCode addPropertyToCatalogue( const std::string& client, const Gaudi::Details::PropertyBase& property ) override;
41
43 StatusCode removePropertyFromCatalogue( const std::string& client, const std::string& name ) override;
44
45 using Service::getProperties;
47 const std::vector<const Gaudi::Details::PropertyBase*>* getProperties( const std::string& client ) const override;
48
49 using Service::getProperty;
51 const Gaudi::Details::PropertyBase* getClientProperty( const std::string& client,
52 const std::string& name ) const override
53 {
54 return m_svc_catalog.getProperty( client, name );
55 }
57 std::vector<std::string> getClients() const override;
58
65 StatusCode readOptions( const std::string& file, const std::string& path = "" ) override;
66
67 private:
68 void fillServiceCatalog( const Gaudi::Parsers::Catalog& catalog );
69 void dump( const std::string& file, const Gaudi::Parsers::Catalog& catalog ) const;
71
72 private:
73 Gaudi::Property<std::string> m_source_type{this, "TYPE"};
74 Gaudi::Property<std::string> m_source_path{this, "PATH"};
75 Gaudi::Property<std::string> m_dir_search_path{this, "SEARCHPATH"};
76 Gaudi::Property<std::string> m_dump{this, "DUMPFILE"};
77 Gaudi::Property<std::string> m_pythonAction{this, "PYTHONACTION"};
78 Gaudi::Property<std::string> m_pythonParams{this, "PYTHONPARAMS"};
79
80 SvcCatalog m_svc_catalog;
81 };
82 #endif /* JOBOPTIONSSVC_H_ */
PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >::getProperty
StatusCode getProperty(Gaudi::Details::PropertyBase *p) const override
get the property
Definition: PropertyHolder.h:291
PropertyHolder.h
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:32
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:319
PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >::getProperties
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
Definition: PropertyHolder.h:329
JobOptionsSvc::m_svc_catalog
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:80
property
Gaudi::Details::PropertyBase * property(const std::string &name) const
addPropertyToCatalogue
bool PyHelper() addPropertyToCatalogue(IInterface *p, char *comp, char *name, char *value)
Definition: Bootstrap.cpp:261
std::string
STL class.
Service.h
JobOptionsSvc
Definition: JobOptionsSvc.h:23
JobOptionsSvc::getClientProperty
const Gaudi::Details::PropertyBase * getClientProperty(const std::string &client, const std::string &name) const override
Get a property for a client.
Definition: JobOptionsSvc.h:51
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
JobOptionsSvc::PropertiesT
std::vector< const Gaudi::Details::PropertyBase * > PropertiesT
Definition: JobOptionsSvc.h:26
IProperty.h
std::vector
STL class.
Gaudi::Parsers::Catalog
Definition: Catalog.h:31
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
SvcCatalog.h
Property.h
StatusCode.h
IProperty
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:20
SvcCatalog
Definition: SvcCatalog.h:25
getProperties
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1
IJobOptionsSvc.h