| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

# JobOptionsSvc.h

Go to the documentation of this file.

    00001 // $Id:$
    00002 #ifndef JOBOPTIONSSVC_H_
    00003 #define JOBOPTIONSSVC_H_
    00004
    00005 #include "GaudiKernel/StatusCode.h"
    00006 #include "GaudiKernel/IProperty.h"
    00007 #include "GaudiKernel/IJobOptionsSvc.h"
    00008 #include "GaudiKernel/Property.h"
    00009 #include "GaudiKernel/PropertyMgr.h"
    00010 #include "GaudiKernel/Service.h"
    00011
    00012 #include "SvcCatalog.h"
    00013
    00014 #include <vector>
    00015
    00016 namespace Gaudi { namespace Parsers {
    00017   class Catalog;
    00018 }}
    00019
    00020
    00021 class JobOptionsSvc : public extends2<Service, IProperty, IJobOptionsSvc> {
    00022  public:
    00023     typedef std::vector<const Property*> PropertiesT;
    00024   // unhides some of Service's methods
    00025    using Service::setProperty;
    00026    using Service::getProperty;
    00027    using Service::getProperties;
    00028   // Constructor
    00029   JobOptionsSvc(const std::string& name,ISvcLocator* svc);
    00031   virtual ~JobOptionsSvc() {};
    00032   virtual StatusCode initialize ();
    00034   virtual StatusCode finalize   ();
    00035
    00040   virtual StatusCode setMyProperties(const std::string& client,
    00041       IProperty* me ) ;
    00042
    00044   virtual StatusCode addPropertyToCatalogue( const std::string& client,
    00045       const Property& property ) ;
    00046
    00048   virtual StatusCode removePropertyFromCatalogue( const std::string& client,
    00049       const std::string& name );
    00051   virtual const std::vector<const Property*>*
    00052   getProperties( const std::string& client) const;
    00053
    00055   virtual std::vector<std::string> getClients() const;
    00056
    00063   virtual StatusCode readOptions ( const std::string& file,
    00064       const std::string& path = "" );
    00065
    00067   StatusCode setProperty(const Property& p);
    00068   StatusCode getProperty(Property *p) const;
    00069  private:
    00070   void fillServiceCatalog(const Gaudi::Parsers::Catalog& catalog);
    00071   void dump (const std::string& file,
    00072       const Gaudi::Parsers::Catalog& catalog) const ;
    00074
    00075  private:
    00076   PropertyMgr m_pmgr;
    00077   std::string m_source_path;
    00078   std::string m_source_type;
    00079   std::string m_dir_search_path;
    00080   std::string m_dump;
    00081   SvcCatalog  m_svc_catalog;
    00082   bool m_dumped;
    00083 };
    00084 #endif /* JOBOPTIONSSVC_H_ */

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines