00001 00002 00003 #include "FWCore/PluginManager/interface/ProblemTracker.h" 00004 #include "FWCore/PluginManager/interface/PluginManager.h" 00005 #include "FWCore/PluginManager/interface/standard.h" 00006 00007 #include <string> 00008 00009 namespace edm 00010 { 00011 00012 // ----------------------------------------------- 00013 00014 bool ProblemTracker::dead_ = true; 00015 //edmplugin::DebugAids::AssertHook ProblemTracker::old_assert_hook_ = 0; 00016 00017 ProblemTracker::ProblemTracker() 00018 { 00019 dead_ = false; 00020 //old_assert_hook_ = edmplugin::DebugAids::failHook(&failure); 00021 if(not edmplugin::PluginManager::isAvailable()) { 00022 edmplugin::PluginManager::Config config(edmplugin::standard::config()); 00023 00024 edmplugin::PluginManager::configure(config); 00025 } 00026 } 00027 00028 ProblemTracker::~ProblemTracker() 00029 { 00030 // since this is a singleton, we will not restore the old handle 00031 dead_ = true; 00032 } 00033 00034 ProblemTracker* ProblemTracker::instance() 00035 { 00036 static ProblemTracker pt; 00037 return &pt; 00038 } 00039 00040 // --------------------------------------------- 00041 00042 AssertHandler::AssertHandler():pt_(ProblemTracker::instance()) 00043 { 00044 } 00045 00046 AssertHandler::~AssertHandler() 00047 { 00048 } 00049 00050 00051 }