| # Gaudi Framework, version v21r11 |

Home |  | Generated: 30 Sep 2010

# JobOptionsSvc.h

Go to the documentation of this file.

    00001 //$Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiSvc/src/JobOptionsSvc/JobOptionsSvc.h,v 1.12 2007/05/15 16:46:25 marcocle Exp $
    00002 // ===========================================================================
    00003 #ifndef GAUDISVC_JOBOPTIONSSVC_H
    00004 #define GAUDISVC_JOBOPTIONSSVC_H 1
    00005 // ===========================================================================
    00006 // Include files
    00007 // ===========================================================================
    00008 // STD & STL
    00009 // ===========================================================================
    00010 #include <string>
    00011 // ===========================================================================
    00012 #include "GaudiKernel/StatusCode.h"
    00013 #include "GaudiKernel/Service.h"
    00014 #include "GaudiKernel/IProperty.h"
    00015 #include "GaudiKernel/IJobOptionsSvc.h"
    00016 #include "GaudiKernel/PropertyMgr.h"
    00017
    00018 #include "Catalogue.h"
    00019 #include "JobOptionsCatalogue.h"
    00020
    00021 // ===========================================================================
    00022 class JobOptionsSvc : public extends2<Service, IProperty, IJobOptionsSvc> {
    00023 public:
    00024
    00025   // unhides some of Service's methods
    00026   using Service::setProperty;
    00027   using Service::getProperty;
    00028   using Service::getProperties;
    00029
    00030   typedef std::vector<const Property*> PropertiesT;
    00032         JobOptionsSvc(const std::string& name,ISvcLocator* svc);
    00034   virtual ~JobOptionsSvc() ;
    00036         virtual StatusCode initialize ();
    00038         virtual StatusCode finalize   ();
    00039
    00041   virtual StatusCode setMyProperties( const std::string& client,
    00042                                                 IProperty* myInt );
    00043
    00045   virtual StatusCode addPropertyToCatalogue( const std::string& client,
    00046                                              const Property& property );
    00047
    00049   virtual StatusCode removePropertyFromCatalogue( const std::string& client,
    00050                                                   const std::string& name );
    00051
    00053   virtual const PropertiesT* getProperties( const std::string& client) const;
    00054
    00056   virtual std::vector<std::string> getClients() const;
    00057
    00064   virtual StatusCode readOptions
    00065   ( const std::string& file      ,
    00066     const std::string& path = "" ) ;
    00067
    00069   StatusCode setProperty(const Property& p);
    00070   StatusCode getProperty(Property *p) const;
    00071
    00072 public:
    00074   std::ostream& fillStream ( std::ostream& o ) const ;
    00076   void dump ( const std::string& file ) const ;
    00078   void dump () ;
    00079 private:
    00081   void fillParserCatalogue();
    00083   void fillServiceCatalogue();
    00085   MSG::Level convertSeverity(const Gaudi::Parsers::Message::Severity& severity);
    00086 private:
    00087   std::string         m_source_path;
    00088   std::string         m_source_type;
    00089   std::string         m_dirSearchPath;
    00090   // optional output file to dump all properties
    00091   std::string         m_dump   ;
    00092   bool                m_dumped ;
    00093   PropertyMgr         m_pmgr;
    00094   Gaudi::Parsers::Catalogue m_pcatalogue;
    00095   std::vector<std::string> m_included;
    00096   JobOptionsCatalogue m_catalogue;
    00097 } ;
    00098
    00099 #endif