CMS 3D CMS Logo

VisTrackerGeometryTwig Class Reference

#include <VisFramework/VisEventSetup/interface/VisTrackerGeometryTwig.h>

Inheritance diagram for VisTrackerGeometryTwig:

VisQueuedTwig IgSimpleTwig VisEventObserver IgCompoundTwig IgTwig IgRepresentable

List of all members.

Public Member Functions

virtual void onNewEvent (const edm::Event &event, const edm::EventSetup &eventSetup)
virtual void update (IgRZRep *rep)
virtual void update (IgRPhiRep *rep)
virtual void update (Ig3DRep *rep)
virtual void update (IgTextRep *rep)
 VisTrackerGeometryTwig (IgState *state, IgTwig *parent, const std::string &name="")
virtual ~VisTrackerGeometryTwig (void)
 Clean the scene graph.

Private Member Functions

void invalidate (void)

Private Attributes

SoSeparator * m_3dDet
bool m_3Ddone
VisAnnotateGeometry m_annotate
SoSeparator * m_rphiDet
bool m_rphidone
SoSeparator * m_rzDet
bool m_rzdone


Detailed Description

Definition at line 25 of file VisTrackerGeometryTwig.h.


Constructor & Destructor Documentation

VisTrackerGeometryTwig::VisTrackerGeometryTwig ( IgState state,
IgTwig parent,
const std::string &  name = "" 
)

Definition at line 23 of file VisTrackerGeometryTwig.cc.

00025     : VisQueuedTwig (state, parent, name),
00026       m_3dDet (NULL),
00027       m_rzDet (NULL),
00028       m_rphiDet (NULL),
00029       m_3Ddone (false),
00030       m_rzdone (false),
00031       m_rphidone (false),
00032       m_annotate (state, lat::CreateCallback (this, &VisTrackerGeometryTwig::invalidate))
00033 {}

VisTrackerGeometryTwig::~VisTrackerGeometryTwig ( void   )  [virtual]

Clean the scene graph.

Definition at line 36 of file VisTrackerGeometryTwig.cc.

References m_3dDet, m_rphiDet, m_rzDet, and NULL.

00037 {
00038     if (m_3dDet != NULL) m_3dDet->unref ();
00039     if (m_rzDet != NULL) m_rzDet->unref ();
00040     if (m_rphiDet != NULL) m_rphiDet->unref ();
00041 }


Member Function Documentation

void VisTrackerGeometryTwig::invalidate ( void   )  [private]

Definition at line 44 of file VisTrackerGeometryTwig.cc.

References m_3dDet, m_3Ddone, m_rphiDet, m_rphidone, m_rzDet, m_rzdone, NULL, and VisQueuedTwig::onBaseInvalidate().

Referenced by onNewEvent().

00045 {
00046     if (m_3dDet != NULL) m_3dDet->unref ();
00047     if (m_rzDet != NULL) m_rzDet->unref ();
00048     if (m_rphiDet != NULL) m_rphiDet->unref ();
00049     m_3Ddone = false;    
00050     m_rzdone = false;
00051     m_rphidone = false;
00052 
00053     VisQueuedTwig::onBaseInvalidate ();
00054 }

