ATLAS Offline Software
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
VolumeHandle::Imp Class Reference
Collaboration diagram for VolumeHandle::Imp:

Classes

class  VolState
 

Public Member Functions

 Imp (VolumeHandleSharedData *the_cd, const GeoPVConstLink &the_pV, const SbMatrix &the_ac)
 
void attach (VolumeHandle *vh)
 
void detach ()
 

Static Public Member Functions

static VolState getChildStates (const VolumeHandle *theclass)
 
static void applyChildStates (const VolState &, VolumeHandle *theclass)
 
static bool hasNonStandardShapeChildren (const SoGroup *g)
 

Public Attributes

VolumeHandleSharedDatacommondata
 
GeoPVConstLink pV
 
const SbMatrix accumTrans
 
VP1ExtraSepLayerHelperattachsepHelper
 
VP1ExtraSepLayerHelperattachlabelSepHelper
 
SoSeparator * nodesep
 
SoMaterial * material
 
SoSeparator * label_sep
 
int labels
 
QList< int > labelsPosOffsets
 
bool isattached
 

Detailed Description

Definition at line 48 of file VolumeHandle.cxx.

Constructor & Destructor Documentation

◆ Imp()

VolumeHandle::Imp::Imp ( VolumeHandleSharedData the_cd,
const GeoPVConstLink &  the_pV,
const SbMatrix &  the_ac 
)
inline

Definition at line 50 of file VolumeHandle.cxx.

51  : commondata(the_cd), pV(the_pV),accumTrans(the_ac),attachsepHelper(0),attachlabelSepHelper(0),nodesep(0), material(0), label_sep(0), labels(0), isattached(false) {}

Member Function Documentation

◆ applyChildStates()

void VolumeHandle::Imp::applyChildStates ( const VolState vs,
VolumeHandle theclass 
)
static

Definition at line 608 of file VolumeHandle.cxx.

609 {
610  bool hasExpandedChildren = !vs.m_expandedChildren.isEmpty();
611  bool hasZappedChildren = !vs.m_zappedChildren.isEmpty();
612  if (!hasExpandedChildren&&!hasZappedChildren)
613  return;
614 
615  QMap<quint32,VolState>::const_iterator expItr, expItrEnd = vs.m_expandedChildren.end();
616  QSet<quint32>::const_iterator zapItr, zapItrEnd = vs.m_zappedChildren.end();
617 
618  theclass->initialiseChildren();
619  VolumeHandleListConstItr it, itE = theclass->m_children.end();
620  for (it = theclass->m_children.begin(); it!=itE; ++it) {
621  quint32 id = (*it)->hashID();
622  zapItr = vs.m_zappedChildren.find(id);
623  if (zapItr!=zapItrEnd) {
624  (*it)->setState(VP1GeoFlags::ZAPPED);
625  continue;
626  }
627  expItr = vs.m_expandedChildren.find(id);
628  if (expItr!=expItrEnd) {
629  (*it)->setState(VP1GeoFlags::ZAPPED);
630  applyChildStates(expItr.value(),*it);
631  (*it)->setState(VP1GeoFlags::EXPANDED);
632  }
633  }
634 }

◆ attach()

void VolumeHandle::Imp::attach ( VolumeHandle vh)

Definition at line 317 of file VolumeHandle.cxx.

318 {
319  VP1Msg::messageDebug("VolumeHandle::Imp::attach() - name: " + vh->getName());
320  if (!isattached) {
321  vh->ensureBuildNodeSep();
322  if (attachsepHelper) {
323  VP1Msg::messageDebug("adding node...");
325  }
326  if (attachlabelSepHelper) {
327  VP1Msg::messageDebug("adding label...");
329  }
330  isattached=true;
331  commondata->volumeBrowser()->scheduleUpdateOfAllNonHiddenIndices();//Browser need to change e.g. colour for this volume
332  }
333  //VP1Msg::messageDebug("attach: DONE.");
334 }

◆ detach()

void VolumeHandle::Imp::detach ( )

Definition at line 337 of file VolumeHandle.cxx.

