CMS 3D CMS Logo

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

#include <FWGeometryTableView.h>

Inheritance diagram for FWGeometryTableView:
FWViewBase FWParameterSetterEditorBase FWConfigurableParameterizable FWParameterizable FWConfigurable

Public Types

enum  EMode { kNode, kVolume }
 
- Public Types inherited from FWParameterizable
typedef std::vector
< FWParameterBase * >
::const_iterator 
const_iterator
 

Public Member Functions

virtual void addTo (FWConfiguration &) const
 
void cdNode (int)
 
void cdTop ()
 
void cdUp ()
 
void cellClicked (Int_t iRow, Int_t iColumn, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY)
 
void chosenItem (int)
 
void filterListCallback ()
 
void filterTextEntryCallback ()
 
 FWGeometryTableView (TEveWindowSlot *, FWColorManager *, TGeoNode *, TObjArray *)
 
int getAutoExpand () const
 
std::string getFilter () const
 
bool getIgnoreVisLevelWhenFilter () const
 
FWGeometryTableManagergetTableManager ()
 
int getTopNodeIdx () const
 
int getVisLevel () const
 
bool getVolumeMode () const
 
void nodeColorChangeRequested (Color_t)
 
void populate3DViewsFromConfig ()
 
void printTable ()
 
virtual void saveImageTo (const std::string &iName) const
 
void selectView (int)
 
void setBackgroundColor ()
 
virtual void setFrom (const FWConfiguration &)
 
void setPath (int, std::string &)
 
void updateFilter (std::string &)
 
virtual ~FWGeometryTableView ()
 
- Public Member Functions inherited from FWViewBase
virtual
FWViewContextMenuHandlerBase
contextMenuHandler () const
 
void destroy ()
 
 FWViewBase (FWViewType::EType, unsigned int iVersion=1)
 
virtual void populateController (ViewerParameterGUI &) const
 
void promptForSaveImageTo (TGFrame *) const
 
FWViewType::EType typeId () const
 
const std::string & typeName () const
 
- Public Member Functions inherited from FWConfigurableParameterizable
 FWConfigurableParameterizable (unsigned int iVersion=1)
 
unsigned int version () const
 
virtual ~FWConfigurableParameterizable ()
 
- Public Member Functions inherited from FWParameterizable
void add (FWParameterBase *)
 
const_iterator begin () const
 
const_iterator end () const
 
 FWParameterizable ()
 
virtual ~FWParameterizable ()
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
virtual ~FWConfigurable ()
 
- Public Member Functions inherited from FWParameterSetterEditorBase
 FWParameterSetterEditorBase ()
 
virtual void updateEditor ()
 
virtual ~FWParameterSetterEditorBase ()
 

Private Member Functions

void autoExpandChanged ()
 
 ClassDef (FWGeometryTableView, 0)
 
 FWGeometryTableView (const FWGeometryTableView &)
 
void loadGeometry ()
 
void makeSetter (TGCompositeFrame *frame, FWParameterBase *param)
 
void modeChanged ()
 
const FWGeometryTableViewoperator= (const FWGeometryTableView &)
 
void refreshTable3D ()
 
void resetSetters ()
 

Private Attributes

FWLongParameter m_autoExpand
 
FWColorManagerm_colorManager
 
FWColorPopupm_colorPopup
 
FWGeoTopNodem_eveTopNode
 
TEveWindowFrame * m_eveWindow
 
FWStringParameter m_filter
 
FWGUIValidatingTextEntrym_filterEntry
 
FWGeoMaterialValidatorm_filterValidator
 
TGCompositeFrame * m_frame
 
FWEnumParameter m_mode
 
std::vector< boost::shared_ptr
< FWParameterSetterBase > > 
m_setters
 
TGCompositeFrame * m_settersFrame
 
FWGeometryTableManagerm_tableManager
 
FWTableWidgetm_tableWidget
 
FWLongParameter m_topNodeIdx
 
FWViewCombom_viewBox
 
const FWConfigurationm_viewersConfig
 
FWLongParameter m_visLevel
 
FWBoolParameter m_visLevelFilter
 

Additional Inherited Members

- Public Attributes inherited from FWViewBase
sigc::signal< void, const
FWViewBase * > 
beingDestroyed_
 
sigc::signal< void, Int_t, Int_t > openSelectedModelContextMenu_
 
- Protected Member Functions inherited from FWViewBase
virtual ~FWViewBase ()
 
- Protected Attributes inherited from FWViewBase
FWViewType m_type
 

Detailed Description

Definition at line 46 of file FWGeometryTableView.h.

Member Enumeration Documentation

Enumerator
kNode 
kVolume 

Definition at line 54 of file FWGeometryTableView.h.

Constructor & Destructor Documentation

FWGeometryTableView::FWGeometryTableView ( TEveWindowSlot *  iParent,
FWColorManager colMng,
TGeoNode *  tn,
TObjArray *  volumes 
)

Definition at line 211 of file FWGeometryTableView.cc.

