CMS 3D CMS Logo

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

#include <Fireworks/Core/interface/CmsShowEDI.h>

Inheritance diagram for CmsShowEDI:

Public Member Functions

void changeItemColor (Color_t color)
 
void changeItemOpacity (Int_t opacity)
 
void changeSelectionColor (Color_t color)
 
 ClassDefOverride (CmsShowEDI, 0)
 
void CloseWindow () override
 
 CmsShowEDI (const TGWindow *p=nullptr, UInt_t w=1, UInt_t h=1, FWSelectionManager *selMgr=nullptr, FWColorManager *colorMgr=nullptr)
 
void colorSetChanged ()
 
void deselectAll ()
 
void disconnectAll ()
 
void fillEDIFrame ()
 
void moveToBack ()
 
void moveToFront ()
 
void moveToLayer (Long_t)
 
void removeItem ()
 
void runFilter ()
 
void runSelection ()
 
void selectAll ()
 
void show (FWDataCategories)
 
void toggleItemVisible (Bool_t on=kTRUE)
 
void updateDisplay ()
 
void updateFilter ()
 
void updateLayerControls ()
 
 ~CmsShowEDI () override
 

Private Member Functions

void clearPBFrame ()
 
 CmsShowEDI (const CmsShowEDI &)
 
const CmsShowEDIoperator= (const CmsShowEDI &)
 

Private Attributes

TGTextButton * m_backButton
 
FWColorManagerm_colorManager
 
FWColorSelectm_colorSelectWidget
 
FWColorSelectm_cw
 
TGTextButton * m_deselectAllButton
 
sigc::connection m_destroyedConn
 
sigc::connection m_displayChangedConn
 
TGTextButton * m_filterButton
 
TGTextView * m_filterError
 
FWGUIValidatingTextEntrym_filterExpressionEntry
 
TGTextButton * m_frontButton
 
TGTextEntry * m_instanceEntry
 
TGCheckButton * m_isVisibleButton
 
FWEventItemm_item
 
TGNumberEntry * m_layerEntry
 
sigc::connection m_modelChangedConn
 
TGTextEntry * m_moduleEntry
 
TGTextEntry * m_nameEntry
 
TGLabel * m_objectLabel
 
TGHSlider * m_opacitySlider
 
TGTextEntry * m_processEntry
 
TGTextButton * m_removeButton
 
TGTextButton * m_selectAllButton
 
TGTextButton * m_selectButton
 
TGTextView * m_selectError
 
FWGUIValidatingTextEntrym_selectExpressionEntry
 
FWSelectionManagerm_selectionManager
 
TGCompositeFrame * m_settersFrame
 
TGTab * m_tabs
 
TGTextEntry * m_typeEntry
 
FWExpressionValidatorm_validator
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 52 of file CmsShowEDI.h.

Constructor & Destructor Documentation

◆ CmsShowEDI() [1/2]

CmsShowEDI::CmsShowEDI ( const TGWindow *  p = nullptr,
UInt_t  w = 1,
UInt_t  h = 1,
FWSelectionManager selMgr = nullptr,
FWColorManager colorMgr = nullptr 
)

Definition at line 64 of file CmsShowEDI.cc.

