CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions
FWGeoTopNodeGLScene Class Reference

#include <FWGeoTopNodeScene.h>

Inheritance diagram for FWGeoTopNodeGLScene:

Public Member Functions

Int_t AddObject (const TBuffer3D &buffer, Bool_t *addChildren=nullptr) override
 
virtual Bool_t DestroyPhysical (Int_t)
 
Int_t DestroyPhysicals () override
 
 FWGeoTopNodeGLScene (TVirtualPad *pad)
 
void GeoPopupMenu (Int_t gx, Int_t gy, TGLViewer *)
 
bool OpenCompositeWithPhyID (UInt_t phyID, const TBuffer3D &buffer)
 
Bool_t ResolveSelectRecord (TGLSelectRecord &rec, Int_t curIdx) override
 
void SetPad (TVirtualPad *p)
 
 ~FWGeoTopNodeGLScene () override
 

Public Attributes

FWGeoTopNodem_eveTopNode
 

Private Member Functions

 FWGeoTopNodeGLScene (const FWGeoTopNodeGLScene &)=delete
 
FWGeoTopNodeGLSceneoperator= (const FWGeoTopNodeGLScene &)=delete
 

Detailed Description

Definition at line 9 of file FWGeoTopNodeScene.h.

Constructor & Destructor Documentation

◆ FWGeoTopNodeGLScene() [1/2]

FWGeoTopNodeGLScene::FWGeoTopNodeGLScene ( const FWGeoTopNodeGLScene )
privatedelete

◆ FWGeoTopNodeGLScene() [2/2]

FWGeoTopNodeGLScene::FWGeoTopNodeGLScene ( TVirtualPad *  pad)

Definition at line 13 of file FWGeoTopNodeScene.cc.

14  : TGLScenePad(pad),
15  // fNextCompositeID(0),
16  m_eveTopNode(nullptr) {
17  // Constructor.
18  // fInternalPIDs = false;
19  fTitle = "GeoTopNodeScene";
20 }

◆ ~FWGeoTopNodeGLScene()

FWGeoTopNodeGLScene::~FWGeoTopNodeGLScene ( )
inlineoverride

Definition at line 19 of file FWGeoTopNodeScene.h.

19 {}

Member Function Documentation

◆ AddObject()

Int_t FWGeoTopNodeGLScene::AddObject ( const TBuffer3D &  buffer,
Bool_t *  addChildren = nullptr 
)
override

Definition at line 48 of file FWGeoTopNodeScene.cc.

48  {
49  if (fComposite) {
50  // TGeoSubstraction, TGeoUnion, ... phyID ignored in this case
51  int ns = TGLScenePad::AddObject(1, buffer, addChildren);
52  return ns;
53  } else {
54  fwLog(fwlog::kError) << "FWGeoTopNodeGLScene::AddObject() should not be called if fNextCompositeID \n";
55  return TGLScenePad::AddObject(buffer, addChildren);
56  }
57 }

References edmScanValgrind::buffer, fwLog, and fwlog::kError.

◆ DestroyPhysical()

Bool_t FWGeoTopNodeGLScene::DestroyPhysical ( Int_t  x)
virtual

Definition at line 106 of file FWGeoTopNodeScene.cc.

106  {
107  fwLog(fwlog::kInfo) << "FWGeoTopNodeGLScene::DestroyPhysical()\n";
108  return TGLScene::DestroyPhysical(x);
109 }

References fwLog, fwlog::kInfo, and x.

◆ DestroyPhysicals()

Int_t FWGeoTopNodeGLScene::DestroyPhysicals ( )
override

Definition at line 92 of file FWGeoTopNodeScene.cc.

92  {
93  // Need to clear state on full redraw, else FWGeoTopNode ends
94  // with invalid set of selected physical and logical ids.
95 
96  if (gEve->GetSelection()->HasChild(m_eveTopNode))
97  gEve->GetSelection()->RemoveElement(m_eveTopNode);
98 
99  if (gEve->GetHighlight()->HasChild(m_eveTopNode))
100  gEve->GetHighlight()->RemoveElement(m_eveTopNode);
101 
102  return TGLScene::DestroyPhysicals();
103 }

References m_eveTopNode.

◆ GeoPopupMenu()

