Gaudi Framework, version v20r4

Generated: 8 Jan 2009

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 Service,
00023                       virtual public IProperty,
00024                       virtual public IJobOptionsSvc {
00025 public:
00026 
00027   // unhides some of Service's methods
00028   using Service::setProperty;
00029   using Service::getProperty;
00030   using Service::getProperties;
00031 
00032   typedef std::vector<const Property*> PropertiesT;
00034         JobOptionsSvc(const std::string& name,ISvcLocator* svc);
00036   virtual ~JobOptionsSvc() ;
00038         virtual StatusCode initialize ();
00040         virtual StatusCode finalize   ();
00041 
00043   virtual StatusCode setMyProperties( const std::string& client,
00044                                                 IProperty* myInt );
00045 
00047   virtual StatusCode addPropertyToCatalogue( const std::string& client, 
00048                                              const Property& property );
00049 
00051   virtual StatusCode removePropertyFromCatalogue( const std::string& client, 
00052                                                   const std::string& name );
00053 
00055   virtual const PropertiesT* getProperties( const std::string& client) const; 
00056 
00058   virtual std::vector<std::string> getClients() const;
00059   
00066   virtual StatusCode readOptions 
00067   ( const std::string& file      , 
00068     const std::string& path = "" ) ;
00069   
00071   StatusCode setProperty(const Property& p);
00072   StatusCode getProperty(Property *p) const;
00073 
00075   virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
00076   
00077 public:
00079   std::ostream& fillStream ( std::ostream& o ) const ;
00081   void dump ( const std::string& file ) const ;
00083   void dump () ;
00084 private:
00086   void fillParserCatalogue();
00088   void fillServiceCatalogue();
00090   MSG::Level convertSeverity(const Gaudi::Parsers::Message::Severity& severity);
00091 private:
00092   std::string         m_source_path;
00093   std::string         m_source_type;
00094   std::string         m_dirSearchPath;
00095   // optional output file to dump all properties 
00096   std::string         m_dump   ; 
00097   bool                m_dumped ;
00098   PropertyMgr         m_pmgr;
00099   Gaudi::Parsers::Catalogue m_pcatalogue;
00100   std::vector<std::string> m_included;
00101   JobOptionsCatalogue m_catalogue;
00102 } ;
00103 
00104 #endif

Generated at Thu Jan 8 17:44:23 2009 for Gaudi Framework, version v20r4 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004