All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
JobOptionsSvc.h
Go to the documentation of this file.
1 // $Id:$
2 #ifndef JOBOPTIONSSVC_H_
3 #define JOBOPTIONSSVC_H_
4 
8 #include "GaudiKernel/Property.h"
10 #include "GaudiKernel/Service.h"
11 
12 #include "SvcCatalog.h"
13 
14 #include <vector>
15 
16 namespace Gaudi { namespace Parsers {
17  class Catalog;
18 }}
19 
20 
21 class JobOptionsSvc : public extends2<Service, IProperty, IJobOptionsSvc> {
22  public:
23  typedef std::vector<const Property*> PropertiesT;
24  // unhides some of Service's methods
28  // Constructor
29  JobOptionsSvc(const std::string& name,ISvcLocator* svc);
31  virtual ~JobOptionsSvc() {};
32  virtual StatusCode initialize ();
34  virtual StatusCode finalize ();
35 
40  virtual StatusCode setMyProperties(const std::string& client,
41  IProperty* me ) ;
42 
44  virtual StatusCode addPropertyToCatalogue( const std::string& client,
45  const Property& property ) ;
46 
48  virtual StatusCode removePropertyFromCatalogue( const std::string& client,
49  const std::string& name );
51  virtual const std::vector<const Property*>*
52  getProperties( const std::string& client) const;
53 
55  virtual std::vector<std::string> getClients() const;
56 
63  virtual StatusCode readOptions ( const std::string& file,
64  const std::string& path = "" );
65 
69  private:
70  void fillServiceCatalog(const Gaudi::Parsers::Catalog& catalog);
71  void dump (const std::string& file,
72  const Gaudi::Parsers::Catalog& catalog) const ;
74 
75  private:
77  std::string m_source_path;
78  std::string m_source_type;
79  std::string m_dir_search_path;
80  std::string m_dump;
82 };
83 #endif /* JOBOPTIONSSVC_H_ */
StatusCode setProperty(const Property &p)
IProperty implementation (needed for initialisation)
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:26
virtual std::vector< std::string > getClients() const
Get the list of clients.
std::string m_source_type
Definition: JobOptionsSvc.h:78
virtual StatusCode setProperty(const Property &p)
Set the property by property.
Definition: Service.cpp:342
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:81
virtual StatusCode setMyProperties(const std::string &client, IProperty *me)
Override default properties of the calling client.
virtual StatusCode addPropertyToCatalogue(const std::string &client, const Property &property)
Add a property into the JobOptions catalog.
virtual StatusCode getProperty(Property *p) const
Get the property by property.
Definition: Service.cpp:354
Base class used to extend a class implementing other interfaces.
Definition: extends.h:75
Property manager helper class.
Definition: PropertyMgr.h:38
virtual StatusCode removePropertyFromCatalogue(const std::string &client, const std::string &name)
Remove a property from the JobOptions catalog.
std::string m_dir_search_path
Definition: JobOptionsSvc.h:79
void dump(const std::string &file, const Gaudi::Parsers::Catalog &catalog) const
StatusCode getProperty(Property *p) const
Get the property by property.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
std::string m_dump
Definition: JobOptionsSvc.h:80
list file
Definition: ana.py:160
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
virtual StatusCode finalize()
Service finalization method.
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
virtual ~JobOptionsSvc()
destructor
Definition: JobOptionsSvc.h:31
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
JobOptionsSvc(const std::string &name, ISvcLocator *svc)
PropertyMgr m_pmgr
dump the content of Properties catalog to the predefined file
Definition: JobOptionsSvc.h:76
std::vector< const Property * > PropertiesT
Definition: JobOptionsSvc.h:23
This is a number of static methods for bootstrapping the Gaudi framework.
Definition: Bootstrap.h:14
virtual StatusCode readOptions(const std::string &file, const std::string &path="")
look for file 'file' into search path 'path' and read it to update existing JobOptionsCatalogue ...
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:22
std::string m_source_path
Definition: JobOptionsSvc.h:77
virtual const std::vector< Property * > & getProperties() const
Get list of properties.
Definition: Service.cpp:366