CMS 3D CMS Logo

standard.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     PluginManager
00004 // Class  :     standard
00005 // 
00006 // Implementation:
00007 //     <Notes on implementation>
00008 //
00009 // Original Author:  Chris Jones
00010 //         Created:  Sat Apr  7 17:10:11 EDT 2007
00011 // $Id: standard.cc,v 1.2 2007/04/12 12:51:12 wmtan Exp $
00012 //
00013 
00014 // system include files
00015 
00016 // user include files
00017 #include "FWCore/PluginManager/interface/standard.h"
00018 
00019 namespace edmplugin {
00020   namespace standard {
00021 
00022     PluginManager::Config config()
00023   {
00024       PluginManager::Config returnValue;
00025       
00026       const char *path = getenv ("LD_LIBRARY_PATH");
00027       if (! path) path = "";
00028       
00029       std::string spath(path? path: "");
00030       std::string::size_type last=0;
00031       std::string::size_type i=0;
00032       std::vector<std::string> paths;
00033       while( (i=spath.find_first_of(':',last))!=std::string::npos) {
00034         paths.push_back(spath.substr(last,i-last));
00035         last = i+1;
00036         //std::cout <<paths.back()<<std::endl;
00037       }
00038       paths.push_back(spath.substr(last,std::string::npos));
00039       returnValue.searchPath(paths);
00040       
00041       return returnValue;
00042   }
00043     
00044     const boost::filesystem::path& cachefileName() {
00045       static const boost::filesystem::path s_path(".edmplugincache",boost::filesystem::no_check);
00046       return s_path;
00047     }
00048     
00049     
00050     const std::string& pluginPrefix() {
00051       static const std::string s_prefix("plugin");
00052       return s_prefix;
00053     }
00054     
00055   }
00056 }

Generated on Tue Jun 9 17:36:32 2009 for CMSSW by  doxygen 1.5.4