References FWEnumParameter::addEntry(), autoExpandChanged(), cdTop(), FWGenericParameter< T >::changed_, FWTableWidget::disableGrowInWidth(), FWGUIValidatingTextEntry::getListBox(), FWGeometryTableManager::loadGeometry(), m_autoExpand, m_eveWindow, m_filterEntry, m_filterValidator, m_frame, m_mode, m_settersFrame, m_tableManager, m_tableWidget, m_viewBox, m_visLevel, m_visLevelFilter, modeChanged(), refreshTable3D(), resetSetters(), FWTableWidget::SetBackgroundColor(), FWTableWidget::SetHeaderBackgroundColor(), FWTableWidget::SetLineSeparatorColor(), FWGUIValidatingTextEntry::setMaxListBoxHeight(), and FWGUIValidatingTextEntry::setValidator().

213  m_mode(this, "Mode:", 0l, 0l, 1l),
214  m_filter(this,"Materials:",std::string()),
215  m_autoExpand(this,"ExpandList:", 1l, 0l, 100l),
216  m_visLevel(this,"VisLevel:", 3l, 1l, 100l),
217  m_visLevelFilter(this,"IgnoreVisLevelOnFilter", true),
218  m_topNodeIdx(this, "TopNodeIndex", -1l, 0, 1e7),
219  m_colorManager(colMng),
220  m_tableManager(0),
221  m_eveTopNode(0),
222  m_colorPopup(0),
223  m_eveWindow(0),
224  m_frame(0),
225  m_viewBox(0),
226  m_filterEntry(0),
228  m_viewersConfig(0)
229 {
230  m_eveWindow = iParent->MakeFrame(0);
231  TGCompositeFrame* xf = m_eveWindow->GetGUICompositeFrame();
232 
233  m_frame = new TGVerticalFrame(xf);
234  xf->AddFrame(m_frame, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
235 
236  m_mode.addEntry(0, "Node");
237  m_mode.addEntry(1, "Volume");
238 
240  m_mode.changed_.connect(boost::bind(&FWGeometryTableView::modeChanged,this));
241  m_autoExpand.changed_.connect(boost::bind(&FWGeometryTableView::autoExpandChanged, this));
242  m_visLevel.changed_.connect(boost::bind(&FWGeometryTableView::refreshTable3D,this));
244 
245 
246  // top row
247  {
248  TGHorizontalFrame* hp = new TGHorizontalFrame(m_frame);
249 
250  if (0) { TGTextButton* fileOpen = new TGTextButton (hp, "Open Geometry File");
251  hp->AddFrame(fileOpen);
252  fileOpen->Connect("Clicked()","FWGeometryTableView",this,"browse()");
253  }
254  {
255  TGTextButton* rb = new TGTextButton (hp, "CdTop");
256  hp->AddFrame(rb, new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0) );
257  rb->Connect("Clicked()","FWGeometryTableView",this,"cdTop()");
258  } {
259  TGTextButton* rb = new TGTextButton (hp, "CdUp");
260  hp->AddFrame(rb, new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
261  rb->Connect("Clicked()","FWGeometryTableView",this,"cdUp()");
262  }
263 
264  {
265  m_viewBox = new FWViewCombo(hp, this);
266  hp->AddFrame( m_viewBox,new TGLayoutHints(kLHintsExpandY, 2, 2, 0, 0));
267  }
268  {
269  hp->AddFrame(new TGLabel(hp, "Filter:"), new TGLayoutHints(kLHintsBottom, 10, 0, 0, 2));
271  m_filterEntry->SetHeight(20);
274  hp->AddFrame(m_filterEntry, new TGLayoutHints(kLHintsExpandX, 1, 2, 1, 0));
276  m_filterEntry->getListBox()->Connect("Selected(int)", "FWGeometryTableView", this, "filterListCallback()");
277  m_filterEntry->Connect("ReturnPressed()", "FWGeometryTableView", this, "filterTextEntryCallback()");
278 
279  gVirtualX->GrabKey( m_filterEntry->GetId(),gVirtualX->KeysymToKeycode((int)kKey_A), kKeyControlMask, true);
280  }
281  m_frame->AddFrame(hp,new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 4, 2, 2, 0));
282  }
283 
284  m_settersFrame = new TGHorizontalFrame(m_frame);
285  m_frame->AddFrame( m_settersFrame, new TGLayoutHints(kLHintsExpandX,4,2,2,2));
286  m_settersFrame->SetCleanup(kDeepCleanup);
287 
289  m_frame->AddFrame(m_tableWidget,new TGLayoutHints(kLHintsExpandX|kLHintsExpandY,2,2,0,0));
293  m_tableWidget->Connect("cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)",
294  "FWGeometryTableView",this,
295  "cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)");
297  resetSetters();
298 
299  if (tn)
300  {
301  m_tableManager->loadGeometry(tn, volumes);
302  cdTop();
303  }
304 
305  m_frame->MapSubwindows();
306  m_frame->Layout();
307  xf->Layout();
308  m_frame->MapWindow();
309 }
void loadGeometry(TGeoNode *, TObjArray *)
void SetBackgroundColor(Pixel_t)
TGCompositeFrame * m_frame
FWGeoMaterialValidator * m_filterValidator
void SetHeaderBackgroundColor(Pixel_t)
sigc::signal< void, T > changed_
FWColorManager * m_colorManager
void SetLineSeparatorColor(Pixel_t)
FWTableWidget * m_tableWidget
FWLongParameter m_visLevel
void disableGrowInWidth()
FWStringParameter m_filter
void setValidator(FWValidatorBase *)
bool addEntry(Long_t id, const std::string &txt)
FWGeometryTableManager * m_tableManager
FWGeoTopNode * m_eveTopNode
FWLongParameter m_autoExpand
const FWConfiguration * m_viewersConfig
FWColorPopup * m_colorPopup
FWBoolParameter m_visLevelFilter
FWLongParameter m_topNodeIdx
FWGUIValidatingTextEntry * m_filterEntry
FWViewBase(FWViewType::EType, unsigned int iVersion=1)
Definition: FWViewBase.cc:34
TEveWindowFrame * m_eveWindow
TGCompositeFrame * m_settersFrame
FWGeometryTableView::~FWGeometryTableView ( )
virtual

