CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
FWGeometryTableViewBase::FWViewCombo Class Reference

#include <FWGeometryTableViewBase.h>

Inheritance diagram for FWGeometryTableViewBase::FWViewCombo:

Public Member Functions

 FWViewCombo (const TGWindow *p, FWGeometryTableViewBase *t)
 
virtual Bool_t HandleButton (Event_t *event)
 
void setElement (TEveElement *x)
 
virtual ~FWViewCombo ()
 

Private Attributes

TEveElement * m_el
 
FWGeometryTableViewBasem_tableView
 

Detailed Description

Definition at line 50 of file FWGeometryTableViewBase.h.

Constructor & Destructor Documentation

FWGeometryTableViewBase::FWViewCombo::FWViewCombo ( const TGWindow *  p,
FWGeometryTableViewBase t 
)
inline

Definition at line 56 of file FWGeometryTableViewBase.h.

56  :
57  TGTextButton(p, "Select Views", -1, TGButton::GetDefaultGC()(), TGTextButton::GetDefaultFontStruct(), kRaisedFrame | kDoubleBorder ), m_tableView(t), m_el(0) {}
virtual FWGeometryTableViewBase::FWViewCombo::~FWViewCombo ( )
inlinevirtual

Definition at line 58 of file FWGeometryTableViewBase.h.

58 {}

Member Function Documentation

Bool_t FWGeometryTableViewBase::FWViewCombo::HandleButton ( Event_t *  event)
virtual

Definition at line 51 of file FWGeometryTableViewBase.cc.

References create_public_lumi_plots::ax, fwLog, fwlog::kInfo, m_el, m_tableView, alignCSCRings::s, and findQualityFiles::v.

52 {
53  if (event->fType == kButtonPress)
54  {
55  bool map = false;
56 
57  FWPopupMenu* m_viewPopup = new FWPopupMenu(0);
58 
59  TEveElementList* views = gEve->GetViewers();
60  int idx = 0;
61 
62  for (TEveElement::List_i it = views->BeginChildren(); it != views->EndChildren(); ++it)
63  {
64  TEveViewer* v = ((TEveViewer*)(*it));
65  if (strstr( v->GetElementName(), "3D") )
66  {
67  bool added = false;
68  m_viewPopup->AddEntry(v->GetElementName(), idx);
69 
70  for (TEveElement::List_i eit = v->BeginChildren(); eit != v->EndChildren(); ++eit )
71  {
72  TEveScene* s = ((TEveSceneInfo*)*eit)->GetScene();
73  if (m_el && s->HasChildren() && s->FirstChild() == m_el) {
74  added = true;
75  break;
76  }
77  }
78  map = true;
79  if (added)
80  m_viewPopup->CheckEntry(idx);
81  }
82  ++idx;
83  }
84 
85  if (map) {
86 
87  Window_t wdummy;
88  Int_t ax,ay;
89  gVirtualX->TranslateCoordinates(GetId(),
90  gClient->GetDefaultRoot()->GetId(),
91  event->fX, event->fY, //0,0 in local coordinates
92  ax,ay, //coordinates of screen
93  wdummy);
94 
95 
96  m_viewPopup->PlaceMenu(ax, ay, true,true);
97  m_viewPopup->Connect("Activated(Int_t)",
98  "FWGeometryTableViewBase",
99  const_cast<FWGeometryTableViewBase*>(m_tableView),
100  "selectView(Int_t)");
101  }
102  else
103  {
104  fwLog(fwlog::kInfo) << "No 3D View added. \n";
105  }
106  }
107  return true;
108 }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
#define fwLog(_level_)
Definition: fwLog.h:50
void FWGeometryTableViewBase::FWViewCombo::setElement ( TEveElement *  x)
inline

Member Data Documentation

TEveElement* FWGeometryTableViewBase::FWViewCombo::m_el
private

Definition at line 54 of file FWGeometryTableViewBase.h.

Referenced by HandleButton(), and setElement().

FWGeometryTableViewBase* FWGeometryTableViewBase::FWViewCombo::m_tableView
private

Definition at line 53 of file FWGeometryTableViewBase.h.

Referenced by HandleButton().