00001 // Copyright CERN 2012 - Developed in collaboration with GSI 00002 00003 #ifndef FESA_PROCESS_CONFIGURATION_H_ 00004 #define FESA_PROCESS_CONFIGURATION_H_ 00005 00006 #include <fesa-core/Utilities/ProcessConfigurationDefs.h> 00007 00008 #include <string> 00009 #include <vector> 00010 #include <boost/scoped_ptr.hpp> 00011 00012 namespace fesa 00013 { 00014 00015 class ProcessConfigurationImpl; 00016 00022 class ProcessConfiguration 00023 { 00024 public: 00030 ProcessConfiguration(int argc, char* argv[]); 00031 00035 ~ProcessConfiguration(); 00036 00041 bool isHelpNeeded() const; 00042 00046 void printHelp() const; 00047 00053 void load(const ConfigDirs& configDirs); 00054 00059 const std::string& getLogConfigFile() const; 00060 00065 const std::string& getCMWConfigFile() const; 00066 00071 const std::string& getMsgConfigFile() const; 00072 00077 const std::string& getLabMsgConfigFile() const; 00078 00083 const std::string& getCMWServerName() const; 00084 00089 void setCMWServerName(const std::string& name); 00090 00095 bool isInTimingSimulationMode() const; 00096 00101 LoggingMode::LoggingMode getLoggingMode() const; 00102 00108 bool isDefined(const std::string& tag) const; 00109 00116 std::string getStringValue(const std::string& tag) const; 00117 00124 int getIntValue(const std::string& tag) const; 00125 00132 bool getBoolValue(const std::string& tag) const; 00133 00134 00135 private: 00136 boost::scoped_ptr<ProcessConfigurationImpl> impl_; 00137 }; 00138 00139 } // fesa 00140 00141 #endif // FESA_PROCESS_CONFIGURATION_H_