#include <FWCore/FWLite/interface/AutoLibraryLoader.h>
Public Member Functions | |
ClassDef (AutoLibraryLoader, 2) | |
interface for TClass generators | |
Static Public Member Functions | |
static void | enable () |
enable automatic library loading | |
static void | loadAll () |
load all known libraries holding dictionaries | |
Private Member Functions | |
AutoLibraryLoader (const AutoLibraryLoader &) | |
AutoLibraryLoader () | |
const AutoLibraryLoader & | operator= (const AutoLibraryLoader &) |
Static Private Attributes | |
static bool | enabled_ |
Friends | |
class | DummyClassToStopCompilerWarning |
Definition at line 16 of file AutoLibraryLoader.h.
AutoLibraryLoader::AutoLibraryLoader | ( | ) | [private] |
AutoLibraryLoader::AutoLibraryLoader | ( | const AutoLibraryLoader & | ) | [private] |
AutoLibraryLoader::ClassDef | ( | AutoLibraryLoader | , | |
2 | ||||
) |
interface for TClass generators
void AutoLibraryLoader::enable | ( | ) | [static] |
enable automatic library loading
Definition at line 52 of file AutoLibraryLoader.cc.
References and, TestMuL1L2Filter_cff::cerr, edmplugin::standard::config(), edmplugin::PluginManager::configure(), dir, edm::RootAutoLibraryLoader::enable(), enabled_, end, lat::endl(), edm::setCacheStreamers(), and fwlite::setRefStreamer().
Referenced by PFRootEventManager::connect(), loadAll(), and main().
00053 { 00054 if (enabled_) { return; } 00055 enabled_ = true; 00056 00057 edmplugin::PluginManager::configure(edmplugin::standard::config()); 00058 static BareRootProductGetter s_getter; 00059 static edm::EDProductGetter::Operate s_op(&s_getter); 00060 edm::RootAutoLibraryLoader::enable(); 00061 edm::setCacheStreamers(); 00062 //this function must be called after enabling the autoloader 00063 // so that the Reflex dictionaries will be converted to ROOT 00064 // dictionaries and the TClass we need will be available 00065 fwlite::setRefStreamer(&s_getter); 00066 00067 //Make it easy to load our headers 00068 TInterpreter* intrp= gROOT->GetInterpreter(); 00069 const char* env = getenv("CMSSW_FWLITE_INCLUDE_PATH"); 00070 if( 0 != env) { 00071 //this is a comma separated list 00072 const char* start = env; 00073 const char* end = env; 00074 do{ 00075 //find end 00076 for(end=start; *end!=0 and *end != ':';++end); 00077 std::string dir(start, end); 00078 intrp->AddIncludePath(dir.c_str()); 00079 start = end+1; 00080 }while(*end != 0); 00081 } 00082 00083 bool foundCMSIncludes = false; 00084 env = getenv("CMSSW_BASE"); 00085 if( 0 != env) { 00086 foundCMSIncludes = true; 00087 std::string dir(env); 00088 dir += "/src"; 00089 intrp->AddIncludePath(dir.c_str()); 00090 } 00091 00092 env = getenv("CMSSW_RELEASE_BASE"); 00093 if( 0 != env) { 00094 foundCMSIncludes = true; 00095 std::string dir(env); 00096 dir += "/src"; 00097 intrp->AddIncludePath(dir.c_str()); 00098 } 00099 if( not foundCMSIncludes) { 00100 std::cerr <<"Could not find the environment variables \n" 00101 <<" CMSSW_BASE or\n" 00102 <<" CMSSW_RELEASE_BASE\n" 00103 <<" therefore attempting to '#include' any CMS headers will not work"<<std::endl; 00104 } 00105 if (0 != gApplication) { 00106 gApplication->InitializeGraphics(); 00107 } 00108 }
void AutoLibraryLoader::loadAll | ( | ) | [static] |
load all known libraries holding dictionaries
Definition at line 111 of file AutoLibraryLoader.cc.
References enable(), and edm::RootAutoLibraryLoader::loadAll().
00112 { 00113 // std::cout <<"LoadAllDictionaries"<<std::endl; 00114 enable(); 00115 edm::RootAutoLibraryLoader::loadAll(); 00116 }
const AutoLibraryLoader& AutoLibraryLoader::operator= | ( | const AutoLibraryLoader & | ) | [private] |
friend class DummyClassToStopCompilerWarning [friend] |
Definition at line 17 of file AutoLibraryLoader.h.
bool AutoLibraryLoader::enabled_ [static, private] |