338 {
339  if (isattached) {
340  if (attachsepHelper)
344  isattached=false;
345  commondata->volumeBrowser()->scheduleUpdateOfAllNonHiddenIndices();//Browser need to change e.g. colour for this volume
346  }
347 }

◆ getChildStates()

VolumeHandle::Imp::VolState VolumeHandle::Imp::getChildStates ( const VolumeHandle theclass)
static

Definition at line 591 of file VolumeHandle.cxx.

592 {
593  VolState vs;
594  if (theclass->m_state!=VP1GeoFlags::EXPANDED||theclass->m_nchildren==0||!theclass->childrenAreInitialised())
595  return vs;
596 
597  VolumeHandleListConstItr it, itE = theclass->m_children.end();
598  for (it = theclass->m_children.begin(); it!=itE; ++it) {
599  if ((*it)->state()==VP1GeoFlags::ZAPPED)
600  vs.m_zappedChildren.insert((*it)->hashID());
601  else if ((*it)->state()==VP1GeoFlags::EXPANDED)
602  vs.m_expandedChildren.insert((*it)->hashID(),(*it)->m_d->getChildStates(*it));
603  }
604  return vs;
605 }

◆ hasNonStandardShapeChildren()

bool VolumeHandle::Imp::hasNonStandardShapeChildren ( const SoGroup *  g)
static

Definition at line 637 of file VolumeHandle.cxx.

638 {
639  const int n(g->getNumChildren());
640  for (int i=0; i < n; ++i) {
641  const SoNode*c = g->getChild(i);
642  if (c->getTypeId().isDerivedFrom(SoShape::getClassTypeId())) {
643  if (c->getTypeId().isDerivedFrom(SoPcons::getClassTypeId())
644  ||c->getTypeId().isDerivedFrom(SoPolyhedron::getClassTypeId())
645  ||c->getTypeId().isDerivedFrom(SoTransparency::getClassTypeId()))
646  return true;
647  } else if (c->getTypeId().isDerivedFrom(SoGroup::getClassTypeId())) {
648  if (hasNonStandardShapeChildren(static_cast<const SoGroup*>(c)))
649  return true;
650  }
651  }
652  return false;
653 }

Member Data Documentation

◆ accumTrans

const SbMatrix VolumeHandle::Imp::accumTrans

Definition at line 55 of file VolumeHandle.cxx.

◆ attachlabelSepHelper

VP1ExtraSepLayerHelper* VolumeHandle::Imp::attachlabelSepHelper

Definition at line 58 of file VolumeHandle.cxx.

◆ attachsepHelper

VP1ExtraSepLayerHelper* VolumeHandle::Imp::attachsepHelper

Definition at line 57 of file VolumeHandle.cxx.

◆ commondata

VolumeHandleSharedData* VolumeHandle::Imp::commondata

Definition at line 53 of file VolumeHandle.cxx.

◆ isattached

bool VolumeHandle::Imp::isattached

Definition at line 66 of file VolumeHandle.cxx.

◆ label_sep

SoSeparator* VolumeHandle::Imp::label_sep

Definition at line 62 of file VolumeHandle.cxx.

◆ labels

int VolumeHandle::Imp::labels

Definition at line 63 of file VolumeHandle.cxx.

◆ labelsPosOffsets

QList<int> VolumeHandle::Imp::labelsPosOffsets

Definition at line 64 of file VolumeHandle.cxx.

◆ material

SoMaterial* VolumeHandle::Imp::material

Definition at line 61 of file VolumeHandle.cxx.

◆ nodesep

SoSeparator* VolumeHandle::Imp::nodesep

Definition at line 60 of file VolumeHandle.cxx.

◆ pV

GeoPVConstLink VolumeHandle::Imp::pV

Definition at line 54 of file VolumeHandle.cxx.