void FWGeoTopNodeGLScene::GeoPopupMenu ( Int_t  gx,
Int_t  gy,
TGLViewer *  v 
)

◆ OpenCompositeWithPhyID()

Bool_t FWGeoTopNodeGLScene::OpenCompositeWithPhyID ( UInt_t  phyID,
const TBuffer3D &  buffer 
)

Definition at line 23 of file FWGeoTopNodeScene.cc.

23  {
24  // Open new composite container.
25  // TVirtualViewer3D interface overload - see base/src/TVirtualViewer3D.cxx
26  // for description of viewer architecture.
27 
28  if (fComposite) {
29  Error("FWGeoTopNodeGLScene::OpenComposite", "composite already open");
30  return kFALSE;
31  }
32 
33  UInt_t extraSections = TGLScenePad::AddObject(phyID, buffer, nullptr);
34  if (extraSections != TBuffer3D::kNone) {
35  Error("FWGeoTopNodeGLScene::OpenComposite", "expected top level composite to not require extra buffer sections");
36  }
37 
38  // If composite was created it is of interest - we want the rest of the
39  // child components
40  if (fComposite) {
41  return kTRUE;
42  } else {
43  return kFALSE;
44  }
45 }

References edmScanValgrind::buffer, and WDecay::kNone.

Referenced by FWGeoTopNode::paintShape().

◆ operator=()

FWGeoTopNodeGLScene& FWGeoTopNodeGLScene::operator= ( const FWGeoTopNodeGLScene )
privatedelete

◆ ResolveSelectRecord()

Bool_t FWGeoTopNodeGLScene::ResolveSelectRecord ( TGLSelectRecord &  rec,
Int_t  curIdx 
)
override

Definition at line 60 of file FWGeoTopNodeScene.cc.

60  {
61  // Process selection record rec.
62  // 'curIdx' is the item position where the scene should start
63  // its processing.
64  // Return TRUE if an object has been identified or FALSE otherwise.
65  // The scene-info member of the record is already set by the caller.
66 
67  if (curIdx >= rec.GetN())
68  return kFALSE;
69 
70  TGLPhysicalShape* pshp = FindPhysical(rec.GetItem(curIdx));
71 
72  /*
73  printf("FWGeoTopNodeGLScene::ResolveSelectRecord pshp=%p, lshp=%p, obj=%p, shpcls=%s\n",
74  (void*)pshp,(void*) pshp->GetLogical(),(void*) pshp->GetLogical()->GetExternal(),
75  ((TGeoVolume*)pshp->GetLogical()->GetExternal())->GetShape()->ClassName());
76  */
77  if (pshp) {
78  rec.SetTransparent(pshp->IsTransparent());
79  rec.SetPhysShape(pshp);
80 
81 #if ROOT_VERSION_CODE >= ROOT_VERSION(5, 32, 0)
82  rec.SetLogShape(FindLogical(m_eveTopNode));
83 #endif
84  rec.SetObject(m_eveTopNode);
85  rec.SetSpecific(nullptr);
86  return kTRUE;
87  }
88  return kFALSE;
89 }

References m_eveTopNode.

◆ SetPad()

void FWGeoTopNodeGLScene::SetPad ( TVirtualPad *  p)
inline

Definition at line 21 of file FWGeoTopNodeScene.h.

21 { fPad = p; }

References AlCaHLTBitMon_ParallelJobs::p.

Member Data Documentation

◆ m_eveTopNode

FWGeoTopNode* FWGeoTopNodeGLScene::m_eveTopNode
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DDAxes::x
findQualityFiles.v
v
Definition: findQualityFiles.py:179
FWGeoTopNodeGLScene::m_eveTopNode
FWGeoTopNode * m_eveTopNode
Definition: FWGeoTopNodeScene.h:16
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
FWGeoTopNode::popupMenu
virtual void popupMenu(int x, int y, TGLViewer *)
Definition: FWGeoTopNode.h:82
leef::Error
edm::ErrorSummaryEntry Error
Definition: LogErrorEventFilter.cc:29
fwlog::kInfo
Definition: fwLog.h:35
WDecay::kNone
Definition: TopGenEvent.h:27
fwlog::kError
Definition: fwLog.h:35