Definition at line 311 of file FWGeometryTableView.cc.

References m_eveTopNode, m_eveWindow, m_frame, m_tableManager, and x.

312 {
313  if (m_eveTopNode)
314  {
315  while ( m_eveTopNode->HasParents()) {
316  TEveElement* x = *m_eveTopNode->BeginParents();
317  x->RemoveElement(m_eveTopNode);
318  }
319  m_eveTopNode->DecDenyDestroy();
320  }
321 
322  // take out composite frame and delete it directly (zwithout the timeout)
323  TGCompositeFrame *frame = m_eveWindow->GetGUICompositeFrame();
324  frame->RemoveFrame( m_frame );
325  delete m_frame;
326 
327  m_eveWindow->DestroyWindowAndSlot();
328  delete m_tableManager;
329 }
TGCompositeFrame * m_frame
FWGeometryTableManager * m_tableManager
FWGeoTopNode * m_eveTopNode
Definition: DDAxes.h:10
TEveWindowFrame * m_eveWindow
FWGeometryTableView::FWGeometryTableView ( const FWGeometryTableView )
private

Member Function Documentation

void FWGeometryTableView::addTo ( FWConfiguration iTo) const
virtual

Reimplemented from FWConfigurableParameterizable.

Definition at line 334 of file FWGeometryTableView.cc.

References FWConfiguration::addKeyValue(), FWConfigurableParameterizable::addTo(), m_eveTopNode, and n.

335 {
337 
338  FWConfiguration viewers(1);
339  if (m_eveTopNode)
340  {
341  for (TEveElement::List_i it = m_eveTopNode->BeginParents(); it != m_eveTopNode->EndParents(); ++it )
342  {
343  FWConfiguration tempArea;
344  TEveScene* scene = dynamic_cast<TEveScene*>(*it);
345  std::string n = scene->GetElementName();
346  viewers.addKeyValue(n, tempArea);
347  }
348  }
349  iTo.addKeyValue("Viewers", viewers, true);
350 }
FWGeoTopNode * m_eveTopNode
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
virtual void addTo(FWConfiguration &) const
void FWGeometryTableView::autoExpandChanged ( )
private
void FWGeometryTableView::cdNode ( int  idx)

Definition at line 647 of file FWGeometryTableView.cc.

References FWGeometryTableManager::getNodePath(), m_tableManager, L1TEmulatorMonitor_cff::p, and setPath().

Referenced by chosenItem(), and setFrom().

648 {
649  std::string p;
650  m_tableManager->getNodePath(idx, p);
651  setPath(idx, p);
652 }
void getNodePath(int, std::string &) const
FWGeometryTableManager * m_tableManager
void setPath(int, std::string &)
void FWGeometryTableView::cdTop ( )

Definition at line 654 of file FWGeometryTableView.cc.

References m_tableManager, path(), FWGeometryTableManager::refEntries(), and setPath().

Referenced by FWGeometryTableView().

655 {
656  std::string path = "/" ;
657  path += m_tableManager->refEntries().at(0).name();
658  setPath(-1, path );
659 }
int path() const
Definition: HLTadd.h:3
FWGeometryTableManager * m_tableManager
void setPath(int, std::string &)
void FWGeometryTableView::cdUp ( )

Definition at line 661 of file FWGeometryTableView.cc.

References FWGeometryTableManager::getNodePath(), getTopNodeIdx(), m_tableManager, L1TEmulatorMonitor_cff::p, FWGeometryTableManager::refEntries(), and setPath().

662 {
663  if ( getTopNodeIdx() != -1)
664  {
665  int pIdx = m_tableManager->refEntries()[getTopNodeIdx()].m_parent;
666  std::string p;
667  m_tableManager->getNodePath(pIdx, p);
668  setPath(pIdx, p);
669  }
670 }
void getNodePath(int, std::string &) const
FWGeometryTableManager * m_tableManager
void setPath(int, std::string &)
void FWGeometryTableView::cellClicked ( Int_t  iRow,
Int_t  iColumn,
Int_t  iButton,
Int_t  iKeyMod,
Int_t  iGlobalX,
Int_t  iGlobalY 
)

Definition at line 472 of file FWGeometryTableView.cc.

