| The Gaudi Framework v27r1

- 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/StatusCode.h"
5 #include "GaudiKernel/IProperty.h"
6 #include "GaudiKernel/IJobOptionsSvc.h"
7 #include "GaudiKernel/Property.h"
8 #include "GaudiKernel/PropertyMgr.h"
9 #include "GaudiKernel/Service.h"
10
11 #include "SvcCatalog.h"
12
13 #include <vector>
14
15 namespace Gaudi { namespace Parsers {
16 class Catalog;
17 }}
18
19
20 class JobOptionsSvc : public extends<Service,
21 IProperty,
22 IJobOptionsSvc> {
23 public:
24 typedef std::vector<const Property*> PropertiesT;
25 // unhides some of Service's methods
26 using Service::setProperty;
27 using Service::getProperty;
28 using Service::getProperties;
29 // Constructor
30 JobOptionsSvc(const std::string& name,ISvcLocator* svc);
32 ~JobOptionsSvc() override = default;
33 StatusCode initialize () override;
34
39 StatusCode setMyProperties(const std::string& client,
40 IProperty* me ) override ;
41
43 StatusCode addPropertyToCatalogue( const std::string& client,
44 const Property& property ) override;
45
47 StatusCode removePropertyFromCatalogue( const std::string& client,
48 const std::string& name ) override;
50 const std::vector<const Property*>*
51 getProperties( const std::string& client) const override;
52
54 std::vector<std::string> getClients() const override;
55
62 StatusCode readOptions ( const std::string& file,
63 const std::string& path = "" ) override;
64
66 StatusCode setProperty(const Property& p) override;
67 StatusCode getProperty(Property *p) const override;
68 private:
69 void fillServiceCatalog(const Gaudi::Parsers::Catalog& catalog);
70 void dump (const std::string& file,
71 const Gaudi::Parsers::Catalog& catalog) const ;
73
74 private:
75 PropertyMgr m_pmgr;
76 std::string m_source_path;
77 std::string m_source_type;
78 std::string m_dir_search_path;
79 std::string m_dump;
80 std::string m_pythonAction;
81 std::string m_pythonParams;
82 SvcCatalog m_svc_catalog;
83 };
84 #endif /* JOBOPTIONSSVC_H_ */
JobOptionsSvc::fillServiceCatalog
void fillServiceCatalog(const Gaudi::Parsers::Catalog &catalog)
Definition: JobOptionsSvc.cpp:138
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
JobOptionsSvc::getClients
std::vector< std::string > getClients() const override
Get the list of clients.
Definition: JobOptionsSvc.cpp:121
JobOptionsSvc::m_source_type
std::string m_source_type
Definition: JobOptionsSvc.h:77
JobOptionsSvc::m_pythonAction
std::string m_pythonAction
Definition: JobOptionsSvc.h:80
JobOptionsSvc::m_svc_catalog
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:82
Service::setProperty
StatusCode setProperty(const Property &p) override
Definition: Service.cpp:330
PropertyMgr
Property manager helper class.
Definition: PropertyMgr.h:37
JobOptionsSvc::getProperty
StatusCode getProperty(Property *p) const override
Definition: JobOptionsSvc.cpp:50
JobOptionsSvc::m_dir_search_path
std::string m_dir_search_path
Definition: JobOptionsSvc.h:78
std::string
STL class.
Service.h
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
Service::getProperties
const std::vector< Property * > & getProperties() const override
Definition: Service.cpp:354
JobOptionsSvc::dump
void dump(const std::string &file, const Gaudi::Parsers::Catalog &catalog) const
Definition: JobOptionsSvc.cpp:126
JobOptionsSvc::setMyProperties
StatusCode setMyProperties(const std::string &client, IProperty *me) override
Override default properties of the calling client.
Definition: JobOptionsSvc.cpp:97
JobOptionsSvc::setProperty
StatusCode setProperty(const Property &p) override
IProperty implementation (needed for initialisation)
Definition: JobOptionsSvc.cpp:45
JobOptionsSvc
Definition: JobOptionsSvc.h:20
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
JobOptionsSvc::m_dump
std::string m_dump
Definition: JobOptionsSvc.h:79
ana.file
list file
Definition: ana.py:160
Gaudi::Utils::Histos::path
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Definition: HistoTableFormat.cpp:191
JobOptionsSvc::~JobOptionsSvc
~JobOptionsSvc() override=default
destructor
IProperty.h
Property
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
std::vector
STL class.
Gaudi::Parsers::Catalog
Definition: Catalog.h:28
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
Service::getProperty
StatusCode getProperty(Property *p) const override
Definition: Service.cpp:342
SvcCatalog.h
Property.h
PropertyMgr.h
JobOptionsSvc::readOptions
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 ...
Definition: JobOptionsSvc.cpp:148
JobOptionsSvc::removePropertyFromCatalogue
StatusCode removePropertyFromCatalogue(const std::string &client, const std::string &name) override
Remove a property from the JobOptions catalog.
Definition: JobOptionsSvc.cpp:85
JobOptionsSvc::addPropertyToCatalogue
StatusCode addPropertyToCatalogue(const std::string &client, const Property &property) override
Add a property into the JobOptions catalog.
Definition: JobOptionsSvc.cpp:75
JobOptionsSvc::initialize
StatusCode initialize() override
Definition: JobOptionsSvc.cpp:55
JobOptionsSvc::m_pythonParams
std::string m_pythonParams
Definition: JobOptionsSvc.h:81
JobOptionsSvc::JobOptionsSvc
JobOptionsSvc(const std::string &name, ISvcLocator *svc)
Definition: JobOptionsSvc.cpp:27
JobOptionsSvc::m_pmgr
PropertyMgr m_pmgr
dump the content of Properties catalog to the predefined file
Definition: JobOptionsSvc.h:75
JobOptionsSvc::PropertiesT
std::vector< const Property * > PropertiesT
Definition: JobOptionsSvc.h:24
StatusCode.h
IProperty
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:21
SvcCatalog
Definition: SvcCatalog.h:25
JobOptionsSvc::m_source_path
std::string m_source_path
Definition: JobOptionsSvc.h:76
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1
IJobOptionsSvc.h