65  : TGTransientFrame(gClient->GetDefaultRoot(), p, w, h),
66  m_item(nullptr),
68  m_colorManager(colorMgr),
69  m_settersFrame(nullptr) {
70  m_selectionManager = selMgr;
71  SetCleanup(kDeepCleanup);
72 
74 
75  TGVerticalFrame* vf = new TGVerticalFrame(this);
76  AddFrame(vf, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0));
77  FWDialogBuilder builder(vf, nullptr, true);
78 
79  builder.indent(0)
80  .expand(true, false)
81  .addLabel(" ", 14, 2, &m_objectLabel)
82  // .vSpacer()
83  .tabs(&m_tabs)
84  .beginTab("Graphics")
85  .indent(3)
86  .addLabel("Color", 8)
87  .addColorPicker(colorMgr, &m_colorSelectWidget)
88  .expand(false)
89  .addHSeparator()
90  .addLabel("Opacity", 8)
91  .addHSlider(150, &m_opacitySlider)
92  .addHSeparator()
93  .addCheckbox("Visible", &m_isVisibleButton)
94  .addHSeparator()
95  .addLabel("Drawing order", 8)
96  .addTextButton("To back", &m_backButton)
97  .floatLeft()
98  .expand(false)
99  .addNumberEntry(
100  0.0, 4, TGNumberFormat::kNESInteger, FWEventItem::minLayerValue(), FWEventItem::maxLayerValue(), &m_layerEntry)
101  .expand(false)
102  .floatLeft()
103  .addTextButton("To front", &m_frontButton)
104  .expand(false)
105  .vSpacer()
106  .addHSeparator()
107  .endTab()
108  .beginTab("Filter")
109  .indent(3)
110  .addLabel("Expression", 8)
111  .addValidatingTextEntry(nullptr, &m_filterExpressionEntry)
112  .floatLeft()
113  .addTextButton("Filter", &m_filterButton)
114  .expand(false)
115  .addTextView("", &m_filterError)
116  .vSpacer()
117  .endTab()
118  .beginTab("Select")
119  .indent(3)
120  .addLabel("Expression", 8)
121  .addValidatingTextEntry(nullptr, &m_selectExpressionEntry)
122  .addTextButton("Select", &m_selectButton)
123  .floatLeft()
124  .expand(false)
125  .addTextButton("Select all", &m_selectAllButton)
126  .expand(false)
127  .floatLeft()
128  .addTextButton("Unselect all", &m_deselectAllButton)
129  .expand(false)
130  .indent(3)
131  .addLabel("Color Selection", 8)
132  .addColorPicker(colorMgr, &m_cw)
133  .expand(false)
134  .addTextView("", &m_selectError)
135  .vSpacer()
136  .endTab()
137  .beginTab("Data")
138  .indent(3)
139  .addLabel("Name:", 8)
140  .addTextEntry("None", &m_nameEntry)
141  .addLabel("Labels:", 8)
142  .addLabel("Type:", 8)
143  .addTextEntry("None", &m_typeEntry)
144  .addLabel("Module:", 8)
145  .addTextEntry("None", &m_moduleEntry)
146  .addLabel("Instance:", 8)
147  .addTextEntry("None", &m_instanceEntry)
148  .addLabel("Process:", 8)
149  .addTextEntry("None", &m_processEntry)
150  .addHSeparator()
151  .addTextButton("Remove collection", &m_removeButton)
152  .expand(false)
153  .vSpacer()
154  .endTab()
155  .untabs();
156 
157  m_filterError->SetForegroundColor(gVirtualX->GetPixel(kRed));
158  m_filterError->SetBackgroundColor(TGFrame::GetDefaultFrameBackground());
159  m_filterError->ChangeOptions(0);
160 
161  m_selectError->SetForegroundColor(gVirtualX->GetPixel(kRed));
162  m_selectError->SetBackgroundColor(TGFrame::GetDefaultFrameBackground());
163  m_selectError->ChangeOptions(0);
164 
167 
168  m_colorSelectWidget->Connect("ColorChosen(Color_t)", "CmsShowEDI", this, "changeItemColor(Color_t)");
169  m_cw->Connect("ColorChosen(Color_t)", "CmsShowEDI", this, "changeSelectionColor(Color_t)");
170  m_opacitySlider->Connect("PositionChanged(Int_t)", "CmsShowEDI", this, "changeItemOpacity(Int_t)");
171  m_isVisibleButton->Connect("Toggled(Bool_t)", "CmsShowEDI", this, "toggleItemVisible(Bool_t)");
172  m_filterExpressionEntry->Connect("ReturnPressed()", "CmsShowEDI", this, "runFilter()");
173  m_filterButton->Connect("Clicked()", "CmsShowEDI", this, "runFilter()");
174  m_selectExpressionEntry->Connect("ReturnPressed()", "CmsShowEDI", this, "runSelection()");
175  m_selectButton->Connect("Clicked()", "CmsShowEDI", this, "runSelection()");
176  m_removeButton->Connect("Clicked()", "CmsShowEDI", this, "removeItem()");
177  m_selectAllButton->Connect("Clicked()", "CmsShowEDI", this, "selectAll()");
178  m_deselectAllButton->Connect("Clicked()", "CmsShowEDI", this, "deselectAll()");
179  m_frontButton->Connect("Clicked()", "CmsShowEDI", this, "moveToFront()");
180  m_backButton->Connect("Clicked()", "CmsShowEDI", this, "moveToBack()");
181  m_layerEntry->Connect("ValueSet(Long_t)", "CmsShowEDI", this, "moveToLayer(Long_t)");
182 
183  TGCompositeFrame* cf = m_tabs->GetTabContainer(0);
184  m_settersFrame = new TGVerticalFrame(cf);
185  m_settersFrame->SetCleanup(kDeepCleanup);
186  cf->AddFrame(m_settersFrame, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
187 
188  SetWindowName("Collection Controller");
189  MapSubwindows();
190  Resize(GetDefaultSize());
191  Layout();
192 
193  fillEDIFrame();
194 }

References FWDialogBuilder::addCheckbox(), FWDialogBuilder::addColorPicker(), FWDialogBuilder::addHSeparator(), FWDialogBuilder::addHSlider(), FWDialogBuilder::addLabel(), FWDialogBuilder::addNumberEntry(), FWDialogBuilder::addTextButton(), FWDialogBuilder::addTextEntry(), FWDialogBuilder::addTextView(), FWDialogBuilder::addValidatingTextEntry(), FWDialogBuilder::beginTab(), FWDialogBuilder::endTab(), FWDialogBuilder::expand(), fillEDIFrame(), FWDialogBuilder::floatLeft(), FWDialogBuilder::indent(), FWSelectionManager::itemSelectionChanged_, m_backButton, m_colorSelectWidget, m_cw, m_deselectAllButton, m_filterButton, m_filterError, m_filterExpressionEntry, m_frontButton, m_instanceEntry, m_isVisibleButton, m_layerEntry, m_moduleEntry, m_nameEntry, m_objectLabel, m_opacitySlider, m_processEntry, m_removeButton, m_selectAllButton, m_selectButton, m_selectError, m_selectExpressionEntry, m_selectionManager, m_settersFrame, m_tabs, m_typeEntry, m_validator, FWEventItem::maxLayerValue(), FWEventItem::minLayerValue(), FWGUIValidatingTextEntry::setValidator(), FWDialogBuilder::tabs(), FWDialogBuilder::untabs(), and FWDialogBuilder::vSpacer().

◆ ~CmsShowEDI()

CmsShowEDI::~CmsShowEDI ( )
override

Definition at line 201 of file CmsShowEDI.cc.

