The Gaudi Framework  v30r3 (a5ef0a68)
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 {
17  namespace Parsers
18  {
19  class Catalog;
20  }
21 }
22 
23 class JobOptionsSvc : public extends<Service, IJobOptionsSvc>
24 {
25 public:
27  // Constructor
28  JobOptionsSvc( const std::string& name, ISvcLocator* svc );
29 
30  StatusCode initialize() override;
31 
36  StatusCode setMyProperties( const std::string& client, IProperty* me ) override;
37 
40 
42  StatusCode removePropertyFromCatalogue( const std::string& client, const std::string& name ) override;
43 
46  const std::vector<const Gaudi::Details::PropertyBase*>* getProperties( const std::string& client ) const override;
47 
51  const std::string& name ) const override
52  {
53  return m_svc_catalog.getProperty( client, name );
54  }
56  std::vector<std::string> getClients() const override;
57 
64  StatusCode readOptions( const std::string& file, const std::string& path = "" ) override;
65 
66 private:
67  void fillServiceCatalog( const Gaudi::Parsers::Catalog& catalog );
68  void dump( const std::string& file, const Gaudi::Parsers::Catalog& catalog ) const;
70 
71 private:
72  Gaudi::Property<std::string> m_source_type{this, "TYPE"};
73  Gaudi::Property<std::string> m_source_path{this, "PATH"};
74  Gaudi::Property<std::string> m_dir_search_path{this, "SEARCHPATH"};
75  Gaudi::Property<std::string> m_dump{this, "DUMPFILE"};
76  Gaudi::Property<std::string> m_pythonAction{this, "PYTHONACTION"};
77  Gaudi::Property<std::string> m_pythonParams{this, "PYTHONPARAMS"};
78 
80 };
81 #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:381
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:79
Gaudi::Details::PropertyBase * property(const std::string &name) const
bool PyHelper() addPropertyToCatalogue(IInterface *p, char *comp, char *name, char *value)
Definition: Bootstrap.cpp:258
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:50
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
std::vector< const Gaudi::Details::PropertyBase * > PropertiesT
Definition: JobOptionsSvc.h:26
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