References FWColorManager::backgroundColorIndex(), colors, FWTableManagerBase::dataChanged(), FWColorManager::fillLimitedColors(), FWGeometryTableManager::firstColumnClicked(), FWGeometryTableManager::getVisibility(), FWGeometryTableManager::getVisibilityChld(), FWColorPopup::InitContent(), FWColorManager::kBlackIndex, kCamera, FWGeometryTableManager::kColor, kInspectMaterial, kInspectShape, FWGeometryTableManager::kName, kSetTopNode, kSetTopNodeCam, kTableDebug, FWGeometryTableManager::kVisChild, kVisOff, kVisOn, FWGeometryTableManager::kVisSelf, m_colorManager, m_colorPopup, m_eveTopNode, m_tableManager, FWColorPopup::PlacePopup(), FWGeometryTableManager::refSelected(), FWColorPopup::ResetColors(), FWColorPopup::SetName(), FWGeometryTableManager::setSelection(), FWGeometryTableManager::setVisibility(), and FWGeometryTableManager::setVisibilityChld().

473 {
474  m_tableManager->setSelection(iRow, iColumn, iButton);
476 
477  if (iButton == kButton1)
478  {
479  if (iColumn == FWGeometryTableManager::kName)
480  {
482  return;
483  }
484  else if (iColumn == FWGeometryTableManager::kColor)
485  {
486  std::vector<Color_t> colors;
488 
489  if (!m_colorPopup) {
490  m_colorPopup = new FWColorPopup(gClient->GetDefaultRoot(), colors.front());
491  m_colorPopup->InitContent("", colors);
492  m_colorPopup->Connect("ColorSelected(Color_t)","FWGeometryTableView", const_cast<FWGeometryTableView*>(this), "nodeColorChangeRequested(Color_t)");
493  }
494  m_colorPopup->SetName("Selected");
496  m_colorPopup->PlacePopup(x, y, m_colorPopup->GetDefaultWidth(), m_colorPopup->GetDefaultHeight());
497  return;
498  }
499  else
500  {
501  bool elementChanged = false;
502  if (iColumn == FWGeometryTableManager::kVisSelf)
503  {
505  elementChanged = true;
506  }
507  if (iColumn == FWGeometryTableManager::kVisChild)
508  {
510  elementChanged = true;
511  }
512 
513 
514  if (m_eveTopNode && elementChanged)
515  {
516  m_eveTopNode->ElementChanged();
517  gEve->RegisterRedraw3D();
518  }
519  }
520 
521 
523 
524  }
525  else if (iColumn == FWGeometryTableManager::kName)
526  {
527  FWPopupMenu* m_nodePopup = new FWPopupMenu();
528  m_nodePopup->AddEntry("Set As Top Node", kSetTopNode);
529  m_nodePopup->AddEntry("Set As Top Node And Camera Center", kSetTopNodeCam);
530  m_nodePopup->AddSeparator();
531  m_nodePopup->AddEntry("Rnr Off For All Children", kVisOff);
532  m_nodePopup->AddEntry("Rnr On For All Children", kVisOn);
533  m_nodePopup->AddSeparator();
534  m_nodePopup->AddEntry("Set Camera Center", kCamera);
535  m_nodePopup->AddSeparator();
536  m_nodePopup->AddEntry("InspectMaterial", kInspectMaterial);
537  m_nodePopup->AddEntry("InspectShape", kInspectShape);
538  m_nodePopup->AddEntry("Table Debug", kTableDebug);
539 
540  m_nodePopup->PlaceMenu(x,y,true,true);
541  m_nodePopup->Connect("Activated(Int_t)",
542  "FWGeometryTableView",
543  const_cast<FWGeometryTableView*>(this),
544  "chosenItem(Int_t)");
545  }
546 }
void setVisibility(NodeInfo &nodeInfo, bool)
void InitContent(const char *name, const std::vector< Color_t > &colors, bool backgroundIsBlack=true)
void SetName(const char *iName)
bool getVisibilityChld(const NodeInfo &nodeInfo) const
void setVisibilityChld(NodeInfo &nodeInfo, bool)
std::vector< Color_t > colors
Definition: eve_filter.cc:26
void fillLimitedColors(std::vector< Color_t > &cv) const
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
FWColorManager * m_colorManager
void PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h)
BackgroundColorIndex backgroundColorIndex() const
bool getVisibility(const NodeInfo &nodeInfo) const
void ResetColors(const std::vector< Color_t > &colors, bool backgroundIsBlack=true)
FWGeometryTableManager * m_tableManager
FWGeoTopNode * m_eveTopNode
void setSelection(int row, int column, int mask)
FWColorPopup * m_colorPopup
Definition: DDAxes.h:10
void FWGeometryTableView::chosenItem ( int  x)

Definition at line 548 of file FWGeometryTableView.cc.

References cdNode(), FWGeometryTableManager::getNodeMatrix(), kCamera, kInspectMaterial, kInspectShape, kSetTopNode, kSetTopNodeCam, kTableDebug, kVisOff, kVisOn, FWGeometryTableManager::NodeInfo::m_node, FWGeometryTableManager::m_selectedIdx, m_tableManager, mergeVDriftHistosByStation::name, FWGeometryTableManager::printMaterials(), refreshTable3D(), FWGeometryTableManager::refSelected(), FWGeometryTableManager::setDaughtersSelfVisibility(), and v.