201  {
202  disconnectAll();
203  m_colorSelectWidget->Disconnect("ColorSelected(Pixel_t)", this, "changeItemColor(Pixel_t)");
204  m_cw->Disconnect("ColorSelected(Pixel_t)", this, "changeSelectionColor(Pixel_t)");
205  m_opacitySlider->Disconnect("PositionChanged(Int_t)", this, "changeItemColor");
206  m_isVisibleButton->Disconnect("Toggled(Bool_t)", this, "toggleItemVisible(Bool_t)");
207  m_filterExpressionEntry->Disconnect("ReturnPressed()", this, "runFilter()");
208  m_selectExpressionEntry->Disconnect("ReturnPressed()", this, "runSelection()");
209  m_filterButton->Disconnect("Clicked()", this, "runFilter()");
210  m_selectButton->Disconnect("Clicked()", this, "runSelection()");
211  m_selectAllButton->Disconnect("Clicked()", this, "selectAll()");
212  m_deselectAllButton->Disconnect("Clicked()", this, "deselectAll()");
213  m_removeButton->Disconnect("Clicked()", this, "removeItem()");
214  m_frontButton->Disconnect("Clicked()", this, "moveToFront()");
215  m_backButton->Disconnect("Clicked()", this, "moveToBack()");
216  m_layerEntry->Disconnect("ValueSet(Long_t)", this, "moveToLayer(Long_t)");
217  // delete m_objectLabel;
218  // delete m_colorSelectWidget;
219  // delete m_isVisibleButton;
220  delete m_validator;
221 }

References disconnectAll(), m_backButton, m_colorSelectWidget, m_cw, m_deselectAllButton, m_filterButton, m_filterExpressionEntry, m_frontButton, m_isVisibleButton, m_layerEntry, m_opacitySlider, m_removeButton, m_selectAllButton, m_selectButton, m_selectExpressionEntry, and m_validator.

◆ CmsShowEDI() [2/2]

CmsShowEDI::CmsShowEDI ( const CmsShowEDI )
private

Member Function Documentation

◆ changeItemColor()

void CmsShowEDI::changeItemColor ( Color_t  color)

Set the item color.

Notice that I changed this to use a "Copy and modify approach", rather than a "create with old properties" method which was not propagating transparency.

Definition at line 410 of file CmsShowEDI.cc.

410  {
412  changeProperties.setColor(color);
413  m_item->setDefaultDisplayProperties(changeProperties);
414  m_cw->SetColorByIndex(color, kFALSE);
415 }

References FWEventItem::defaultDisplayProperties(), m_cw, m_item, FWDisplayProperties::setColor(), FWColorSelect::SetColorByIndex(), and FWEventItem::setDefaultDisplayProperties().

◆ changeItemOpacity()

void CmsShowEDI::changeItemOpacity ( Int_t  opacity)

Changes selected item opacity. Notice that we use opacity rather than transparency because this way the slider is by default 100% rather than 0. This is more a more natural and positive way of looking at things.

Glass is full!

See changeItemColor for additional details.

Definition at line 431 of file CmsShowEDI.cc.

431  {
433  changeProperties.setTransparency(100 - opacity);
434  m_item->setDefaultDisplayProperties(changeProperties);
435 }

References FWEventItem::defaultDisplayProperties(), m_item, FWEventItem::setDefaultDisplayProperties(), and FWDisplayProperties::setTransparency().

◆ changeSelectionColor()

void CmsShowEDI::changeSelectionColor ( Color_t  color)

Definition at line 488 of file CmsShowEDI.cc.

488  {
489  FWChangeSentry sentry(*(m_item->changeManager()));
490  const std::set<FWModelId>& ss = m_item->selectionManager()->selected();
492  dp.setColor(c);
493  for (std::set<FWModelId>::const_iterator i = ss.begin(); i != ss.end(); ++i) {
494  m_item->setDisplayProperties(i->index(), dp);
495  }
496 }

References c, FWEventItem::changeManager(), FWEventItem::defaultDisplayProperties(), Calorimetry_cff::dp, mps_fire::i, m_item, FWSelectionManager::selected(), FWEventItem::selectionManager(), FWEventItem::setDisplayProperties(), and contentValuesCheck::ss.

◆ ClassDefOverride()

CmsShowEDI::ClassDefOverride ( CmsShowEDI  ,
 
)

◆ clearPBFrame()

void CmsShowEDI::clearPBFrame ( )
private

Definition at line 239 of file CmsShowEDI.cc.

239  {
240  if (!m_settersFrame->GetList()->IsEmpty()) {
241  // printf("remove FRAME \n");
242  TGFrameElement* el = (TGFrameElement*)m_settersFrame->GetList()->First();
243  TGFrame* f = el->fFrame;
244  f->UnmapWindow();
245  m_settersFrame->RemoveFrame(f);
246  f->DestroyWindow();
247  }
248 }

References f, and m_settersFrame.

Referenced by disconnectAll(), and fillEDIFrame().

◆ CloseWindow()

void CmsShowEDI::CloseWindow ( )
inlineoverride

Definition at line 61 of file CmsShowEDI.h.

61 { UnmapWindow(); }

◆ colorSetChanged()

void CmsShowEDI::colorSetChanged ( )

◆ deselectAll()

void CmsShowEDI::deselectAll ( )

Definition at line 481 of file CmsShowEDI.cc.

481  {
482  FWChangeSentry sentry(*(m_item->changeManager()));
483  for (int i = 0; i < static_cast<int>(m_item->size()); i++) {
484  m_item->unselect(i);
485  }
486 }

References FWEventItem::changeManager(), mps_fire::i, m_item, FWEventItem::size(), and FWEventItem::unselect().

◆ disconnectAll()

void CmsShowEDI::disconnectAll ( )

Definition at line 364 of file CmsShowEDI.cc.

