ROOT helper class which can automatically load the proper shared library when ROOT needs a new class dictionary
- Author
- Chris Jones, Cornell
- Id:
- AutoLibraryLoader.h,v 1.2 2008/06/12 22:17:22 dsr Exp
Definition at line 15 of file AutoLibraryLoader.h.
void AutoLibraryLoader::enable |
( |
| ) |
|
|
static |
enable automatic library loading
Definition at line 51 of file AutoLibraryLoader.cc.
References benchmark_cfg::cerr, edmplugin::standard::config(), edmplugin::PluginManager::configure(), dir, edm::RootAutoLibraryLoader::enable(), enabled_, end, edm::setCacheStreamers(), and fwlite::setRefStreamer().
Referenced by CmsShowMain::CmsShowMain(), PFRootEventManager::connect(), fwlite::EventContainer::EventContainer(), loadAll(), and main().
66 TInterpreter* intrp= gROOT->GetInterpreter();
67 const char* env = getenv(
"CMSSW_FWLITE_INCLUDE_PATH");
70 const char* start = env;
71 const char*
end = env;
74 for(end=start; *end!=0 and *end !=
':';++
end);
75 std::string
dir(start, end);
76 intrp->AddIncludePath(
dir.c_str());
81 bool foundCMSIncludes =
false;
82 env = getenv(
"CMSSW_BASE");
84 foundCMSIncludes =
true;
87 intrp->AddIncludePath(
dir.c_str());
90 env = getenv(
"CMSSW_RELEASE_BASE");
92 foundCMSIncludes =
true;
95 intrp->AddIncludePath(
dir.c_str());
97 if( not foundCMSIncludes) {
98 std::cerr <<
"Could not find the environment variables \n"
100 <<
" CMSSW_RELEASE_BASE\n"
101 <<
" therefore attempting to '#include' any CMS headers will not work"<<std::endl;
103 if (0 != gApplication) {
104 gApplication->InitializeGraphics();
static PluginManager & configure(const Config &)
PluginManager::Config config()
edm::EDProductGetter const * setRefStreamer(edm::EDProductGetter const *ep)
static void enable()
interface for TClass generators