549 {
551  TGeoVolume* gv = ni.m_node->GetVolume();
552  bool visible = true;
553  bool resetHome = false;
554  if (gv)
555  {
556  switch (x) {
557  case kVisOff:
558  visible = false;
559  case kVisOn:
561  refreshTable3D();
562  break;
563 
564  case kInspectMaterial:
565  gv->InspectMaterial();
566  break;
567  case kInspectShape:
568  gv->InspectShape();
569  break;
570  case kTableDebug:
571  // std::cout << "node name " << ni.name() << "parent " <<m_tableManager->refEntries()[ni.m_parent].name() << std::endl;
572  // printf("node expanded [%d] imported[%d] children[%d]\n", ni.m_expanded,m_tableManager->nodeImported(m_tableManager->m_selectedIdx) , ni.m_node->GetNdaughters());
573  // m_tableManager->printChildren(
574  // m_tableManager->m_selectedIdx);
576  break;
577 
578  case kSetTopNode:
580  break;
581 
582  case kSetTopNodeCam:
584  resetHome = true;
585  case kCamera:
586  {
587  TGeoHMatrix mtx;
588  m_tableManager->getNodeMatrix( ni, mtx);
589 
590  static double pnt[3];
591  TGeoBBox* bb = static_cast<TGeoBBox*>( ni.m_node->GetVolume()->GetShape());
592  const double* origin = bb->GetOrigin();
593  mtx.LocalToMaster(origin, pnt);
594 
595  TEveElementList* vl = gEve->GetViewers();
596  for (TEveElement::List_i it = vl->BeginChildren(); it != vl->EndChildren(); ++it)
597  {
598  TEveViewer* v = ((TEveViewer*)(*it));
599  TString name = v->GetElementName();
600  if (name.Contains("3D"))
601  {
602  v->GetGLViewer()->SetDrawCameraCenter(true);
603  TGLCamera& cam = v->GetGLViewer()->CurrentCamera();
604  cam.SetExternalCenter(true);
605  cam.SetCenterVec(pnt[0], pnt[1], pnt[2]);
606  }
607  }
608  if (resetHome) gEve->FullRedraw3D(true, true);
609  break;
610  }
611  }
612  }
613 }
FWGeometryTableManager * m_tableManager
void getNodeMatrix(const NodeInfo &nodeInfo, TGeoHMatrix &mat) const
Definition: DDAxes.h:10
mathSSE::Vec4< T > v
FWGeometryTableView::ClassDef ( FWGeometryTableView  ,
 
)
private
void FWGeometryTableView::filterListCallback ( )

Definition at line 712 of file FWGeometryTableView.cc.

References FWGUIValidatingTextEntry::getListBox(), list(), m_filterEntry, m_filterValidator, FWGeoMaterialValidator::m_list, and updateFilter().

713 {
714  // std::cout << "list click ed \n" ;
715  TGListBox* list = m_filterEntry->getListBox();
716  TList selected;
717  list->GetSelectedEntries(&selected);
718  if (selected.GetEntries() == 1)
719  {
720  const TGLBEntry* entry = dynamic_cast<TGLBEntry*> (selected.First());
721  updateFilter( m_filterValidator->m_list[ entry->EntryId()].n);
722  }
723 }
void updateFilter(std::string &)
FWGeoMaterialValidator * m_filterValidator
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
std::vector< Material > m_list
FWGUIValidatingTextEntry * m_filterEntry
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 list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
void FWGeometryTableView::filterTextEntryCallback ( )

Definition at line 697 of file FWGeometryTableView.cc.

References funct::exp(), fwLog, FWGeoMaterialValidator::isStringValid(), fwlog::kError, m_filterEntry, m_filterValidator, and updateFilter().

698 {
699  // std::cout << "text entry click ed \n" ;
700  std::string exp = m_filterEntry->GetText();
701  if ( m_filterValidator->isStringValid(exp))
702  {
703  updateFilter(exp);
704  }
705  else
706  {
707  fwLog(fwlog::kError) << "filter expression not valid." << std::endl;
708  return;
709  }
710 }
void updateFilter(std::string &)
FWGeoMaterialValidator * m_filterValidator
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
bool isStringValid(std::string &exp)
#define fwLog(_level_)
Definition: fwLog.h:51
FWGUIValidatingTextEntry * m_filterEntry
int FWGeometryTableView::getAutoExpand ( ) const
inline
std::string FWGeometryTableView::getFilter ( ) const
inline

Definition at line 77 of file FWGeometryTableView.h.

References m_filter, and FWGenericParameter< T >::value().

Referenced by FWGeoTopNode::Paint(), and FWGeometryTableManager::updateFilter().

77 { return m_filter.value(); }
FWStringParameter m_filter
bool FWGeometryTableView::getIgnoreVisLevelWhenFilter ( ) const
inline
FWGeometryTableManager* FWGeometryTableView::getTableManager ( )
inline

Definition at line 83 of file FWGeometryTableView.h.

References m_tableManager.

Referenced by FWGeoTopNode::FWGeoTopNode(), FWGeoTopNode::Paint(), and FWGeoTopNode::paintChildNodesRecurse().