364  {
365  m_objectLabel->SetText("No Collection Selected");
366  clearPBFrame();
367  if (nullptr != m_item) {
368  m_displayChangedConn.disconnect();
369  m_modelChangedConn.disconnect();
370  m_destroyedConn.disconnect();
371  m_item = nullptr;
373  m_opacitySlider->SetPosition(100);
374  m_isVisibleButton->SetDisabledAndSelected(kTRUE);
375  m_filterExpressionEntry->SetText(nullptr);
376  m_selectExpressionEntry->SetText(nullptr);
377  m_nameEntry->SetText(nullptr);
378  m_typeEntry->SetText(nullptr);
379  m_moduleEntry->SetText(nullptr);
380  m_instanceEntry->SetText(nullptr);
381  m_processEntry->SetText(nullptr);
382  // else m_isVisibleButton->SetState(kButtonDown, kFALSE);
383  m_colorSelectWidget->SetEnabled(kFALSE);
384  m_opacitySlider->SetEnabled(kFALSE);
385 
386  m_isVisibleButton->SetEnabled(kFALSE);
387  m_filterExpressionEntry->SetEnabled(kFALSE);
388  m_filterButton->SetEnabled(kFALSE);
389  m_selectExpressionEntry->SetEnabled(kFALSE);
390  m_selectButton->SetEnabled(kFALSE);
391  m_selectAllButton->SetEnabled(kFALSE);
392  m_deselectAllButton->SetEnabled(kFALSE);
393  m_removeButton->SetEnabled(kFALSE);
394  m_backButton->SetEnabled(kFALSE);
395  m_frontButton->SetEnabled(kFALSE);
396  m_layerEntry->SetIntNumber(0);
397  m_layerEntry->SetState(kFALSE);
398  m_layerEntry->GetNumberEntry()->SetEnabled(kFALSE);
399  m_layerEntry->GetButtonUp()->SetEnabled(kFALSE);
400  m_layerEntry->GetButtonDown()->SetEnabled(kFALSE);
401  }
402 }

References clearPBFrame(), m_backButton, m_colorSelectWidget, m_deselectAllButton, m_destroyedConn, m_displayChangedConn, m_filterButton, m_filterExpressionEntry, m_frontButton, m_instanceEntry, m_isVisibleButton, m_item, m_layerEntry, m_modelChangedConn, m_moduleEntry, m_nameEntry, m_objectLabel, m_opacitySlider, m_processEntry, m_removeButton, m_selectAllButton, m_selectButton, m_selectExpressionEntry, m_typeEntry, and FWColorSelect::SetColorByIndex().

Referenced by fillEDIFrame(), and ~CmsShowEDI().

◆ fillEDIFrame()

void CmsShowEDI::fillEDIFrame ( )

Definition at line 250 of file CmsShowEDI.cc.

250  {
251  FWEventItem* iItem = nullptr;
252  bool multipleCollections = false;
253  if (!m_selectionManager->selectedItems().empty()) {
254  if (m_selectionManager->selectedItems().size() == 1) {
255  iItem = *(m_selectionManager->selectedItems().begin());
256  } else {
257  multipleCollections = true;
258  }
259  }
260  //m_item can be zero because we had 0 or many collections selected
261  if (nullptr == m_item || iItem != m_item) {
262  disconnectAll();
263  m_item = iItem;
264  if (nullptr != m_item) {
266  m_objectLabel->SetText(iItem->name().c_str());
267  m_colorSelectWidget->SetColorByIndex(p.color(), kFALSE);
268  m_opacitySlider->SetPosition(100 - p.transparency());
269  m_isVisibleButton->SetDisabledAndSelected(p.isVisible());
270  m_validator->setType(edm::TypeWithDict(*(iItem->modelType()->GetTypeInfo())));
271  m_filterExpressionEntry->SetText(iItem->filterExpression().c_str());
272  m_filterError->Clear();
273  m_selectError->Clear();
274  m_nameEntry->SetText(iItem->name().c_str());
275  m_typeEntry->SetText(iItem->type()->GetName());
276  m_moduleEntry->SetText(iItem->moduleLabel().c_str());
277  m_instanceEntry->SetText(iItem->productInstanceLabel().c_str());
278  m_processEntry->SetText(iItem->processName().c_str());
279  // else m_isVisibleButton->SetState(kButtonDown, kFALSE);
280  m_colorSelectWidget->SetEnabled(kTRUE);
281  m_opacitySlider->SetEnabled(kTRUE);
282  m_isVisibleButton->SetEnabled(kTRUE);
283  m_filterExpressionEntry->SetEnabled(kTRUE);
284  m_selectExpressionEntry->SetEnabled(kTRUE);
285  m_filterButton->SetEnabled(kTRUE);
286  m_selectButton->SetEnabled(kTRUE);
287  m_selectAllButton->SetEnabled(kTRUE);
288  m_deselectAllButton->SetEnabled(kTRUE);
289  m_cw->SetColorByIndex(p.color(), kFALSE);
290  m_cw->SetEnabled(kTRUE);
291  m_removeButton->SetEnabled(kTRUE);
293  m_layerEntry->SetState(kTRUE);
296  m_modelChangedConn = m_item->changed_.connect(std::bind(&CmsShowEDI::updateFilter, this));
297  // m_selectionChangedConn = m_selectionManager->selectionChanged_.connect(boost::bind(&CmsShowEDI::updateSelection, this));
299 
300  clearPBFrame();
302  } else if (multipleCollections) {
303  std::ostringstream s;
304  s << m_selectionManager->selectedItems().size() << " Collections Selected";
305  m_objectLabel->SetText(s.str().c_str());
306  }
307 
308  Resize(GetDefaultSize());
309  Layout();
310  }
311 }