void VisTrackerGeometryTwig::onNewEvent ( const edm::Event event,
const edm::EventSetup eventSetup 
) [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 57 of file VisTrackerGeometryTwig.cc.

References ASSERT, DBSPlugin::get(), invalidate(), VisQueuedTwig::onNewEvent(), VisQueuedTwig::state(), and VisEventSetupService::trackerGeomChanged().

00059 {
00060     // Get debugging dump.
00061     VisQueuedTwig::onNewEvent (event, eventSetup);
00062 
00063     VisEventSetupService *esService = VisEventSetupService::get (state ());
00064     ASSERT (esService);
00065 
00066     if (esService->trackerGeomChanged ())
00067         invalidate ();
00068 }

void VisTrackerGeometryTwig::update ( IgRZRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 159 of file VisTrackerGeometryTwig.cc.

References VisEventSetupService::annotateTracker(), ASSERT, VisEventSetupService::buildTracker(), Ig3DBaseRep::clear(), DBSPlugin::get(), m_annotate, m_rzDet, m_rzdone, Ig3DBaseRep::node(), NULL, VisEventSetupService::RZDet, VisQueuedTwig::state(), VisQueuedTwig::update(), and VisActiveConfigurable< T >::value().

00160 {
00161     // Get debugging dump.
00162     VisQueuedTwig::update (rep);
00163 
00164     IgQtLock ();
00165     rep->clear ();
00166     
00167     if (! m_rzdone)
00168     {
00169         VisEventSetupService *esService = VisEventSetupService::get (state ());
00170         ASSERT (esService);
00171 
00172         m_rzDet = esService->buildTracker (VisEventSetupService::RZDet, this->name ());
00173 
00174         if (m_rzDet == NULL) return;
00175 
00176         if (m_annotate.value ())
00177         {
00178             SoSeparator *sep = esService->annotateTracker (VisEventSetupService::RZDet, this->name ());
00179             if (sep != NULL) m_rzDet->addChild (sep);
00180         }
00181 
00182         m_rzDet->ref ();        
00183         m_rzdone = true;        
00184     }
00185     rep->node ()->addChild (m_rzDet);
00186 }

void VisTrackerGeometryTwig::update ( IgRPhiRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 129 of file VisTrackerGeometryTwig.cc.

References VisEventSetupService::annotateTracker(), ASSERT, VisEventSetupService::buildTracker(), Ig3DBaseRep::clear(), DBSPlugin::get(), m_annotate, m_rphiDet, m_rphidone, Ig3DBaseRep::node(), NULL, VisEventSetupService::RPhiDet, VisQueuedTwig::state(), VisQueuedTwig::update(), and VisActiveConfigurable< T >::value().

00130 {
00131     // Get debugging dump.
00132     VisQueuedTwig::update (rep);
00133 
00134     IgQtLock ();
00135     rep->clear ();
00136     
00137     if (! m_rphidone)
00138     {
00139         VisEventSetupService *esService = VisEventSetupService::get (state ());
00140         ASSERT (esService);
00141 
00142         m_rphiDet = esService->buildTracker (VisEventSetupService::RPhiDet, this->name ());
00143 
00144         if (m_rphiDet == NULL) return;
00145 
00146         if (m_annotate.value ())
00147         {           
00148             SoSeparator *sep = esService->annotateTracker (VisEventSetupService::RPhiDet, this->name ());
00149             if (sep != NULL) m_rphiDet->addChild (sep);     
00150         }
00151         
00152         m_rphiDet->ref ();
00153         m_rphidone = true;
00154     }    
00155     rep->node ()->addChild (m_rphiDet);
00156 }

void VisTrackerGeometryTwig::update ( Ig3DRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 99 of file VisTrackerGeometryTwig.cc.

References VisEventSetupService::annotateTracker(), ASSERT, VisEventSetupService::buildTracker(), Ig3DBaseRep::clear(), VisEventSetupService::FullDet, DBSPlugin::get(), m_3dDet, m_3Ddone, m_annotate, Ig3DBaseRep::node(), NULL, VisQueuedTwig::state(), VisQueuedTwig::update(), and VisActiveConfigurable< T >::value().

00100 {
00101     // Get debugging dump.
00102     VisQueuedTwig::update (rep);
00103 
00104     IgQtLock ();
00105     rep->clear ();
00106 
00107     if (! m_3Ddone)
00108     {
00109         VisEventSetupService *esService = VisEventSetupService::get (state ());
00110         ASSERT (esService);
00111 
00112         m_3dDet = esService->buildTracker (VisEventSetupService::FullDet, this->name ());
00113 
00114         if (m_3dDet == NULL) return;
00115 
00116         if (m_annotate.value ())
00117         {           
00118             SoSeparator *sep = esService->annotateTracker (VisEventSetupService::FullDet, this->name ());
00119             if (sep != NULL) m_3dDet->addChild (sep);       
00120         }
00121 
00122         m_3dDet->ref ();
00123         m_3Ddone = true;        
00124     }   
00125     rep->node ()->addChild (m_3dDet);
00126 }

void VisTrackerGeometryTwig::update ( IgTextRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 71 of file VisTrackerGeometryTwig.cc.

References ASSERT, DBSPlugin::get(), IgSimpleTwig::name(), IgTextRep::setText(), VisQueuedTwig::state(), VisEventSetupService::trackerTextRep(), and VisQueuedTwig::update().

00072 {
00073     // Get debugging dump.
00074     VisQueuedTwig::update (rep);
00075 
00076     // Prepare property description.
00077     std::ostringstream  text;
00078     text << "CMS Tracker Geometry: ";
00079     text << this->name () << "<br>";
00080     
00081     text << "<table width='100%' border=1>"
00082          << "<TR align = center>"
00083          << "<TH>#</TH>"
00084          << "<TH>Det ID</TH>"
00085          << "<TH>Position</TH>"
00086          << "</TR>";
00087 
00088     VisEventSetupService *esService = VisEventSetupService::get (state ());
00089     ASSERT (esService);
00090     
00091     text << esService->trackerTextRep (this->name ());
00092     text << "</table>";
00093 
00094     IgQtLock ();
00095     rep->setText (text.str ());
00096 }


Member Data Documentation

SoSeparator* VisTrackerGeometryTwig::m_3dDet [private]

Definition at line 47 of file VisTrackerGeometryTwig.h.

Referenced by invalidate(), update(), and ~VisTrackerGeometryTwig().

bool VisTrackerGeometryTwig::m_3Ddone [private]

Definition at line 50 of file VisTrackerGeometryTwig.h.

Referenced by invalidate(), and update().

VisAnnotateGeometry VisTrackerGeometryTwig::m_annotate [private]

Definition at line 53 of file VisTrackerGeometryTwig.h.

Referenced by update().

SoSeparator* VisTrackerGeometryTwig::m_rphiDet [private]

Definition at line 49 of file VisTrackerGeometryTwig.h.

Referenced by invalidate(), update(), and ~VisTrackerGeometryTwig().

bool VisTrackerGeometryTwig::m_rphidone [private]

Definition at line 52 of file VisTrackerGeometryTwig.h.

Referenced by invalidate(), and update().

SoSeparator* VisTrackerGeometryTwig::m_rzDet [private]

Definition at line 48 of file VisTrackerGeometryTwig.h.

Referenced by invalidate(), update(), and ~VisTrackerGeometryTwig().

bool VisTrackerGeometryTwig::m_rzdone [private]

Definition at line 51 of file VisTrackerGeometryTwig.h.

Referenced by invalidate(), and update().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:35:41 2009 for CMSSW by  doxygen 1.5.4