83 { return m_tableManager;}
FWGeometryTableManager * m_tableManager
int FWGeometryTableView::getTopNodeIdx ( ) const
inline
int FWGeometryTableView::getVisLevel ( ) const
inline

Definition at line 79 of file FWGeometryTableView.h.

References m_visLevel, and FWGenericParameter< T >::value().

Referenced by FWGeoTopNode::Paint().

79 {return m_visLevel.value(); }
FWLongParameter m_visLevel
bool FWGeometryTableView::getVolumeMode ( ) const
inline
void FWGeometryTableView::loadGeometry ( )
private
void FWGeometryTableView::makeSetter ( TGCompositeFrame *  frame,
FWParameterBase param 
)
private

Definition at line 420 of file FWGeometryTableView.cc.

References m_frame, m_setters, and FWParameterSetterBase::makeSetterFor().

Referenced by resetSetters().

421 {
422  boost::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor(param) );
423  ptr->attach(param, this);
424 
425  TGFrame* m_frame = ptr->build(frame, false);
426  frame->AddFrame(m_frame, new TGLayoutHints(kLHintsExpandX));
427 
428  m_setters.push_back(ptr);
429 }
TGCompositeFrame * m_frame
static boost::shared_ptr< FWParameterSetterBase > makeSetterFor(FWParameterBase *)
std::vector< boost::shared_ptr< FWParameterSetterBase > > m_setters
void FWGeometryTableView::modeChanged ( )
private

Definition at line 758 of file FWGeometryTableView.cc.

References m_tableManager, refreshTable3D(), and FWGeometryTableManager::updateFilter().

Referenced by FWGeometryTableView().

759 {
760  // reset filter when change mode
761  // std::cout << "chage mode \n";
763  refreshTable3D();
764 }
FWGeometryTableManager * m_tableManager
void FWGeometryTableView::nodeColorChangeRequested ( Color_t  col)
const FWGeometryTableView& FWGeometryTableView::operator= ( const FWGeometryTableView )
private
void FWGeometryTableView::populate3DViewsFromConfig ( )

Definition at line 368 of file FWGeometryTableView.cc.

References FWConfiguration::keyValues(), m_eveTopNode, m_viewBox, m_viewersConfig, asciidump::s, and FWViewCombo::setElement().

Referenced by FWGUIManager::setFrom().

369 {
370  // post-config
371  if (m_viewersConfig) {
372  TEveElementList* scenes = gEve->GetScenes();
374  if(0!=keyVals)
375  {
376  for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it!= keyVals->end(); ++it) {
377 
378  TString sname = it->first;
379  TEveElement* s = scenes->FindChild(sname);
380  if (s)
381  {
382  // std::cout << sname.Data() << std::endl;
383  if (!m_eveTopNode) {
384  m_eveTopNode = new FWGeoTopNode(this);
385  m_eveTopNode->IncDenyDestroy();
387  }
388  s->AddElement(m_eveTopNode);
389  }
390  }
391  }
392  }
393 }
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
const KeyValues * keyValues() const
void setElement(TEveElement *x)
FWGeoTopNode * m_eveTopNode
const FWConfiguration * m_viewersConfig
KeyValues::const_iterator KeyValuesIt
string s
Definition: asciidump.py:422
void FWGeometryTableView::printTable ( )

Definition at line 638 of file FWGeometryTableView.cc.

References m_tableManager, and FWGeometryTableManager::printChildren().

639 {
640  // print all entries
642 }
FWGeometryTableManager * m_tableManager
void FWGeometryTableView::refreshTable3D ( )
private

Definition at line 775 of file FWGeometryTableView.cc.

References m_eveTopNode, m_tableManager, and FWGeometryTableManager::redrawTable().

Referenced by chosenItem(), FWGeometryTableView(), modeChanged(), nodeColorChangeRequested(), setPath(), and updateFilter().

776 {
778 
779  if ( m_eveTopNode) {
780  m_eveTopNode->ElementChanged();
781  gEve->FullRedraw3D(false, true);
782  }
783 }
FWGeometryTableManager * m_tableManager
FWGeoTopNode * m_eveTopNode
void FWGeometryTableView::resetSetters ( )
private

Definition at line 396 of file FWGeometryTableView.cc.

References f, m_autoExpand, m_frame, m_mode, m_setters, m_settersFrame, m_visLevel, m_visLevelFilter, and makeSetter().

Referenced by FWGeometryTableView(), and setFrom().

397 {
398 
399  if (!m_settersFrame->GetList()->IsEmpty())
400  {
401  m_setters.clear();
402 
403  TGFrameElement *el = (TGFrameElement*) m_settersFrame->GetList()->First();
404  TGHorizontalFrame* f = (TGHorizontalFrame*) el->fFrame;
405  m_settersFrame->RemoveFrame(f);
406  }
407 
408  TGHorizontalFrame* frame = new TGHorizontalFrame(m_settersFrame);
409  m_settersFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX,4,2,2,2) );
410  m_settersFrame->SetCleanup(kDeepCleanup);
411  makeSetter(frame, &m_mode);
412  makeSetter(frame, &m_autoExpand);
413  makeSetter(frame, &m_visLevel);
414  makeSetter(frame, &m_visLevelFilter);
415  m_settersFrame->MapSubwindows();
416  m_frame->Layout();
417 }
TGCompositeFrame * m_frame
FWLongParameter m_visLevel
double f[11][100]
FWLongParameter m_autoExpand
std::vector< boost::shared_ptr< FWParameterSetterBase > > m_setters
void makeSetter(TGCompositeFrame *frame, FWParameterBase *param)
FWBoolParameter m_visLevelFilter
TGCompositeFrame * m_settersFrame
virtual void FWGeometryTableView::saveImageTo ( const std::string &  iName) const
inlinevirtual