References FWEventItem::changed_, clearPBFrame(), FWEventItem::defaultDisplayProperties(), FWEventItem::defaultDisplayPropertiesChanged_, disconnectAll(), FWEventItem::filterExpression(), FWEventItem::getConfig(), FWEventItem::goingToBeDestroyed_, m_colorSelectWidget, m_cw, m_deselectAllButton, m_destroyedConn, m_displayChangedConn, m_filterButton, m_filterError, m_filterExpressionEntry, m_instanceEntry, m_isVisibleButton, m_item, m_layerEntry, m_modelChangedConn, m_moduleEntry, m_nameEntry, m_objectLabel, m_opacitySlider, m_processEntry, m_removeButton, m_selectAllButton, m_selectButton, m_selectError, m_selectExpressionEntry, m_selectionManager, m_settersFrame, m_typeEntry, m_validator, FWEventItem::modelType(), FWEventItem::moduleLabel(), FWEventItem::name(), AlCaHLTBitMon_ParallelJobs::p, FWProxyBuilderConfiguration::populateFrame(), FWEventItem::processName(), FWEventItem::productInstanceLabel(), alignCSCRings::s, FWSelectionManager::selectedItems(), FWColorSelect::SetColorByIndex(), FWExpressionValidator::setType(), FWEventItem::type(), updateDisplay(), updateFilter(), and updateLayerControls().

Referenced by CmsShowEDI().

◆ moveToBack()

void CmsShowEDI::moveToBack ( )

Definition at line 349 of file CmsShowEDI.cc.

349  {
350  m_item->moveToBack();
352 }

References m_item, FWEventItem::moveToBack(), and updateLayerControls().

◆ moveToFront()

void CmsShowEDI::moveToFront ( )

Definition at line 353 of file CmsShowEDI.cc.

353  {
354  m_item->moveToFront();
356 }

References m_item, FWEventItem::moveToFront(), and updateLayerControls().

◆ moveToLayer()

void CmsShowEDI::moveToLayer ( Long_t  )

Definition at line 357 of file CmsShowEDI.cc.

357  {
358  m_item->moveToLayer(static_cast<Int_t>(m_layerEntry->GetIntNumber()));
360 }

References m_item, m_layerEntry, FWEventItem::moveToLayer(), and updateLayerControls().

◆ operator=()

const CmsShowEDI& CmsShowEDI::operator= ( const CmsShowEDI )
private

◆ removeItem()

void CmsShowEDI::removeItem ( )

Definition at line 313 of file CmsShowEDI.cc.

313  {
314  Int_t chosen = 0;
315  std::string message("This action will remove the ");
316  message += m_item->name();
317  message +=
318  " collection from the display."
319  "\nIf you wish to return the collection you would have to use the 'Add Collection' window.";
320  new TGMsgBox(gClient->GetDefaultRoot(),
321  this,
322  "Remove Collection Confirmation",
323  message.c_str(),
324  kMBIconExclamation,
325  kMBCancel | kMBApply,
326  &chosen);
327  if (kMBApply == chosen) {
328  m_item->destroy();
329  m_item = nullptr;
330  //make sure the ROOT global editor does not try to use this
331  gEve->EditElement(nullptr);
332  gEve->Redraw3D();
333  }
334 }

References FWEventItem::destroy(), m_item, FWEventItem::name(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ runFilter()

void CmsShowEDI::runFilter ( )

Definition at line 437 of file CmsShowEDI.cc.

437  {
438  const std::string filter(m_filterExpressionEntry->GetText());
439  if (m_item != nullptr) {
440  try {
441  m_filterError->Clear();
443  } catch (const FWExpressionException& e) {
444  m_filterError->AddLine(e.what().c_str());
445  m_filterError->Update();
446  if (e.column() > -1) {
447  m_filterExpressionEntry->SetCursorPosition(e.column());
448  }
449  }
450  }
451 }

References MillePedeFileConverter_cfg::e, ALCARECOTkAlBeamHalo_cff::filter, m_filterError, m_filterExpressionEntry, m_item, FWEventItem::setFilterExpression(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ runSelection()

void CmsShowEDI::runSelection ( )

Definition at line 453 of file CmsShowEDI.cc.

453  {
454  FWModelExpressionSelector selector;
456  if (m_item != nullptr) {
457  try {
458  m_selectError->Clear();
459  //NOTE call clearModelSelectionLeaveItem so that the item does not get deselected
460  // just for safety use a copy of the pointer to m_item
462  item->selectionManager()->clearModelSelectionLeaveItem();
463 
464  selector.select(item, selection, TColor::GetColor(m_cw->GetColor()));
465  } catch (const FWExpressionException& e) {
466  m_selectError->AddLine(e.what().c_str());
467  m_selectError->Update();
468  if (e.column() > -1) {
469  m_selectExpressionEntry->SetCursorPosition(e.column());
470  }
471  }
472  }
473 }

References MillePedeFileConverter_cfg::e, B2GTnPMonitor_cfi::item, m_cw, m_item, m_selectError, m_selectExpressionEntry, FWModelExpressionSelector::select(), corrVsCorr::selection, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ selectAll()

void CmsShowEDI::selectAll ( )

Definition at line 475 of file CmsShowEDI.cc.

475  {
476  FWChangeSentry sentry(*(m_item->changeManager()));
477  for (int i = 0; i < static_cast<int>(m_item->size()); i++) {
478  m_item->select(i);
479  }
480 }

References FWEventItem::changeManager(), mps_fire::i, m_item, FWEventItem::select(), and FWEventItem::size().

◆ show()

void CmsShowEDI::show ( FWDataCategories  iToView)

Definition at line 498 of file CmsShowEDI.cc.

498 { m_tabs->SetTab(iToView); }

References m_tabs.

Referenced by FWGUIManager::showEDIFrame().

◆ toggleItemVisible()

void CmsShowEDI::toggleItemVisible ( Bool_t  on = kTRUE)

See changeItemColor for additional details.

Definition at line 418 of file CmsShowEDI.cc.

418  {
420  changeProperties.setIsVisible(on);
421  m_item->setDefaultDisplayProperties(changeProperties);
422 }

References FWEventItem::defaultDisplayProperties(), m_item, FWEventItem::setDefaultDisplayProperties(), and FWDisplayProperties::setIsVisible().

◆ updateDisplay()

void CmsShowEDI::updateDisplay ( )

Definition at line 336 of file CmsShowEDI.cc.

336  {
337  //std::cout<<"Updating display"<<std::endl;
339  m_colorSelectWidget->SetColorByIndex(props.color(), kFALSE);
340  m_opacitySlider->SetPosition(100 - props.transparency());
341  m_isVisibleButton->SetState(props.isVisible() ? kButtonDown : kButtonUp, kFALSE);
342 }

References FWDisplayProperties::color(), FWEventItem::defaultDisplayProperties(), FWDisplayProperties::isVisible(), m_colorSelectWidget, m_isVisibleButton, m_item, m_opacitySlider, FWColorSelect::SetColorByIndex(), and FWDisplayProperties::transparency().

Referenced by fillEDIFrame().

◆ updateFilter()

void CmsShowEDI::updateFilter ( )

Definition at line 362 of file CmsShowEDI.cc.

362 { m_filterExpressionEntry->SetText(m_item->filterExpression().c_str()); }

References FWEventItem::filterExpression(), m_filterExpressionEntry, and m_item.

Referenced by fillEDIFrame().

◆ updateLayerControls()

void CmsShowEDI::updateLayerControls ( )

Definition at line 344 of file CmsShowEDI.cc.

344  {
345  m_backButton->SetEnabled(!m_item->isInBack());
346  m_frontButton->SetEnabled(!m_item->isInFront());
347  m_layerEntry->SetIntNumber(m_item->layer());
348 }

References FWEventItem::isInBack(), FWEventItem::isInFront(), FWEventItem::layer(), m_backButton, m_frontButton, m_item, and m_layerEntry.

Referenced by fillEDIFrame(), moveToBack(), moveToFront(), and moveToLayer().

Member Data Documentation

◆ m_backButton

TGTextButton* CmsShowEDI::m_backButton
private

Definition at line 105 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), updateLayerControls(), and ~CmsShowEDI().

◆ m_colorManager

FWColorManager* CmsShowEDI::m_colorManager
private

Definition at line 131 of file CmsShowEDI.h.

◆ m_colorSelectWidget

FWColorSelect* CmsShowEDI::m_colorSelectWidget
private

◆ m_cw

FWColorSelect* CmsShowEDI::m_cw
private

◆ m_deselectAllButton

TGTextButton* CmsShowEDI::m_deselectAllButton
private

Definition at line 115 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), fillEDIFrame(), and ~CmsShowEDI().

