Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:30

0001 #ifndef Fireworks_Core_FWConfigurationManager_h
0002 #define Fireworks_Core_FWConfigurationManager_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWConfigurationManager
0007 //
0008 /**\class FWConfigurationManager FWConfigurationManager.h Fireworks/Core/interface/FWConfigurationManager.h
0009 
0010    Description: <one line class summary>
0011 
0012    Usage:
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Sun Feb 24 14:38:41 EST 2008
0019 //
0020 
0021 // system include files
0022 #include <map>
0023 #include <string>
0024 
0025 // user include files
0026 
0027 // forward declarations
0028 class FWConfigurable;
0029 class FWConfiguration;
0030 class FWJobMetadataManager;
0031 
0032 class FWConfigurationManager {
0033 public:
0034   FWConfigurationManager();
0035   virtual ~FWConfigurationManager();
0036 
0037   // ---------- const member functions ---------------------
0038   void setFrom(const FWConfiguration&) const;
0039   void to(FWConfiguration&) const;
0040 
0041   void writeToFile(const std::string&) const;
0042   void readFromFile(const std::string&) const;
0043   std::string guessAndReadFromFile(FWJobMetadataManager*) const;
0044   // ---------- static member functions --------------------
0045 
0046   // ---------- member functions ---------------------------
0047   ///does not take ownership
0048   void add(const std::string& iName, FWConfigurable*);
0049 
0050   void setIgnore() { m_ignore = true; }
0051   bool getIgnore() const { return m_ignore; }
0052 
0053   FWConfigurationManager(const FWConfigurationManager&) = delete;  // stop default
0054 
0055   const FWConfigurationManager& operator=(const FWConfigurationManager&) = delete;  // stop default
0056 private:
0057   void readFromOldFile(const std::string&) const;
0058 
0059   // ---------- member data --------------------------------
0060   std::map<std::string, FWConfigurable*> m_configurables;
0061   bool m_ignore;
0062 };
0063 
0064 #endif