The Gaudi Framework  v31r0 (aeb156f0)
JobOptionsSvc.h
Go to the documentation of this file.
1 #ifndef JOBOPTIONSSVC_H_
2 #define JOBOPTIONSSVC_H_
3 
6 #include "GaudiKernel/Property.h"
8 #include "GaudiKernel/Service.h"
10 
11 #include "SvcCatalog.h"
12 
13 #include <vector>
14 
15 namespace Gaudi {
16  namespace Parsers {
17  class Catalog;
18  }
19 } // namespace Gaudi
20 
21 class JobOptionsSvc : public extends<Service, IJobOptionsSvc> {
22 public:
24  // Constructor
25  JobOptionsSvc( const std::string& name, ISvcLocator* svc );
26 
27  StatusCode initialize() override;
28 
33  StatusCode setMyProperties( const std::string& client, IProperty* me ) override;
34 
37 
39  StatusCode removePropertyFromCatalogue( const std::string& client, const std::string& name ) override;
40 
43  const std::vector<const Gaudi::Details::PropertyBase*>* getProperties( const std::string& client ) const override;
44 
48  const std::string& name ) const override {
49  return m_svc_catalog.getProperty( client, name );
50  }
52  std::vector<std::string> getClients() const override;
53 
60  StatusCode readOptions( const std::string& file, const std::string& path = "" ) override;
61 
62 private:
63  void fillServiceCatalog( const Gaudi::Parsers::Catalog& catalog );
64  void dump( const std::string& file, const Gaudi::Parsers::Catalog& catalog ) const;
66 
67 private:
68  Gaudi::Property<std::string> m_source_type{this, "TYPE"};
69  Gaudi::Property<std::string> m_source_path{this, "PATH"};
70  Gaudi::Property<std::string> m_dir_search_path{this, "SEARCHPATH"};
71  Gaudi::Property<std::string> m_dump{this, "DUMPFILE"};
72  Gaudi::Property<std::string> m_pythonAction{this, "PYTHONACTION"};
73  Gaudi::Property<std::string> m_pythonParams{this, "PYTHONPARAMS"};
74 
76 };
77 #endif /* JOBOPTIONSSVC_H_ */
StatusCode getProperty(Gaudi::Details::PropertyBase *p) const override
get the property
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
Implementation of property with value of concrete type.
Definition: Property.h:352
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:75
Gaudi::Details::PropertyBase * property(const std::string &name) const
bool PyHelper() addPropertyToCatalogue(IInterface *p, char *comp, char *name, char *value)
Definition: Bootstrap.cpp:245
STL class.
const Gaudi::Details::PropertyBase * getClientProperty(const std::string &client, const std::string &name) const override
Get a property for a client.
Definition: JobOptionsSvc.h:47
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
std::vector< const Gaudi::Details::PropertyBase * > PropertiesT
Definition: JobOptionsSvc.h:23
STL class.
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:20
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
Helper functions to set/get the application return code.
Definition: __init__.py:1