◆ m_destroyedConn

sigc::connection CmsShowEDI::m_destroyedConn
private

Definition at line 126 of file CmsShowEDI.h.

Referenced by disconnectAll(), and fillEDIFrame().

◆ m_displayChangedConn

sigc::connection CmsShowEDI::m_displayChangedConn
private

Definition at line 124 of file CmsShowEDI.h.

Referenced by disconnectAll(), and fillEDIFrame().

◆ m_filterButton

TGTextButton* CmsShowEDI::m_filterButton
private

Definition at line 112 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), fillEDIFrame(), and ~CmsShowEDI().

◆ m_filterError

TGTextView* CmsShowEDI::m_filterError
private

Definition at line 128 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), fillEDIFrame(), and runFilter().

◆ m_filterExpressionEntry

FWGUIValidatingTextEntry* CmsShowEDI::m_filterExpressionEntry
private

◆ m_frontButton

TGTextButton* CmsShowEDI::m_frontButton
private

Definition at line 104 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), updateLayerControls(), and ~CmsShowEDI().

◆ m_instanceEntry

TGTextEntry* CmsShowEDI::m_instanceEntry
private

Definition at line 120 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), and fillEDIFrame().

◆ m_isVisibleButton

TGCheckButton* CmsShowEDI::m_isVisibleButton
private

Definition at line 109 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), fillEDIFrame(), updateDisplay(), and ~CmsShowEDI().

◆ m_item

FWEventItem* CmsShowEDI::m_item
private

◆ m_layerEntry

TGNumberEntry* CmsShowEDI::m_layerEntry
private

◆ m_modelChangedConn

sigc::connection CmsShowEDI::m_modelChangedConn
private

Definition at line 125 of file CmsShowEDI.h.

Referenced by disconnectAll(), and fillEDIFrame().

◆ m_moduleEntry

TGTextEntry* CmsShowEDI::m_moduleEntry
private

Definition at line 119 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), and fillEDIFrame().

◆ m_nameEntry

TGTextEntry* CmsShowEDI::m_nameEntry
private

Definition at line 117 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), and fillEDIFrame().

◆ m_objectLabel

TGLabel* CmsShowEDI::m_objectLabel
private

Definition at line 102 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), and fillEDIFrame().

◆ m_opacitySlider

TGHSlider* CmsShowEDI::m_opacitySlider
private

Definition at line 108 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), fillEDIFrame(), updateDisplay(), and ~CmsShowEDI().

◆ m_processEntry

TGTextEntry* CmsShowEDI::m_processEntry
private

Definition at line 121 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), and fillEDIFrame().

◆ m_removeButton

TGTextButton* CmsShowEDI::m_removeButton
private

Definition at line 103 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), fillEDIFrame(), and ~CmsShowEDI().

◆ m_selectAllButton

TGTextButton* CmsShowEDI::m_selectAllButton
private

Definition at line 114 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), fillEDIFrame(), and ~CmsShowEDI().

◆ m_selectButton

TGTextButton* CmsShowEDI::m_selectButton
private

