The Gaudi Framework  v32r2 (46d42edc)
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:
74 
76 };
77 #endif /* JOBOPTIONSSVC_H_ */
Gaudi::Property< std::string > m_source_path
Definition: JobOptionsSvc.h:69
void fillServiceCatalog(const Gaudi::Parsers::Catalog &catalog)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
Gaudi::Details::PropertyBase * property(const std::string &name) const
std::vector< std::string > getClients() const override
Get the list of clients.
Implementation of property with value of concrete type.
Definition: Property.h:352
Gaudi::Property< std::string > m_pythonAction
Definition: JobOptionsSvc.h:72
const Gaudi::Details::PropertyBase * getProperty(const std::string &client, const std::string &name) const
Definition: SvcCatalog.cpp:107
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:75
Gaudi::Property< std::string > m_dump
Definition: JobOptionsSvc.h:71
STL class.
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:274
StatusCode setMyProperties(const std::string &client, IProperty *me) override
Override default properties of the calling client.
Gaudi::Property< std::string > m_pythonParams
Definition: JobOptionsSvc.h:73
Gaudi::Property< std::string > m_dir_search_path
Definition: JobOptionsSvc.h:70
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
StatusCode readOptions(const std::string &file, const std::string &path="") override
look for file 'file' into search path 'path' and read it to update existing JobOptionsCatalogue
StatusCode removePropertyFromCatalogue(const std::string &client, const std::string &name) override
Remove a property from the JobOptions catalog.
StatusCode initialize() override
Gaudi::Property< std::string > m_source_type
dump the content of Properties catalog to the predefined file
Definition: JobOptionsSvc.h:68
void dump(const std::string &file, const Gaudi::Parsers::Catalog &catalog) const
JobOptionsSvc(const std::string &name, ISvcLocator *svc)
StatusCode getProperty(Gaudi::Details::PropertyBase *p) const override
get the property
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
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
StatusCode addPropertyToCatalogue(const std::string &client, const Gaudi::Details::PropertyBase &property) override
Add a property into the JobOptions catalog.
The IProperty is the basic interface for all components which have properties that can be set or get.
Definition: IProperty.h:20
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1