00001
00002
00003 #include "VisSimulation/VisSimData/interface/VisSimDataContent.h"
00004 #include "VisSimulation/VisSimData/interface/VisHepMCProductTwig.h"
00005 #include "Iguana/Studio/interface/IgDocumentData.h"
00006 #include "Iguana/Framework/interface/IgTwig.h"
00007 #include "Iguana/Framework/interface/IgRepSet.h"
00008 #include "Iguana/Studio/interface/IgQtLock.h"
00009 #include <classlib/utils/Callback.h>
00010
00011
00012
00013
00014
00015
00016
00017
00018 IG_DEFINE_STATE_ELEMENT (VisSimDataContent, "Data/Simulation/Data Formats");
00019
00020
00021
00022
00023
00025 VisSimDataContent::VisSimDataContent (IgState *state)
00026 : VisContent (state, s_key, MAIN_THREAD,
00027 lat::CreateCallback (this, &VisSimDataContent::init))
00028 {
00029 }
00030
00033 void
00034 VisSimDataContent::init (void)
00035 {
00036 IgQtLock ();
00037
00038 IgTwig *rootTwig = IgDocumentData::get (state ())->root ();
00039 IgTwig *topTwig = 0;
00040 IgTwig *eventTwig = 0;
00041
00042 topTwig = rootTwig->lookup ("CMS Event and Detector");
00043 if (!topTwig) topTwig = new IgSimpleTwig (rootTwig, "CMS Event and Detector");
00044
00045 eventTwig = topTwig->lookup ("CMS Event");
00046 if (!eventTwig) eventTwig = new IgSimpleTwig (topTwig, "CMS Event");
00047
00048 IgTwig *simEventTwig = new IgSimpleTwig (eventTwig, "Simulated Event Data");
00049 new VisHepMCProductTwig (state (), simEventTwig, "HepMC product");
00050 }