Implements FWViewBase.

Definition at line 89 of file FWGeometryTableView.h.

89 {}
void FWGeometryTableView::selectView ( int  idx)

Definition at line 435 of file FWGeometryTableView.cc.

References m_eveTopNode, m_viewBox, FWViewCombo::setElement(), and v.

436 {
437  TEveElement::List_i it = gEve->GetViewers()->BeginChildren();
438  std::advance(it, idx);
439  TEveViewer* v = (TEveViewer*)(*it);
440  TEveSceneInfo* si = (TEveSceneInfo*)v->FindChild(Form("SI - EventScene %s",v->GetElementName()));
441 
442  bool added = false;
443  if (!m_eveTopNode) {
444  m_eveTopNode = new FWGeoTopNode(this);
445  m_eveTopNode->IncDenyDestroy();
447  }
448  else
449  {
450  for (TEveElement::List_i it = m_eveTopNode->BeginParents(); it != m_eveTopNode->EndParents(); ++it ){
451  if (*it == si->GetScene()) {
452  added = true;
453  break;
454  }
455  }
456  }
457  printf("add node %s \n", si->GetElementName());
458 
459  if (added)
460  si->GetScene()->RemoveElement(m_eveTopNode);
461  else
462  si->GetScene()->AddElement(m_eveTopNode);
463 
464  m_eveTopNode->ElementChanged();
465  gEve->Redraw3D();
466 }
void setElement(TEveElement *x)
FWGeoTopNode * m_eveTopNode
mathSSE::Vec4< T > v
void FWGeometryTableView::setBackgroundColor ( )

Definition at line 615 of file FWGeometryTableView.cc.

References FWColorManager::backgroundColorIndex(), FWColorManager::kWhiteIndex, m_colorManager, m_tableManager, m_tableWidget, FWTableWidget::SetBackgroundColor(), FWGeometryTableManager::setBackgroundToWhite(), and FWTableWidget::SetLineSeparatorColor().

Referenced by python.Vispa.Plugins.EdmBrowser.EventContentView.LabelItem::__init__().

616 {
618  if(backgroundIsWhite) {
621  } else {
624  }
625  m_tableManager->setBackgroundToWhite(backgroundIsWhite);
626  gClient->NeedRedraw(m_tableWidget);
627 }
void SetBackgroundColor(Pixel_t)
FWColorManager * m_colorManager
void SetLineSeparatorColor(Pixel_t)
FWTableWidget * m_tableWidget
BackgroundColorIndex backgroundColorIndex() const
FWGeometryTableManager * m_tableManager
void FWGeometryTableView::setFrom ( const FWConfiguration iFrom)
virtual

Reimplemented from FWConfigurableParameterizable.

Definition at line 353 of file FWGeometryTableView.cc.

References FWParameterizable::begin(), cdNode(), FWParameterizable::end(), m_filter, m_filterEntry, m_topNodeIdx, m_viewersConfig, resetSetters(), FWGenericParameter< T >::value(), and FWConfiguration::valueForKey().

354 {
355  for(const_iterator it =begin(), itEnd = end();
356  it != itEnd;
357  ++it) {
358  (*it)->setFrom(iFrom);
359 
360  }
361  m_filterEntry->SetText(m_filter.value().c_str(), false);
362  resetSetters();
364  m_viewersConfig = iFrom.valueForKey("Viewers");
365 }
std::vector< FWParameterBase * >::const_iterator const_iterator
const_iterator begin() const
FWStringParameter m_filter
const_iterator end() const
const FWConfiguration * m_viewersConfig
const FWConfiguration * valueForKey(const std::string &iKey) const
FWLongParameter m_topNodeIdx
FWGUIValidatingTextEntry * m_filterEntry
void FWGeometryTableView::setPath ( int  parentIdx,
std::string &  path 
)

Definition at line 672 of file FWGeometryTableView.cc.

References FWGeometryTableManager::checkExpandLevel(), m_eveTopNode, m_tableManager, m_topNodeIdx, FWGeometryTableManager::redrawTable(), refreshTable3D(), FWGenericParameter< T >::set(), FWGeometryTableManager::topGeoNodeChanged(), and FWGeometryTableManager::updateFilter().

Referenced by cdNode(), cdTop(), and cdUp().

