CMS 3D CMS Logo

VisG4GeomContent.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "VisSimulation/VisSimBase/interface/VisG4GeomContent.h"
00004 #include "VisSimulation/VisSimBase/interface/VisG4GeomTwig.h"
00005 #include "Iguana/Studio/interface/IgDocumentData.h"
00006 #include "Iguana/Studio/interface/IgQtObjectMenuService.h"
00007 #include "Iguana/Framework/interface/IgRepSet.h"
00008 #include <classlib/utils/Callback.h>
00009 #include <qapplication.h>
00010 
00011 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00012 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00013 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00014 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00015 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00016 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00017 
00018 IG_DEFINE_STATE_ELEMENT (VisG4GeomContent, "Data/Simulation/Geometry");
00019 
00020 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00021 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00022 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00023 
00025 VisG4GeomContent::VisG4GeomContent (IgState *state)
00026     : VisContent (state, s_key, MAIN_THREAD,
00027                   lat::CreateCallback (this, &VisG4GeomContent::init))
00028 {}
00029 
00032 void
00033 VisG4GeomContent::init (void)
00034 {
00035     // FIXME: need to document model registration + browsing support
00036     qApp->lock ();
00037     IgTwig *root = IgDocumentData::get (state ())->root ();
00038     if (root->lookup ("CMS Event and Detector"))
00039         new VisG4GeomTwig (state (), root->lookup ("CMS Event and Detector"));
00040     else
00041         new VisG4GeomTwig (state (), root);
00042 
00043     ASSERT (IgQtObjectMenuService::get (state ()));
00044 
00045     IgRepSet::invalidate (root, IgTwig::SELF_MASK | IgTwig::STRUCTURE_MASK);
00046     qApp->unlock (false);
00047 }

Generated on Tue Jun 9 17:50:29 2009 for CMSSW by  doxygen 1.5.4