#include <Iguana/Framework/interface/IgTwig.h>
Public Types | |
typedef std::map< std::string, GetSetPair > | Attributes |
typedef std::pair< Getter, Setter > | GetSetPair |
typedef lat::Callback1 < IgDatum *& > | Getter |
typedef lat::Callback1< const IgDatum * > | Setter |
Public Member Functions | |
virtual void | add (IgTwig *child) |
virtual void | added (IgTwig *parent) |
virtual void | attributes (Attributes &attrs) |
virtual void | cascade (bool value)=0 |
virtual bool | cascade (void) const =0 |
virtual IgTwig * | child (unsigned index) |
virtual unsigned | children (void) |
virtual void | clear (void) |
virtual void | cleared (IgTwig *parent) |
virtual void | destroy (void) |
virtual bool | expand (void) |
virtual std::string | fullName (void) |
IgTwig (IgTwig *parent=0) | |
virtual unsigned | indexOf (const IgTwig *child) const |
IgTwig * | lookup (const std::string &path) |
virtual void | name (const std::string &name)=0 |
virtual std::string | name (void) const =0 |
virtual IgTwig * | parent (void) const |
virtual void | remove (IgTwig *child) |
virtual void | removed (IgTwig *parent) |
virtual IgTwig * | root (void) const |
virtual void | selfTraverse (bool value)=0 |
virtual bool | selfTraverse (void) const =0 |
virtual void | selfVisible (bool value)=0 |
virtual bool | selfVisible (void) const =0 |
virtual bool | traverse (void) const |
virtual bool | visible (void) const |
~IgTwig (void) | |
Static Public Attributes | |
static const int | FLAGS_MASK = 4 |
Flag for IgBrowserMethods::update() field indicating that the flags for this twig have changed in a way that affects the whether this twig should have a representation or not, but not its children or (in general) what the representation should be like. | |
static const int | SELF_MASK = 2 |
Flag for IgBrowserMethods::update() field indicating that the twig itself has changed: its name or any other content that is restricted to the twig itself but not affecting its children. | |
static const int | STRUCTURE_MASK = 1 |
Flag for IgBrowserMethods::update() field indicating that the substructure of the twig has changed. | |
Private Member Functions | |
void | getCascadeAttribute (IgDatum *&result) |
void | getNameAttribute (IgDatum *&result) |
void | getTraverseAttribute (IgDatum *&result) |
void | getVisibleAttribute (IgDatum *&result) |
IgTwig (const IgTwig &) | |
IgTwig & | operator= (const IgTwig &) |
void | setCascadeAttribute (const IgDatum *value) |
void | setNameAttribute (const IgDatum *value) |
void | setTraverseAttribute (const IgDatum *value) |
void | setVisibleAttribute (const IgDatum *value) |
Private Attributes | |
IgTwig * | m_parent |
Static Private Attributes | |
static const char | s_cascade [] = "Cascade" |
static const char | s_name [] = "Name" |
static const char | s_traverse [] = "Traverse" |
static const char | s_visible [] = "Visible" |
Definition at line 24 of file IgTwig.h.
typedef std::map<std::string, GetSetPair> IgTwig::Attributes |
typedef std::pair<Getter,Setter> IgTwig::GetSetPair |
typedef lat::Callback1<IgDatum *&> IgTwig::Getter |
typedef lat::Callback1<const IgDatum *> IgTwig::Setter |
IgTwig::IgTwig | ( | IgTwig * | parent = 0 |
) |
IgTwig::IgTwig | ( | const IgTwig & | ) | [private] |
void IgTwig::attributes | ( | Attributes & | attrs | ) | [virtual] |
Definition at line 101 of file IgTwig.cc.
References lat::CreateCallback(), getCascadeAttribute(), getNameAttribute(), getTraverseAttribute(), getVisibleAttribute(), s_cascade, s_name, s_traverse, s_visible, setCascadeAttribute(), setNameAttribute(), setTraverseAttribute(), and setVisibleAttribute().
00102 { 00103 attrs [s_name] 00104 = GetSetPair (lat::CreateCallback (this, &IgTwig::getNameAttribute), 00105 lat::CreateCallback (this, &IgTwig::setNameAttribute)); 00106 00107 attrs [s_traverse] 00108 = GetSetPair (lat::CreateCallback (this, &IgTwig::getTraverseAttribute), 00109 lat::CreateCallback (this, &IgTwig::setTraverseAttribute)); 00110 00111 attrs [s_visible] 00112 = GetSetPair (lat::CreateCallback (this, &IgTwig::getVisibleAttribute), 00113 lat::CreateCallback (this, &IgTwig::setVisibleAttribute)); 00114 00115 attrs [s_cascade] 00116 = GetSetPair (lat::CreateCallback (this, &IgTwig::getCascadeAttribute), 00117 lat::CreateCallback (this, &IgTwig::setCascadeAttribute)); 00118 }
Implemented in IgSimpleTwig, VisEventContentTwig, and VisG4VolumeTwig.
Implemented in IgSimpleTwig, VisEventContentTwig, and VisG4VolumeTwig.
Referenced by IgIVView::dump(), getCascadeAttribute(), VisEventSetupContent::init(), MMM_DEFUN_FUNC(), and setCascadeAttribute().
IgTwig * IgTwig::child | ( | unsigned | index | ) | [virtual] |
Reimplemented in IgCompoundTwig.
Definition at line 47 of file IgTwig.cc.
References ASSERT.
Referenced by IgWebTreeService::browse(), IgTwigOps::doHide(), IgTwigOps::doShow(), IgIVView::dump(), lookup(), MMM_DEFUN_FUNC(), postMake3DRep(), and postMakeXMLRep().
00048 { ASSERT (false); return 0; }
unsigned IgTwig::children | ( | void | ) | [virtual] |
Reimplemented in IgCompoundTwig.
Definition at line 43 of file IgTwig.cc.
Referenced by IgWebTreeService::browse(), VisG4Navigator::build(), IgTwigOps::doHide(), IgTwigOps::doShow(), IgIVView::dump(), lookup(), MMM_DEFUN_FUNC(), postMake3DRep(), and postMakeXMLRep().
Reimplemented in IgCompoundTwig, and IgSoTwig.
Definition at line 75 of file IgTwig.cc.
Referenced by IgSoTwig::destroy().
Reimplemented in IgCompoundTwig, VisEventContentTwig, and VisG4VolumeTwig.
Definition at line 55 of file IgTwig.cc.
Referenced by IgWebTreeService::browse(), IgTwigOps::doShow(), MMM_DEFUN_FUNC(), postMake3DRep(), and postMakeXMLRep().
std::string IgTwig::fullName | ( | void | ) | [virtual] |
Definition at line 83 of file IgTwig.cc.
References name(), parent(), and HLT_VtxMuL3::result.
Referenced by VisG4TwigOps::doApplyFilter(), drawVolumeTwig(), MMM_DEFUN_FUNC(), VisDetIvTwig::VisDetIvTwig(), and VisQueuedTwig::VisQueuedTwig().
00084 { 00085 IgTwig *currentTwig = this; 00086 std::string result = "/"+currentTwig->name (); 00087 while (currentTwig->parent ()) 00088 { 00089 result = "/" + currentTwig->parent ()->name () + result; 00090 currentTwig = currentTwig->parent (); 00091 } 00092 return result; 00093 }
Definition at line 166 of file IgTwig.cc.
References ASSERT, and cascade().
Referenced by attributes().
00167 { 00168 ASSERT (! result); 00169 result = new IgBoolDatum (cascade ()); 00170 }
Definition at line 121 of file IgTwig.cc.
References ASSERT, and name().
Referenced by attributes().
00122 { 00123 ASSERT (! result); 00124 result = new IgStringDatum (name ()); 00125 }
Definition at line 136 of file IgTwig.cc.
References ASSERT, and selfTraverse().
Referenced by attributes().
00137 { 00138 ASSERT (! result); 00139 result = new IgBoolDatum (selfTraverse ()); 00140 }
Definition at line 151 of file IgTwig.cc.
References ASSERT, and selfVisible().
Referenced by attributes().
00152 { 00153 ASSERT (! result); 00154 result = new IgBoolDatum (selfVisible ()); 00155 }
unsigned IgTwig::indexOf | ( | const IgTwig * | child | ) | const [virtual] |
Reimplemented in IgCompoundTwig.
Definition at line 51 of file IgTwig.cc.
References ASSERT.
Referenced by MMM_DEFUN_FUNC().
00052 { ASSERT (false); return 0; }
IgTwig * IgTwig::lookup | ( | const std::string & | path | ) |
Definition at line 193 of file IgTwig.cc.
References child(), children(), i, name(), parent(), and split.
Referenced by IgWebTreeService::browse(), createThisTwig(), IgWebTreeService::getRepID(), VisEventSetupContent::init(), VisHcalRecoContent::init(), VisG4MagFieldContent::init(), VisRecoCandidateContent::init(), VisSimDataContent::init(), VisTkSimContent::init(), VisEcalRecoContent::init(), VisMuonContent::init(), VisTkRecoContent::init(), VisG4EventContent::init(), VisMETRecoContent::init(), VisRecoToolsContent::init(), VisCuTkRecoContent::init(), VisPFContent::init(), VisRecoJetContent::init(), VisMuonCSCContent::init(), VisTriggerContent::init(), VisCMSMagFieldContent::init(), VisG4GeomContent::init(), VisG4TracksContent::init(), VisRPCContent::init(), VisDetContent::init(), VisSimHitsContent::init(), and VisMuonDTContent::init().
00194 { 00195 IgTwig *currentTwig = this; 00196 00197 using namespace lat; 00198 00199 StringList stringList = StringOps::split (path, "/", 00200 StringOps::KeepLeadingEmpty); 00201 00202 for (StringList::iterator i = stringList.begin (); 00203 i != stringList.end (); 00204 i++) 00205 { 00206 std::string &pathUnit = *i; 00207 00208 if (pathUnit == "") 00209 { 00210 while (currentTwig->parent () != 0) 00211 { 00212 currentTwig = currentTwig->parent (); 00213 } 00214 } 00215 else if (pathUnit == "..") 00216 { 00217 if (currentTwig->parent ()); 00218 { 00219 currentTwig = currentTwig->parent (); 00220 } 00221 } 00222 else 00223 { 00224 bool notDone = true; 00225 for (unsigned int i = 0; 00226 notDone && i < currentTwig->children (); 00227 i++) 00228 { 00229 IgTwig *twig = currentTwig->child (i); 00230 if (twig->name () == pathUnit) 00231 { 00232 currentTwig = twig; 00233 notDone = false; 00234 } 00235 } 00236 } 00237 } 00238 return currentTwig; 00239 }
virtual void IgTwig::name | ( | const std::string & | name | ) | [pure virtual] |
Implemented in IgSimpleTwig, VisEventContentTwig, and VisG4VolumeTwig.
virtual std::string IgTwig::name | ( | void | ) | const [pure virtual] |
Implemented in IgSimpleTwig, VisEventContentTwig, and VisG4VolumeTwig.
Referenced by IgIVView::dump(), IgDocumentData::find(), fullName(), getNameAttribute(), lookup(), MMM_DEFUN_FUNC(), postMake3DRep(), postMakeXMLRep(), preMake3DRep(), preMakeXMLRep(), and setNameAttribute().
Definition at line 39 of file IgTwig.cc.
References m_parent.
Referenced by VisG4TwigOps::actionAppearance(), VisG4TwigOps::actionApplyFilter(), IgTwigOps::actionEnable(), VisG4TwigOps::actionShowCategory(), VisG4TwigOps::actionShowMaterial(), createThisTwig(), VisG4TwigOps::doApplyFilter(), drawVolumeTwig(), findRepresentedAncestor(), fullName(), lookup(), MMM_DEFUN_FUNC(), VisG4VolumeTwig::paths(), preMake3DRep(), preMakeXMLRep(), traverse(), and visible().
00040 { return m_parent; }
Definition at line 35 of file IgTwig.cc.
References m_parent, and root().
Referenced by IgTwigOps::actionVisible(), IgSoTwig::buildFromOther(), drawVolumeTwig(), and root().
Implemented in IgSimpleTwig, VisEventContentTwig, and VisG4VolumeTwig.
Implemented in IgSimpleTwig, VisEventContentTwig, and VisG4VolumeTwig.
Referenced by IgTwigOps::actionEnable(), IgWebTreeService::browse(), IgTwigOps::doShow(), getTraverseAttribute(), IgTwigOps::menuUpdate(), MMM_DEFUN_FUNC(), setTraverseAttribute(), and traverse().
Implemented in IgSimpleTwig, VisEventContentTwig, and VisG4VolumeTwig.
Implemented in IgSimpleTwig, VisEventContentTwig, and VisG4VolumeTwig.
Referenced by IgTwigOps::actionVisible(), IgWebTreeService::browse(), IgTwigOps::doHide(), IgTwigOps::doShow(), IgIVView::dump(), getVisibleAttribute(), MMM_DEFUN_FUNC(), setVisibleAttribute(), and visible().
Definition at line 143 of file IgTwig.cc.
References ASSERT, and selfTraverse().
Referenced by attributes().
00144 { 00145 ASSERT (value); 00146 ASSERT (dynamic_cast<const IgBoolDatum *> (value)); 00147 selfTraverse (dynamic_cast<const IgBoolDatum *> (value)->value ()); 00148 }
Definition at line 158 of file IgTwig.cc.
References ASSERT, and selfVisible().
Referenced by attributes().
00159 { 00160 ASSERT (value); 00161 ASSERT (dynamic_cast<const IgBoolDatum *> (value)); 00162 selfVisible (dynamic_cast<const IgBoolDatum *> (value)->value ()); 00163 }
Definition at line 181 of file IgTwig.cc.
References parent(), selfTraverse(), and traverse().
Referenced by MMM_DEFUN_FUNC(), postMake3DRep(), postMakeXMLRep(), traverse(), and visible().
00182 { 00183 return selfTraverse () && (! parent () || parent ()->traverse ()); 00184 }
Definition at line 187 of file IgTwig.cc.
References parent(), selfVisible(), and traverse().
Referenced by MMM_DEFUN_FUNC().
00188 { 00189 return selfVisible () && (! parent () || parent ()->traverse ()); 00190 }
const int IgTwig::FLAGS_MASK = 4 [static] |
Flag for IgBrowserMethods::update() field
indicating that the flags for this twig have changed in a way that affects the whether this twig should have a representation or not, but not its children or (in general) what the representation should be like.
This is an optimisation flag that some reps can use to quickly turn themselves on or off without full recreation.
Definition at line 47 of file IgTwig.h.
Referenced by VisG4TwigOps::actionApplyFilter(), IgTwigOps::actionEnable(), IgTwigOps::actionHide(), VisG4TwigOps::actionShowCategory(), VisG4TwigOps::actionShowMaterial(), IgTwigOps::actionVisible(), IgWebTreeService::browse(), and MMM_DEFUN_FUNC().
IgTwig* IgTwig::m_parent [private] |
const char IgTwig::s_cascade = "Cascade" [static, private] |
const char IgTwig::s_name = "Name" [static, private] |
const char IgTwig::s_traverse = "Traverse" [static, private] |
const char IgTwig::s_visible = "Visible" [static, private] |
const int IgTwig::SELF_MASK = 2 [static] |
Flag for IgBrowserMethods::update() field
indicating that the twig itself has changed: its name or any other content that is restricted to the twig itself but not affecting its children.
Definition at line 38 of file IgTwig.h.
Referenced by VisG4TwigOps::actionAppearance(), VisG4TwigOps::actionColour(), VisEventContentTwigOps::actionExpand(), VisG4TwigOps::actionLogical(), VisG4TwigOps::actionTransparency(), IgWebTreeService::browse(), VisWebRootService::browse(), VisMuonEnergyTwig::configChanged(), VisEventIdTwig::configChanged(), VisTrackTwig::configChanged(), VisMuonTwig::configChanged(), VisTkRecTracksTwig::configChanged(), VisRefitTrackTwig::configChanged(), VisG4TrackPtTwig::cutChanged(), VisSimTrackTwig::cutChanged(), VisWebFrameworkService::doNextEvent(), VisG4TwigOps::doRender(), VisCuTkMapWindow::drawCluster(), VisCuTkMapWindow::drawDigi(), VisCuTkMapWindow::drawRechit(), VisCuTkMapWindow::drawSimHits(), VisG4MagFieldContent::init(), VisG4EventContent::init(), VisCuTkRecoContent::init(), VisG4GeomContent::init(), VisCMSMagFieldContent::init(), MMM_DEFUN_FUNC(), VisQueuedTwig::onBaseInvalidate(), VisPCaloHitTwig::onNewEvent(), VisTrackerRechit2DTwig::onNewEvent(), VisTkRecTracksTwig::onNewEvent(), VisCaloTowerTwig::onNewEvent(), VisTrackerClusterTwig::onNewEvent(), VisTrackerRechit2DMatchedTwig::onNewEvent(), VisPixelDigiTwig::onNewEvent(), VisCuTkGeometryTwig::onNewEvent(), VisTkSimHitTwig::onNewEvent(), VisPSimHitTwig::onNewEvent(), VisTrackerPiDigiTwig::onNewEvent(), VisCSCSeg2HETwig::onNewEvent(), VisBasicClusterCollectionTwig::onNewEvent(), VisGenJetCollectionTwig::onNewEvent(), VisSimVertexTwig::onNewEvent(), VisSuperClusterCollectionTwig::onNewEvent(), VisTrackerDigiTwig::onNewEvent(), VisGsfTrackTwig::onNewEvent(), VisRecoToolsTwig::onNewEvent(), VisCMSMagFieldTwig::onNewEvent(), VisMuonTwig::onNewEvent(), VisHepMCProductTwig::onNewEvent(), VisL1GlobalTriggerReadoutRecordTwig::onNewEvent(), VisHFDataFrameTwig::onNewEvent(), VisFEDRawDataCollectionTwig::onNewEvent(), VisEventContentTwig::onNewEvent(), VisCuTkSlWindow::repaintAll(), VisGenJetTwig::scaleChanged(), VisGenJetCollectionTwig::scaleChanged(), VisCandidateTwig::scaleChanged(), VisHcalDetTwig::scaleChanged(), IgNTupleAppMain::setup(), VisGsfTrackTwig::twigChanged(), VisCaloJetTwig::twigChanged(), VisBasicClusterTwig::twigChanged(), VisTrackingRecHitTwig::twigChanged(), VisPSimHitTwig::twigChanged(), VisHORecHitTwig::twigChanged(), VisTrackerClusterTwig::twigChanged(), VisEcalUncalibratedRecHitTwig::twigChanged(), VisTrajectorySeedTwig::twigChanged(), VisTrackerRechit2DMatchedTwig::twigChanged(), VisTrackerRechit2DTwig::twigChanged(), VisHBHERecHitTwig::twigChanged(), VisSuperClusterTwig::twigChanged(), VisEcalRecHitTwig::twigChanged(), VisDetTextureTwig::twigChanged(), VisTrackerDigiTwig::twigChanged(), VisCaloTowerTwig::twigChanged(), VisHFRecHitTwig::twigChanged(), VisSuperClusterCollectionTwig::twigChanged(), VisBasicClusterCollectionTwig::twigChanged(), VisTkIdealHelixTracksTwig::twigChanged(), VisG4TracksTwig::update(), and VisG4GeometryTwig::update().
const int IgTwig::STRUCTURE_MASK = 1 [static] |
Flag for IgBrowserMethods::update() field
indicating that the substructure of the twig has changed.
This means usually that either the children have changed completely or that the visible() or traverse() flags have changed in a way that the children of this twig should be updated.
Definition at line 32 of file IgTwig.h.
Referenced by VisG4TwigOps::actionApplyFilter(), IgTwigOps::actionEnable(), VisEventContentTwigOps::actionExpand(), IgTwigOps::actionHide(), VisG4TwigOps::actionLogical(), VisG4TwigOps::actionShowCategory(), VisG4TwigOps::actionShowMaterial(), IgTwigOps::actionVisible(), IgWebTreeService::browse(), VisWebRootService::browse(), createThisTwig(), VisG4MagFieldContent::init(), VisG4EventContent::init(), VisCuTkRecoContent::init(), VisG4GeomContent::init(), VisCMSMagFieldContent::init(), MMM_DEFUN_FUNC(), VisPCaloHitTwig::onNewEvent(), VisTrackerRechit2DTwig::onNewEvent(), VisTkRecTracksTwig::onNewEvent(), VisCaloTowerTwig::onNewEvent(), VisTrackerClusterTwig::onNewEvent(), VisTrackerRechit2DMatchedTwig::onNewEvent(), VisPSimHitTwig::onNewEvent(), VisBasicClusterCollectionTwig::onNewEvent(), VisGenJetCollectionTwig::onNewEvent(), VisSuperClusterCollectionTwig::onNewEvent(), VisTrackerDigiTwig::onNewEvent(), VisGsfTrackTwig::onNewEvent(), VisRecoToolsTwig::onNewEvent(), VisMuonTwig::onNewEvent(), VisHepMCProductTwig::onNewEvent(), VisL1GlobalTriggerReadoutRecordTwig::onNewEvent(), VisFEDRawDataCollectionTwig::onNewEvent(), VisEventContentTwig::onNewEvent(), VisApplicationMain::setup(), IgNTupleAppMain::setup(), VisSimMain::setup(), VisG4ExampleSetup::setup(), VisMagFieldDemoMain::setup(), VisG4TracksTwig::update(), and VisG4GeometryTwig::update().