673 {
674  m_topNodeIdx.set(parentIdx);
675 #ifdef PERFTOOL_BROWSER
676  ProfilerStart(Form("cdPath%d.prof", parentIdx));
677 #endif
678 
679  m_tableManager->topGeoNodeChanged(parentIdx);
682 
683  refreshTable3D();
684  // printf("END Set Path to [%s], curren node %s \n", m_path.value().c_str(), topNode->GetName());
685 
687  if ( m_eveTopNode) {
688  m_eveTopNode->ElementChanged();
689  gEve->FullRedraw3D(false, true);
690  }
691 
692 #ifdef PERFTOOL_BROWSER
693  ProfilerStop();
694 #endif
695 }
FWGeometryTableManager * m_tableManager
FWGeoTopNode * m_eveTopNode
FWLongParameter m_topNodeIdx
void FWGeometryTableView::updateFilter ( std::string &  exp)

Definition at line 727 of file FWGeometryTableView.cc.

References FWGeometryTableManager::checkExpandLevel(), i, m_filter, m_filterEntry, m_filterValidator, FWGeoMaterialValidator::m_list, m_tableManager, FWGeometryTableManager::refEntries(), refreshTable3D(), FWGenericParameter< T >::set(), FWGeometryTableManager::setVisibility(), FWGeometryTableManager::setVisibilityChld(), FWGeometryTableManager::updateFilter(), and FWGenericParameter< T >::value().

Referenced by filterListCallback(), and filterTextEntryCallback().

728 {
729  // std::cout << "=FWGeometryTableView::updateFilter()" << m_filterEntry->GetText() <<std::endl;
730 
731  if (exp == m_filterValidator->m_list.begin()->n)
732  exp.clear();
733 
734  if (exp == m_filter.value()) return;
735 
736  if (exp.empty())
737  {
738  // std::cout << "FITLER OFF \n";
740  {
741  m_tableManager->setVisibility(*i, true);
743  }
744 
745  // NOTE: entry should be cleared automatically
746  m_filterEntry->Clear();
747 
749  }
750 
751  m_filter.set(exp);
753  refreshTable3D();
754 
755 }
void setVisibility(NodeInfo &nodeInfo, bool)
int i
Definition: DBlmapReader.cc:9
FWGeoMaterialValidator * m_filterValidator
void setVisibilityChld(NodeInfo &nodeInfo, bool)
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
FWStringParameter m_filter
FWGeometryTableManager * m_tableManager
std::vector< Material > m_list
Entries_v::iterator Entries_i
FWGUIValidatingTextEntry * m_filterEntry

Member Data Documentation

FWLongParameter FWGeometryTableView::m_autoExpand
private

Definition at line 103 of file FWGeometryTableView.h.

Referenced by FWGeometryTableView(), getAutoExpand(), and resetSetters().

FWColorManager* FWGeometryTableView::m_colorManager
private

Definition at line 109 of file FWGeometryTableView.h.

Referenced by cellClicked(), and setBackgroundColor().

FWColorPopup* FWGeometryTableView::m_colorPopup
private

Definition at line 116 of file FWGeometryTableView.h.

Referenced by cellClicked().

FWGeoTopNode* FWGeometryTableView::m_eveTopNode
private
TEveWindowFrame* FWGeometryTableView::m_eveWindow
private

Definition at line 118 of file FWGeometryTableView.h.

Referenced by FWGeometryTableView(), and ~FWGeometryTableView().

FWStringParameter FWGeometryTableView::m_filter
private

Definition at line 102 of file FWGeometryTableView.h.

Referenced by getFilter(), setFrom(), and updateFilter().

FWGUIValidatingTextEntry* FWGeometryTableView::m_filterEntry
private
FWGeoMaterialValidator* FWGeometryTableView::m_filterValidator
private
TGCompositeFrame* FWGeometryTableView::m_frame
private
FWEnumParameter FWGeometryTableView::m_mode
private

Definition at line 101 of file FWGeometryTableView.h.

Referenced by FWGeometryTableView(), getVolumeMode(), and resetSetters().

std::vector<boost::shared_ptr<FWParameterSetterBase> > FWGeometryTableView::m_setters
private

Definition at line 129 of file FWGeometryTableView.h.

Referenced by makeSetter(), and resetSetters().

TGCompositeFrame* FWGeometryTableView::m_settersFrame
private

Definition at line 113 of file FWGeometryTableView.h.

Referenced by FWGeometryTableView(), and resetSetters().

FWGeometryTableManager* FWGeometryTableView::m_tableManager
private
FWTableWidget* FWGeometryTableView::m_tableWidget
private

Definition at line 110 of file FWGeometryTableView.h.

Referenced by FWGeometryTableView(), and setBackgroundColor().

FWLongParameter FWGeometryTableView::m_topNodeIdx
private

Definition at line 106 of file FWGeometryTableView.h.

Referenced by getTopNodeIdx(), setFrom(), and setPath().

FWViewCombo* FWGeometryTableView::m_viewBox
private
const FWConfiguration* FWGeometryTableView::m_viewersConfig
private

Definition at line 126 of file FWGeometryTableView.h.

Referenced by populate3DViewsFromConfig(), and setFrom().

FWLongParameter FWGeometryTableView::m_visLevel
private

Definition at line 104 of file FWGeometryTableView.h.

Referenced by FWGeometryTableView(), getVisLevel(), and resetSetters().

FWBoolParameter FWGeometryTableView::m_visLevelFilter
private