00001 //<<<<<< INCLUDES >>>>>> 00002 00003 #include "VisExamples/VisMagFieldDemo/src/VisMagFieldDemoMain.h" 00004 #include "Iguana/Framework/interface/IgTwig.h" 00005 #include "Iguana/Studio/interface/IgDocument.h" 00006 #include "Iguana/Studio/interface/IgDocumentData.h" 00007 #include "Iguana/Studio/interface/IgMDIView.h" 00008 #include "Iguana/Studio/interface/IgPage.h" 00009 #include "Iguana/Studio/interface/IgStudioDriver.h" 00010 #include "Iguana/Studio/interface/IgQtAppStatusBarService.h" 00011 #include "Iguana/Framework/interface/IgExtensionDB.h" 00012 #include "Iguana/Framework/interface/IgState.h" 00013 #include "Iguana/Framework/interface/IgRepSet.h" 00014 #include <qapplication.h> 00015 00016 //<<<<<< PRIVATE DEFINES >>>>>> 00017 //<<<<<< PRIVATE CONSTANTS >>>>>> 00018 //<<<<<< PRIVATE TYPES >>>>>> 00019 //<<<<<< PRIVATE VARIABLE DEFINITIONS >>>>>> 00020 //<<<<<< PUBLIC VARIABLE DEFINITIONS >>>>>> 00021 //<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>> 00022 00023 IG_DEFINE_STATE_ELEMENT (VisMagFieldDemoMain, "Services/Studio/Session Types/CMSSW Demo -- Magnetic Field"); 00024 00025 //<<<<<< PRIVATE FUNCTION DEFINITIONS >>>>>> 00026 //<<<<<< PUBLIC FUNCTION DEFINITIONS >>>>>> 00027 //<<<<<< MEMBER FUNCTION DEFINITIONS >>>>>> 00028 00029 VisMagFieldDemoMain::VisMagFieldDemoMain (IgState *state) 00030 : m_state (state), 00031 m_studio (0), 00032 m_document (0) 00033 { ASSERT (m_state); m_state->put (s_key, this); } 00034 00035 bool 00036 VisMagFieldDemoMain::setup (IgStudioDriver *into) 00037 { 00038 ASSERT (m_state); 00039 ASSERT (! m_studio); 00040 00041 ASSERT (into); 00042 m_studio = into; 00043 00044 // Create document 00045 ASSERT (! m_document); 00046 m_document = new IgDocument (m_studio); 00047 00048 // Change window caption. 00049 m_document->setName ("CMSSW Visualisation Magnetic Field Demo"); 00050 00051 // Fill document 00052 IgPage *page = new IgPage (m_document); 00053 00054 new IgMDIView (page); 00055 00056 // Load all data proxies 00057 m_document->addContentProxy ("Framework/Core"); 00058 m_document->load ("Services/Framework/GUI/", true); 00059 00060 m_document->addContentProxy ("Reco/CMS Magnetic Field"); 00061 m_document->addContentProxy ("Reco/Detector"); 00062 00063 IgRepSet::invalidate (m_document->data ()->root (), IgTwig::STRUCTURE_MASK); 00064 return true; 00065 }