The documentation for this class was generated from the following file:
VP1ExtraSepLayerHelper::removeNode
void removeNode(SoNode *)
Definition: VP1ExtraSepLayerHelper.cxx:95
VolumeHandle::Imp::material
SoMaterial * material
Definition: VolumeHandle.cxx:61
VolumeHandleSharedData::volumeBrowser
VP1GeoTreeView * volumeBrowser() const
Definition: VolumeHandleSharedData.h:40
VP1GeoFlags::EXPANDED
@ EXPANDED
Definition: VP1GeoFlags.h:88
VolumeHandle::Imp::hasNonStandardShapeChildren
static bool hasNonStandardShapeChildren(const SoGroup *g)
Definition: VolumeHandle.cxx:637
VolumeHandle::material
SoMaterial * material()
Definition: VolumeHandle.cxx:187
VP1ExtraSepLayerHelper::addNodeUnderMaterial
void addNodeUnderMaterial(SoNode *, SoMaterial *)
Definition: VP1ExtraSepLayerHelper.cxx:190
skel.it
it
Definition: skel.GENtoEVGEN.py:396
VP1ExtraSepLayerHelper::removeNodeUnderMaterial
void removeNodeUnderMaterial(SoNode *, SoMaterial *)
Definition: VP1ExtraSepLayerHelper.cxx:216
VolumeHandle::Imp::isattached
bool isattached
Definition: VolumeHandle.cxx:66
VolumeHandle::m_children
VolumeHandleList m_children
Definition: VolumeHandle.h:132
VolumeHandle::childrenAreInitialised
bool childrenAreInitialised() const
Definition: VolumeHandle.h:146
TruthTest.itE
itE
Definition: TruthTest.py:25
VolumeHandle::Imp::applyChildStates
static void applyChildStates(const VolState &, VolumeHandle *theclass)
Definition: VolumeHandle.cxx:608
lumiFormat.i
int i
Definition: lumiFormat.py:85
VolumeHandle::Imp::labels
int labels
Definition: VolumeHandle.cxx:63
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
beamspotman.n
n
Definition: beamspotman.py:731
VolumeHandle::Imp::commondata
VolumeHandleSharedData * commondata
Definition: VolumeHandle.cxx:53
VolumeHandle::m_state
VP1GeoFlags::VOLSTATE m_state
Definition: VolumeHandle.h:133
VolumeHandle::Imp::nodesep
SoSeparator * nodesep
Definition: VolumeHandle.cxx:60
VolumeHandle::Imp::label_sep
SoSeparator * label_sep
Definition: VolumeHandle.cxx:62
VolumeHandle::initialiseChildren
void initialiseChildren()
Definition: VolumeHandle.cxx:136
VolumeHandle::Imp::pV
GeoPVConstLink pV
Definition: VolumeHandle.cxx:54
VolumeHandle::ensureBuildNodeSep
void ensureBuildNodeSep()
Definition: VolumeHandle.cxx:238
VolumeHandle::Imp::attachsepHelper
VP1ExtraSepLayerHelper * attachsepHelper
Definition: VolumeHandle.cxx:57
VolumeHandle::getName
QString getName() const
Definition: VolumeHandle.cxx:169
VP1ExtraSepLayerHelper::addNode
void addNode(SoNode *)
Definition: VP1ExtraSepLayerHelper.cxx:54
VP1GeoFlags::ZAPPED
@ ZAPPED
Definition: VP1GeoFlags.h:89
VP1Msg::messageDebug
static void messageDebug(const QString &)
Definition: VP1Msg.cxx:39
VolumeHandle::Imp::accumTrans
const SbMatrix accumTrans
Definition: VolumeHandle.cxx:55
VolumeHandle::Imp::attachlabelSepHelper
VP1ExtraSepLayerHelper * attachlabelSepHelper
Definition: VolumeHandle.cxx:58
python.compressB64.c
def c
Definition: compressB64.py:93
VolumeHandle::m_nchildren
const unsigned m_nchildren
Definition: VolumeHandle.h:128
VP1GeoTreeView::scheduleUpdateOfAllNonHiddenIndices
void scheduleUpdateOfAllNonHiddenIndices()
Definition: VP1GeoTreeView.cxx:65
VolumeHandle::VolumeHandleListConstItr
VolumeHandleList::const_iterator VolumeHandleListConstItr
Definition: VolumeHandle.h:66