CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/FWCore/Utilities/interface/GetEnvironmentVariable.h

Go to the documentation of this file.
00001 #ifndef Utilities_GetEnvironmentVariable_h
00002 #define Utilities_GetEnvironmentVariable_h
00003 
00004 #include <cstdlib>
00005 #include <string>
00006 
00007 namespace edm {
00008   inline
00009   std::string getEnvironmentVariable (std::string const& name, std::string const& defaultValue = std::string()) {
00010     char *p = ::getenv(name.c_str());
00011     return (p ? std::string(p) : defaultValue); 
00012   }
00013 }
00014 #endif