CMS 3D CMS Logo

IgQtAppDebug Class Reference

#include <Iguana/Studio/interface/IgQtAppDebug.h>

List of all members.

Public Slots

void debugme (void)
void dumpState (void)
void libraries (void)
void plugins (void)
void resources (void)
void rundebug (void)
void showProfiler (void)

Public Member Functions

 IgQtAppDebug (IgState *state, QWidget *parent=0)
 ~IgQtAppDebug (void)

Private Member Functions

 IgQtAppDebug (const IgQtAppDebug &)
IgQtAppDebugoperator= (const IgQtAppDebug &)

Private Attributes

IgQtAppDebugInfom_info [4]
QWidget * m_parent
IgStatem_state

Static Private Attributes

static bool m_profiler = false


Detailed Description

Definition at line 94 of file IgQtAppDebug.h.


Constructor & Destructor Documentation

IgQtAppDebug::IgQtAppDebug ( IgState state,
QWidget *  parent = 0 
)

Definition at line 381 of file IgQtAppDebug.cc.

References m_info.

00382     : m_state (state),
00383       m_parent (parent)
00384 {
00385     m_info [0] = m_info [1] = m_info [2] = m_info [3] = 0; 
00386 }

IgQtAppDebug::~IgQtAppDebug ( void   ) 

Definition at line 388 of file IgQtAppDebug.cc.

References m_info.

00389 {
00390     // FIXME: Does qt do these automatically?
00391     delete m_info [3];
00392     delete m_info [2];
00393     delete m_info [1];
00394     delete m_info [0];
00395 }

IgQtAppDebug::IgQtAppDebug ( const IgQtAppDebug  )  [private]


Member Function Documentation

void IgQtAppDebug::debugme ( void   )  [slot]

Definition at line 434 of file IgQtAppDebug.cc.

References rundebug().

00435 {
00436     // Install a single-shot timer to start the debugger once the
00437     // event queue has been drained and the menu popped down.
00438     QTimer::singleShot (0, this, SLOT(rundebug()));
00439 }

void IgQtAppDebug::dumpState ( void   )  [slot]

Definition at line 425 of file IgQtAppDebug.cc.

References IgQtAppDebugInfo::info(), m_info, m_parent, and m_state.

00426 {
00427     if (! m_info [3])
00428         m_info [3] = new IgQtAppDumpStateInfo (m_state, m_parent);
00429 
00430     m_info [3]->info ();
00431 }

void IgQtAppDebug::libraries ( void   )  [slot]

Definition at line 407 of file IgQtAppDebug.cc.

References IgQtAppDebugInfo::info(), m_info, and m_parent.

00408 {
00409     if (! m_info [1])
00410         m_info [1] = new IgQtAppDebugLibrariesInfo (m_parent);
00411 
00412     m_info [1]->info ();
00413 }

IgQtAppDebug& IgQtAppDebug::operator= ( const IgQtAppDebug  )  [private]

void IgQtAppDebug::plugins ( void   )  [slot]

Definition at line 416 of file IgQtAppDebug.cc.

References IgQtAppDebugInfo::info(), m_info, m_parent, and m_state.

00417 {
00418     if (! m_info [2])
00419         m_info [2] = new IgQtAppDebugPluginsInfo (m_state, m_parent);
00420 
00421     m_info [2]->info ();
00422 }

void IgQtAppDebug::resources ( void   )  [slot]

Definition at line 398 of file IgQtAppDebug.cc.

References IgQtAppDebugInfo::info(), m_info, and m_parent.

00399 {
00400     if (! m_info [0])
00401         m_info [0] = new IgQtAppDebugResourceInfo (m_parent);
00402 
00403     m_info [0]->info ();
00404 }

void IgQtAppDebug::rundebug ( void   )  [slot]

Definition at line 442 of file IgQtAppDebug.cc.

References lat::ProcessInfo::fullProgramName(), and lat::ProcessInfo::pid().

Referenced by debugme().

00443 {
00444     // FIXME: Better logic to figure out best debugger to use.
00445 
00446     std::string programName = lat::ProcessInfo::fullProgramName ();
00447 
00448     char buf [512]; // must reserve space for entire program name+pid
00449 
00450     sprintf (buf, "ddd %s %s %ld &",
00451 #ifdef __SUNPRO_CC
00452              "--dbx",
00453 #else
00454              "--gdb",
00455 #endif
00456              programName.c_str (),
00457              (long) lat::ProcessInfo::pid ());
00458     
00459     system (buf);
00460 }

void IgQtAppDebug::showProfiler ( void   )  [slot]

Definition at line 463 of file IgQtAppDebug.cc.

References ASSERT, hlt_scaler_cfg::critical, IgExtensionDB::get(), DBSPlugin::get(), it, IgPluginFactory< I >::locate(), m_profiler, m_state, IgQtAppDebugService::MENU_ID_DEBUG, IgQtAppDebugService::MENU_ID_DEBUG_PROFILER, and profilereader::profile.

00464 {
00465     if (!m_profiler)
00466     {
00467       //Now load the Oprofile plugin.
00468       IgExtensionDB::Iterator it = IgExtensionDB::get ()->locate ("Extensions/Profiler/OProfile");
00469       if (*it != 0)
00470       {
00471         m_profiler = true;
00472         QPopupMenu *profile = IgQtAppMenuService::get(m_state)->subMenu(IgQtAppDebugService::MENU_ID_DEBUG);
00473         profile->disconnectItem (IgQtAppDebugService::MENU_ID_DEBUG_PROFILER, this, SLOT(showProfiler()));
00474           
00475         ASSERT (IgPluginLoader::get (m_state));
00476         IgPluginLoader::get (m_state)->load (m_state, "Extensions/Profiler/OProfile", true);
00477       }
00478       else
00479         QMessageBox::critical (0, "IGUANA", "You do not seem to have"
00480                                "\"Extensions/Profiler/OProfile\" plugin installed.");
00481    }
00482 }


Member Data Documentation

IgQtAppDebugInfo* IgQtAppDebug::m_info[4] [private]

Definition at line 115 of file IgQtAppDebug.h.

Referenced by dumpState(), IgQtAppDebug(), libraries(), plugins(), resources(), and ~IgQtAppDebug().

QWidget* IgQtAppDebug::m_parent [private]

Definition at line 114 of file IgQtAppDebug.h.

Referenced by dumpState(), libraries(), plugins(), and resources().

bool IgQtAppDebug::m_profiler = false [static, private]

Definition at line 111 of file IgQtAppDebug.h.

Referenced by showProfiler().

IgState* IgQtAppDebug::m_state [private]

Definition at line 113 of file IgQtAppDebug.h.

Referenced by dumpState(), plugins(), and showProfiler().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:26 2009 for CMSSW by  doxygen 1.5.4