CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/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