#include <VisReco/VisMagneticField/interface/VisCMSMagFieldContent.h>
Public Member Functions | |
VisCMSMagFieldContent (IgState *state) | |
Initialise the CMS magnetic field data content. | |
Private Member Functions | |
IG_DECLARE_STATE_ELEMENT (VisCMSMagFieldContent) | |
void | init (void) |
Actual (in-event-thread) initialisation: add the magnetic field twig to the document data tree. |
Definition at line 16 of file VisCMSMagFieldContent.h.
VisCMSMagFieldContent::VisCMSMagFieldContent | ( | IgState * | state | ) |
Initialise the CMS magnetic field data content.
Definition at line 26 of file VisCMSMagFieldContent.cc.
00027 : VisContent (state, s_key, MAIN_THREAD, 00028 lat::CreateCallback (this, &VisCMSMagFieldContent::init)) 00029 { 00030 }
VisCMSMagFieldContent::IG_DECLARE_STATE_ELEMENT | ( | VisCMSMagFieldContent | ) | [private] |
Actual (in-event-thread) initialisation: add the magnetic field twig to the document data tree.
Definition at line 35 of file VisCMSMagFieldContent.cc.
References DBSPlugin::get(), IgRepSet::invalidate(), IgTwig::lookup(), VisCMSMagFieldTwig::onNewEvent(), IgTwig::SELF_MASK, VisContent::state(), and IgTwig::STRUCTURE_MASK.
00036 { 00037 // FIXME: need to document model registration + browsing support 00038 IgQtLock (); 00039 00040 IgTwig *rootTwig = IgDocumentData::get (state ())->root (); 00041 IgTwig *topTwig = 0; 00042 00043 topTwig = rootTwig->lookup ("CMS Event and Detector"); 00044 if (!topTwig) topTwig = new IgSimpleTwig (rootTwig, "CMS Event and Detector"); 00045 00046 IgTwig *annotations = 0; 00047 annotations = topTwig->lookup ("Annotations"); 00048 00049 if (! annotations) 00050 annotations = new IgSimpleTwig (topTwig, "Annotations"); 00051 00052 VisCMSMagFieldTwig *magFieldTwig = new VisCMSMagFieldTwig (annotations, state ()); 00053 00054 if (VisEventProcessorService *procService = VisEventProcessorService::get (state ())) 00055 { 00056 (*procService)->postProcessEventSignal().connect (sigc::mem_fun (magFieldTwig, &VisCMSMagFieldTwig::onNewEvent)); 00057 } 00058 else 00059 if (IgQtAppStatusBarService *sbar = IgQtAppStatusBarService::get (state ())) 00060 { 00061 sbar->setMessage ("ERROR: EventProcessor initialisation failed."); 00062 } 00063 00064 IgRepSet::invalidate (rootTwig, IgTwig::SELF_MASK | IgTwig::STRUCTURE_MASK); 00065 }