Definition at line 113 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), fillEDIFrame(), and ~CmsShowEDI().

◆ m_selectError

TGTextView* CmsShowEDI::m_selectError
private

Definition at line 129 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), fillEDIFrame(), and runSelection().

◆ m_selectExpressionEntry

FWGUIValidatingTextEntry* CmsShowEDI::m_selectExpressionEntry
private

Definition at line 111 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), fillEDIFrame(), runSelection(), and ~CmsShowEDI().

◆ m_selectionManager

FWSelectionManager* CmsShowEDI::m_selectionManager
private

Definition at line 100 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), and fillEDIFrame().

◆ m_settersFrame

TGCompositeFrame* CmsShowEDI::m_settersFrame
private

Definition at line 133 of file CmsShowEDI.h.

Referenced by clearPBFrame(), CmsShowEDI(), and fillEDIFrame().

◆ m_tabs

TGTab* CmsShowEDI::m_tabs
private

Definition at line 101 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), and show().

◆ m_typeEntry

TGTextEntry* CmsShowEDI::m_typeEntry
private

Definition at line 118 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), disconnectAll(), and fillEDIFrame().

◆ m_validator

FWExpressionValidator* CmsShowEDI::m_validator
private

Definition at line 130 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), fillEDIFrame(), and ~CmsShowEDI().

