CMS 3D CMS Logo

IgNTupleAppSetup Class Reference

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

Inheritance diagram for IgNTupleAppSetup:

IgStudioSetupExtension IgExtension IgStateElement

List of all members.

Public Member Functions

 IgNTupleAppSetup (IgState *state)
bool setup (IgStudioDriver *into)
IgStatestate (void) const
IgStudioDriverstudio (void) const
 ~IgNTupleAppSetup (void)

Private Member Functions

 IG_DECLARE_STATE_ELEMENT (IgNTupleAppSetup)

Private Attributes

IgStatem_state
IgStudioDriverm_studio


Detailed Description

Definition at line 20 of file IgNTupleAppSetup.h.


Constructor & Destructor Documentation

IgNTupleAppSetup::IgNTupleAppSetup ( IgState state  ) 

Definition at line 24 of file IgNTupleAppSetup.cc.

References ASSERT, m_state, and IgState::put().

00025     : m_state (state),
00026       m_studio (0)
00027 { ASSERT (m_state); m_state->put (s_key, this); }

IgNTupleAppSetup::~IgNTupleAppSetup ( void   ) 

Definition at line 30 of file IgNTupleAppSetup.cc.

References ASSERT, IgState::detach(), and m_state.

00031 {ASSERT (m_state); m_state->detach (s_key);}


Member Function Documentation

IgNTupleAppSetup::IG_DECLARE_STATE_ELEMENT ( IgNTupleAppSetup   )  [private]

bool IgNTupleAppSetup::setup ( IgStudioDriver into  )  [virtual]

Reimplemented from IgStudioSetupExtension.

Definition at line 34 of file IgNTupleAppSetup.cc.

References ASSERT, IgExtensionDB::get(), DBSPlugin::get(), m_state, m_studio, name, and IgNTupleAppExtension::setup().

00035 {
00036     ASSERT (m_state);
00037     ASSERT (into);
00038     ASSERT (!m_studio);
00039 
00040     m_studio = into;
00041 
00042     static const char           name [] = "Services/Generic/NTuple";
00043     IgNTupleAppExtension *      app = 0;
00044     IgExtension *               newext = 0;
00045 
00046     try
00047     {
00048         // Try to instantiate it
00049         QApplication::setOverrideCursor (Qt::waitCursor);
00050         IgQtAppStatusBarService::get (m_state)
00051             ->setMessage ("Building NTuple browser app...");
00052 
00053         newext = IgExtensionDB::get ()->create (name, m_state);
00054 
00055         // Make sure we got what we expect
00056         ASSERT (newext);
00057         ASSERT (dynamic_cast<IgNTupleAppExtension *> (newext));
00058         app = static_cast<IgNTupleAppExtension *> (newext);
00059 
00060         // Try to set it up
00061         app->setup (this);
00062        
00063         IgQtAppStatusBarService::get (m_state)
00064             ->setMessage ("NTuple browser is loaded.");
00065 
00066         QApplication::restoreOverrideCursor ();
00067     }
00068     // FIXME: too broad...
00069     catch (...)
00070     {
00071         QApplication::restoreOverrideCursor ();
00072         return EXIT_FAILURE;
00073     }
00074 
00075     return true;
00076 }

IgState * IgNTupleAppSetup::state ( void   )  const

Definition at line 79 of file IgNTupleAppSetup.cc.

References m_state.

00080 { return m_state; }

IgStudioDriver * IgNTupleAppSetup::studio ( void   )  const

Definition at line 83 of file IgNTupleAppSetup.cc.

References m_studio.

Referenced by IgNTupleAppMain::setup().

00084 { return m_studio; }


Member Data Documentation

IgState* IgNTupleAppSetup::m_state [private]

Definition at line 35 of file IgNTupleAppSetup.h.

Referenced by IgNTupleAppSetup(), setup(), state(), and ~IgNTupleAppSetup().

IgStudioDriver* IgNTupleAppSetup::m_studio [private]

Definition at line 36 of file IgNTupleAppSetup.h.

Referenced by setup(), and studio().


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