#include <VisSimulation/VisSimBase/interface/VisG4EventContent.h>
Public Member Functions | |
VisG4EventContent (IgState *state) | |
Initialise the event data proxy. | |
Private Member Functions | |
IG_DECLARE_STATE_ELEMENT (VisG4EventContent) | |
void | init (void) |
Actual (in-event-thread) initialisation: add the event twig to the document data tree. |
Definition at line 16 of file VisG4EventContent.h.
VisG4EventContent::VisG4EventContent | ( | IgState * | state | ) |
Initialise the event data proxy.
Definition at line 26 of file VisG4EventContent.cc.
00027 : VisContent (state, s_key, MAIN_THREAD, 00028 lat::CreateCallback (this, &VisG4EventContent::init)) 00029 {}
VisG4EventContent::IG_DECLARE_STATE_ELEMENT | ( | VisG4EventContent | ) | [private] |
Actual (in-event-thread) initialisation: add the event twig to the document data tree.
Definition at line 34 of file VisG4EventContent.cc.
References ASSERT, DBSPlugin::get(), IgRepSet::invalidate(), IgTwig::lookup(), pydbsAccessor::root, IgTwig::SELF_MASK, VisContent::state(), and IgTwig::STRUCTURE_MASK.
00035 { 00036 // FIXME: need to document model registration + browsing support 00037 // FIXME: keep the root hidden and browse subobjects? or rather: 00038 // IgRepSet::lookup (new EventTwig (m_state, root), FIXME, true); 00039 // 00040 // or even keep as it is, and have IgDocumentData have a special 00041 // model that looks for STRUCTURE_MASK events and when they happen, 00042 // IgRepSet::lookup() reps in all registered models? This way we 00043 // don't need to know if root is shown or not, and where what is 00044 // shown -- we just tell there is new data. 00045 qApp->lock (); 00046 00047 // Make sure the event observer is in place. 00048 ASSERT (! VisSimProcessor::get (state ())); 00049 new VisSimProcessor (state ()); 00050 00051 IgTwig *root = IgDocumentData::get (state ())->root (); 00052 if (root->lookup ("CMS Event and Detector")) 00053 new VisG4EventTwig (state (), root->lookup ("CMS Event and Detector")); 00054 else 00055 new VisG4EventTwig (state (), root); 00056 00057 // Ditto for status bar indicator. 00058 ASSERT (! VisG4EventStatus::get (state ())); 00059 new VisG4EventStatus (state ()); 00060 00061 IgRepSet::invalidate (root, IgTwig::SELF_MASK | IgTwig::STRUCTURE_MASK); 00062 qApp->unlock (false); 00063 }