FWColorSelect::SetColorByIndex
void SetColorByIndex(Color_t iColor)
Definition: FWColorSelect.cc:352
CmsShowEDI::disconnectAll
void disconnectAll()
Definition: CmsShowEDI.cc:364
FWGUIValidatingTextEntry::setValidator
void setValidator(FWValidatorBase *)
Definition: FWGUIValidatingTextEntry.cc:78
CmsShowEDI::updateLayerControls
void updateLayerControls()
Definition: CmsShowEDI.cc:344
FWDisplayProperties::isVisible
bool isVisible() const
Definition: FWDisplayProperties.h:51
mps_fire.i
i
Definition: mps_fire.py:428
FWEventItem::productInstanceLabel
const std::string & productInstanceLabel() const
Definition: FWEventItem.cc:442
CmsShowEDI::m_selectionManager
FWSelectionManager * m_selectionManager
Definition: CmsShowEDI.h:100
FWEventItem::getConfig
FWProxyBuilderConfiguration * getConfig() const
Definition: FWEventItem.h:150
FWEventItem::processName
const std::string & processName() const
Definition: FWEventItem.cc:444
CmsShowEDI::m_displayChangedConn
sigc::connection m_displayChangedConn
Definition: CmsShowEDI.h:124
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
FWEventItem::isInFront
bool isInFront() const
returns true if item is in front of all other items
Definition: FWEventItem.cc:407
CmsShowEDI::m_modelChangedConn
sigc::connection m_modelChangedConn
Definition: CmsShowEDI.h:125
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
FWEventItem::moveToBack
void moveToBack()
Definition: FWEventItem.cc:299
CmsShowEDI::m_selectExpressionEntry
FWGUIValidatingTextEntry * m_selectExpressionEntry
Definition: CmsShowEDI.h:111
CmsShowEDI::m_filterExpressionEntry
FWGUIValidatingTextEntry * m_filterExpressionEntry
Definition: CmsShowEDI.h:110
CmsShowEDI::m_isVisibleButton
TGCheckButton * m_isVisibleButton
Definition: CmsShowEDI.h:109
FWEventItem::maxLayerValue
static int maxLayerValue()
Definition: FWEventItem.cc:40
CmsShowEDI::m_filterButton
TGTextButton * m_filterButton
Definition: CmsShowEDI.h:112
FWDisplayProperties::setIsVisible
void setIsVisible(bool iSet)
Definition: FWDisplayProperties.h:71
FWEventItem::goingToBeDestroyed_
FWItemChangeSignal goingToBeDestroyed_
Definition: FWEventItem.h:197
FWExpressionValidator
Definition: FWExpressionValidator.h:34
CmsShowEDI::m_settersFrame
TGCompositeFrame * m_settersFrame
Definition: CmsShowEDI.h:133
CmsShowEDI::m_deselectAllButton
TGTextButton * m_deselectAllButton
Definition: CmsShowEDI.h:115
FWEventItem::moduleLabel
const std::string & moduleLabel() const
Definition: FWEventItem.cc:441
FWEventItem::selectionManager
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:124
CmsShowEDI::m_tabs
TGTab * m_tabs
Definition: CmsShowEDI.h:101
CmsShowEDI::m_instanceEntry
TGTextEntry * m_instanceEntry
Definition: CmsShowEDI.h:120
CmsShowEDI::m_nameEntry
TGTextEntry * m_nameEntry
Definition: CmsShowEDI.h:117
CmsShowEDI::m_item
FWEventItem * m_item
Definition: CmsShowEDI.h:122
FWDisplayProperties::color
Color_t color() const
Definition: FWDisplayProperties.h:47
FWEventItem::setDefaultDisplayProperties
void setDefaultDisplayProperties(const FWDisplayProperties &)
Definition: FWEventItem.cc:138
FWModelExpressionSelector
Definition: FWModelExpressionSelector.h:30
FWEventItem::defaultDisplayPropertiesChanged_
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:190
FWExpressionException
Definition: FWExpressionException.h:28
FWEventItem::select
void select(int iIndex) const
Definition: FWEventItem.cc:224
FWEventItem::changeManager
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
CmsShowEDI::updateDisplay
void updateDisplay()
Definition: CmsShowEDI.cc:336
CmsShowEDI::m_moduleEntry
TGTextEntry * m_moduleEntry
Definition: CmsShowEDI.h:119
FWEventItem::defaultDisplayProperties
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
FWSelectionManager::itemSelectionChanged_
sigc::signal< void, const FWSelectionManager & > itemSelectionChanged_
Definition: FWSelectionManager.h:54
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
alignCSCRings.s
s
Definition: alignCSCRings.py:92
FWEventItem::isInBack
bool isInBack() const
returns true if item is behind all other items
Definition: FWEventItem.cc:420
FWDialogBuilder
Definition: FWDialogBuilder.h:93
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:158
CmsShowEDI::m_processEntry
TGTextEntry * m_processEntry
Definition: CmsShowEDI.h:121
CmsShowEDI::m_colorSelectWidget
FWColorSelect * m_colorSelectWidget
Definition: CmsShowEDI.h:107
w
const double w
Definition: UKUtility.cc:23
FWChangeSentry
Definition: FWModelChangeManager.h:68
FWSelectionManager::selected
const std::set< FWModelId > & selected() const
Definition: FWSelectionManager.cc:168
corrVsCorr.selection
selection
main part
Definition: corrVsCorr.py:100
FWEventItem::modelType
const TClass * modelType() const
Definition: FWEventItem.cc:464
FWModelExpressionSelector::select
void select(FWEventItem *iItem, const std::string &iExpression, Color_t iColor=-1) const
Definition: FWModelExpressionSelector.cc:72
FWDisplayProperties::transparency
Char_t transparency() const
Definition: FWDisplayProperties.h:49
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWSelectionManager::selectedItems
const std::set< FWEventItem * > & selectedItems() const
Definition: FWSelectionManager.cc:170
edm::TypeWithDict
Definition: TypeWithDict.h:38
FWDisplayProperties::setColor
void setColor(Color_t iColor)
Definition: FWDisplayProperties.h:62
CmsShowEDI::m_selectAllButton
TGTextButton * m_selectAllButton
Definition: CmsShowEDI.h:114
FWEventItem::filterExpression
const std::string & filterExpression() const
Definition: FWEventItem.cc:491
CmsShowEDI::updateFilter
void updateFilter()
Definition: CmsShowEDI.cc:362
FWEventItem::unselect
void unselect(int iIndex) const
Definition: FWEventItem.cc:215
CmsShowEDI::m_frontButton
TGTextButton * m_frontButton
Definition: CmsShowEDI.h:104
CmsShowEDI::m_destroyedConn
sigc::connection m_destroyedConn
Definition: CmsShowEDI.h:126
CmsShowEDI::m_removeButton
TGTextButton * m_removeButton
Definition: CmsShowEDI.h:103
FWEventItem::layer
int layer() const
Definition: FWEventItem.cc:405
FWEventItem::type
const TClass * type() const
Definition: FWEventItem.cc:437
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
FWDisplayProperties::setTransparency
void setTransparency(Char_t transparency)
Definition: FWDisplayProperties.h:65
FWEventItem::setDisplayProperties
void setDisplayProperties(int iIndex, const FWDisplayProperties &) const
Definition: FWEventItem.cc:247
CmsShowEDI::m_filterError
TGTextView * m_filterError
Definition: CmsShowEDI.h:128
CmsShowEDI::m_layerEntry
TGNumberEntry * m_layerEntry
Definition: CmsShowEDI.h:106
FWDisplayProperties
Definition: FWDisplayProperties.h:28
CmsShowEDI::m_validator
FWExpressionValidator * m_validator
Definition: CmsShowEDI.h:130
CmsShowEDI::clearPBFrame
void clearPBFrame()
Definition: CmsShowEDI.cc:239
FWEventItem
Definition: FWEventItem.h:56
CmsShowEDI::m_cw
FWColorSelect * m_cw
Definition: CmsShowEDI.h:116
FWEventItem::minLayerValue
static int minLayerValue()
Definition: FWEventItem.cc:38
CmsShowEDI::fillEDIFrame
void fillEDIFrame()
Definition: CmsShowEDI.cc:250
CmsShowEDI::m_typeEntry
TGTextEntry * m_typeEntry
Definition: CmsShowEDI.h:118
CmsShowEDI::m_opacitySlider
TGHSlider * m_opacitySlider
Definition: CmsShowEDI.h:108
CmsShowEDI::m_selectButton
TGTextButton * m_selectButton
Definition: CmsShowEDI.h:113
FWEventItem::name
const std::string & name() const
Definition: FWEventItem.cc:435
CmsShowEDI::m_objectLabel
TGLabel * m_objectLabel
Definition: CmsShowEDI.h:102
FWExpressionValidator::setType
void setType(const edm::TypeWithDict &)
Definition: FWExpressionValidator.cc:191
FWEventItem::setFilterExpression
void setFilterExpression(const std::string &)
Definition: FWEventItem.cc:180
CmsShowEDI::m_backButton
TGTextButton * m_backButton
Definition: CmsShowEDI.h:105
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
CmsShowEDI::m_colorManager
FWColorManager * m_colorManager
Definition: CmsShowEDI.h:131
FWProxyBuilderConfiguration::populateFrame
void populateFrame(TGCompositeFrame *frame)
Definition: FWProxyBuilderConfiguration.cc:66
FWEventItem::changed_
FWModelChangeSignal changed_
Definition: FWEventItem.h:178
FWEventItem::destroy
void destroy() const
Definition: FWEventItem.cc:493
FWEventItem::moveToFront
void moveToFront()
Definition: FWEventItem.cc:278
FWEventItem::moveToLayer
void moveToLayer(int layer)
Definition: FWEventItem.cc:320
FWEventItem::size
size_t size() const
Definition: FWEventItem.cc:457
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CmsShowEDI::m_selectError
TGTextView * m_selectError
Definition: CmsShowEDI.h:129