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 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)
 
 ClassDef (CmsShowEDI, 0)
 
virtual void CloseWindow ()
 
 CmsShowEDI (const TGWindow *p=0, UInt_t w=1, UInt_t h=1, FWSelectionManager *selMgr=0, FWColorManager *colorMgr=0)
 
void colorSetChanged ()
 
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 ()
 
virtual ~CmsShowEDI ()
 

Private Member Functions

 CmsShowEDI (const CmsShowEDI &)
 
const CmsShowEDIoperator= (const CmsShowEDI &)
 

Private Attributes

TGTextButton * m_backButton
 
FWColorManagerm_colorManager
 
FWColorSelectm_colorSelectWidget
 
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
 
TGTab * m_tabs
 
TGTextEntry * m_typeEntry
 
FWExpressionValidatorm_validator
 

Detailed Description

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

Usage: <usage>

Definition at line 53 of file CmsShowEDI.h.

Constructor & Destructor Documentation

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

Definition at line 63 of file CmsShowEDI.cc.

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_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_tabs, m_typeEntry, m_validator, FWEventItem::maxLayerValue(), FWEventItem::minLayerValue(), FWGUIValidatingTextEntry::setValidator(), FWDialogBuilder::tabs(), FWDialogBuilder::untabs(), and FWDialogBuilder::vSpacer().

63  :
64  TGTransientFrame(gClient->GetDefaultRoot(),p, w, h),
65  m_item(0),
67  m_colorManager(colorMgr)
68 {
69  m_selectionManager = selMgr;
70  SetCleanup(kDeepCleanup);
71 
73 
74  TGVerticalFrame* vf = new TGVerticalFrame(this);
75  AddFrame(vf, new TGLayoutHints(kLHintsExpandX|kLHintsExpandY, 0, 0, 0, 0));
76  FWDialogBuilder builder(vf);
77 
78  builder.indent(0)
79  .addLabel(" ", 14, 2, &m_objectLabel)
80  .vSpacer()
81  .tabs(&m_tabs)
82  .beginTab("Graphics")
83  .indent(3)
84  .addLabel("Color", 8)
85  .addColorPicker(colorMgr, &m_colorSelectWidget).expand(false)
86  .addHSeparator()
87  .addLabel("Opacity", 8)
88  .addHSlider(150, &m_opacitySlider)
89  .addHSeparator()
90  .addCheckbox("Visible", &m_isVisibleButton)
91  .addHSeparator()
92  .addLabel("Drawing order", 8)
93  .addTextButton("To back", &m_backButton).floatLeft().expand(false)
94  .addNumberEntry(0.0, 4, TGNumberFormat::kNESInteger,
97  &m_layerEntry).expand(false).floatLeft()
98  .addTextButton("To front", &m_frontButton).expand(false)
99  .vSpacer()
100  .endTab()
101  .beginTab("Filter")
102  .indent(3)
103  .addLabel("Expression", 8)
104  .addValidatingTextEntry(0, &m_filterExpressionEntry).floatLeft()
105  .addTextButton("Filter", &m_filterButton).expand(false)
106  .addTextView("", &m_filterError)
107  .vSpacer()
108  .endTab()
109  .beginTab("Select")
110  .indent(3)
111  .addLabel("Expression", 8)
112  .addValidatingTextEntry(0, &m_selectExpressionEntry)
113  .addTextButton("Select", &m_selectButton).floatLeft().expand(false)
114  .addTextButton("Select all", &m_selectAllButton).expand(false)
115  .addTextView("", &m_selectError)
116  .vSpacer()
117  .endTab()
118  .beginTab("Data")
119  .indent(3)
120  .addLabel("Name:", 8)
121  .addTextEntry("None", &m_nameEntry)
122  .addLabel("Labels:", 8)
123  .addLabel("Type:", 8)
124  .addTextEntry("None", &m_typeEntry)
125  .addLabel("Module:", 8)
126  .addTextEntry("None", &m_moduleEntry)
127  .addLabel("Instance:", 8)
128  .addTextEntry("None", &m_instanceEntry)
129  .addLabel("Process:", 8)
130  .addTextEntry("None", &m_processEntry)
131  .addHSeparator()
132  .addTextButton("Remove collection", &m_removeButton).expand(false)
133  .vSpacer()
134  .endTab()
135  .untabs();
136 
137  m_filterError->SetForegroundColor(gVirtualX->GetPixel(kRed));
138  m_filterError->SetBackgroundColor(TGFrame::GetDefaultFrameBackground());
139  m_filterError->ChangeOptions(0);
140 
141  m_selectError->SetForegroundColor(gVirtualX->GetPixel(kRed));
142  m_selectError->SetBackgroundColor(TGFrame::GetDefaultFrameBackground());
143  m_selectError->ChangeOptions(0);
144 
147 
148  m_colorSelectWidget->Connect("ColorChosen(Color_t)", "CmsShowEDI", this, "changeItemColor(Color_t)");
149  m_opacitySlider->Connect("PositionChanged(Int_t)", "CmsShowEDI", this, "changeItemOpacity(Int_t)");
150  m_isVisibleButton->Connect("Toggled(Bool_t)", "CmsShowEDI", this, "toggleItemVisible(Bool_t)");
151  m_filterExpressionEntry->Connect("ReturnPressed()", "CmsShowEDI", this, "runFilter()");
152  m_filterButton->Connect("Clicked()", "CmsShowEDI", this, "runFilter()");
153  m_selectExpressionEntry->Connect("ReturnPressed()", "CmsShowEDI", this, "runSelection()");
154  m_selectButton->Connect("Clicked()", "CmsShowEDI", this, "runSelection()");
155  m_removeButton->Connect("Clicked()", "CmsShowEDI", this, "removeItem()");
156  m_selectAllButton->Connect("Clicked()", "CmsShowEDI", this, "selectAll()");
157  m_frontButton->Connect("Clicked()","CmsShowEDI",this,"moveToFront()");
158  m_backButton->Connect("Clicked()","CmsShowEDI",this,"moveToBack()");
159  m_layerEntry->Connect("ValueSet(Long_t)","CmsShowEDI",this,"moveToLayer(Long_t)");
160 
161  SetWindowName("Collection Controller");
162  MapSubwindows();
163  Resize(GetDefaultSize());
164  Layout();
165 
166  fillEDIFrame();
167 }
void fillEDIFrame()
Definition: CmsShowEDI.cc:211
TGHSlider * m_opacitySlider
Definition: CmsShowEDI.h:105
TGCheckButton * m_isVisibleButton
Definition: CmsShowEDI.h:106
FWGUIValidatingTextEntry * m_filterExpressionEntry
Definition: CmsShowEDI.h:107
TGLabel * m_objectLabel
Definition: CmsShowEDI.h:99
TGTab * m_tabs
Definition: CmsShowEDI.h:98
TGTextButton * m_selectAllButton
Definition: CmsShowEDI.h:111
static int maxLayerValue()
Definition: FWEventItem.cc:56
TGTextEntry * m_instanceEntry
Definition: CmsShowEDI.h:115
TGNumberEntry * m_layerEntry
Definition: CmsShowEDI.h:103
void setValidator(FWValidatorBase *)
TGTextButton * m_backButton
Definition: CmsShowEDI.h:102
TGTextEntry * m_moduleEntry
Definition: CmsShowEDI.h:114
static int minLayerValue()
Definition: FWEventItem.cc:51
FWColorManager * m_colorManager
Definition: CmsShowEDI.h:126
TGTextView * m_selectError
Definition: CmsShowEDI.h:124
TGTextButton * m_removeButton
Definition: CmsShowEDI.h:100
FWExpressionValidator * m_validator
Definition: CmsShowEDI.h:125
TGTextView * m_filterError
Definition: CmsShowEDI.h:123
TGTextEntry * m_processEntry
Definition: CmsShowEDI.h:116
sigc::signal< void, const FWSelectionManager & > itemSelectionChanged_
FWColorSelect * m_colorSelectWidget
Definition: CmsShowEDI.h:104
TGTextButton * m_filterButton
Definition: CmsShowEDI.h:109
FWSelectionManager * m_selectionManager
Definition: CmsShowEDI.h:97
TGTextEntry * m_typeEntry
Definition: CmsShowEDI.h:113
FWEventItem * m_item
Definition: CmsShowEDI.h:117
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
FWGUIValidatingTextEntry * m_selectExpressionEntry
Definition: CmsShowEDI.h:108
TGTextEntry * m_nameEntry
Definition: CmsShowEDI.h:112
TGTextButton * m_frontButton
Definition: CmsShowEDI.h:101
TGTextButton * m_selectButton
Definition: CmsShowEDI.h:110
CmsShowEDI::~CmsShowEDI ( )
virtual

Definition at line 174 of file CmsShowEDI.cc.

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

175 {
176  disconnectAll();
177  m_colorSelectWidget->Disconnect("ColorSelected(Pixel_t)", this, "changeItemColor(Pixel_t)");
178  m_opacitySlider->Disconnect("PositionChanged(Int_t)", this, "changeItemColor");
179  m_isVisibleButton->Disconnect("Toggled(Bool_t)", this, "toggleItemVisible(Bool_t)");
180  m_filterExpressionEntry->Disconnect("ReturnPressed()", this, "runFilter()");
181  m_selectExpressionEntry->Disconnect("ReturnPressed()", this, "runSelection()");
182  m_filterButton->Disconnect("Clicked()", this, "runFilter()");
183  m_selectButton->Disconnect("Clicked()", this, "runSelection()");
184  m_selectAllButton->Disconnect("Clicked()", this, "selectAll()");
185  m_removeButton->Disconnect("Clicked()", this, "removeItem()");
186  m_frontButton->Disconnect("Clicked()",this,"moveToFront()");
187  m_backButton->Disconnect("Clicked()",this,"moveToBack()");
188  m_layerEntry->Disconnect("ValueSet(Long_t)",this,"moveToLayer(Long_t)");
189  // delete m_objectLabel;
190  // delete m_colorSelectWidget;
191  // delete m_isVisibleButton;
192  delete m_validator;
193 }
TGHSlider * m_opacitySlider
Definition: CmsShowEDI.h:105
TGCheckButton * m_isVisibleButton
Definition: CmsShowEDI.h:106
FWGUIValidatingTextEntry * m_filterExpressionEntry
Definition: CmsShowEDI.h:107
void disconnectAll()
Definition: CmsShowEDI.cc:331
TGTextButton * m_selectAllButton
Definition: CmsShowEDI.h:111
TGNumberEntry * m_layerEntry
Definition: CmsShowEDI.h:103
TGTextButton * m_backButton
Definition: CmsShowEDI.h:102
TGTextButton * m_removeButton
Definition: CmsShowEDI.h:100
FWExpressionValidator * m_validator
Definition: CmsShowEDI.h:125
FWColorSelect * m_colorSelectWidget
Definition: CmsShowEDI.h:104
TGTextButton * m_filterButton
Definition: CmsShowEDI.h:109
FWGUIValidatingTextEntry * m_selectExpressionEntry
Definition: CmsShowEDI.h:108
TGTextButton * m_frontButton
Definition: CmsShowEDI.h:101
TGTextButton * m_selectButton
Definition: CmsShowEDI.h:110
CmsShowEDI::CmsShowEDI ( const CmsShowEDI )
private

Member Function Documentation

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 376 of file CmsShowEDI.cc.

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

376  {
378  changeProperties.setColor(color);
379  m_item->setDefaultDisplayProperties(changeProperties);
380 }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:452
void setColor(Color_t iColor)
void setDefaultDisplayProperties(const FWDisplayProperties &)
Definition: FWEventItem.cc:166
FWEventItem * m_item
Definition: CmsShowEDI.h:117
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 398 of file CmsShowEDI.cc.

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

398  {
400  changeProperties.setTransparency(100 - opacity);
401  m_item->setDefaultDisplayProperties(changeProperties);
402 }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:452
void setDefaultDisplayProperties(const FWDisplayProperties &)
Definition: FWEventItem.cc:166
void setTransparency(Char_t transparency)
FWEventItem * m_item
Definition: CmsShowEDI.h:117
CmsShowEDI::ClassDef ( CmsShowEDI  ,
 
)
virtual void CmsShowEDI::CloseWindow ( )
inlinevirtual

Definition at line 61 of file CmsShowEDI.h.

61 { UnmapWindow(); }
void CmsShowEDI::colorSetChanged ( )

Definition at line 461 of file CmsShowEDI.cc.

References FWDisplayProperties::color(), FWEventItem::defaultDisplayProperties(), m_colorSelectWidget, m_item, L1TEmulatorMonitor_cff::p, and FWColorSelect::SetColorByIndex().

Referenced by FWGUIManager::finishUpColorChange().

462 {
463  if (m_item)
464  {
467  }
468 }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:452
void SetColorByIndex(Color_t iColor)
Color_t color() const
FWColorSelect * m_colorSelectWidget
Definition: CmsShowEDI.h:104
FWEventItem * m_item
Definition: CmsShowEDI.h:117
void CmsShowEDI::disconnectAll ( )

Definition at line 331 of file CmsShowEDI.cc.

References m_backButton, m_colorSelectWidget, 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().

331  {
332  m_objectLabel->SetText("No Collection Selected");
333  if(0 != m_item) {
334  m_displayChangedConn.disconnect();
335  m_modelChangedConn.disconnect();
336  m_destroyedConn.disconnect();
337  m_item = 0;
339  m_opacitySlider->SetPosition(100);
340  m_isVisibleButton->SetDisabledAndSelected(kTRUE);
341  m_filterExpressionEntry->SetText(0);
342  m_selectExpressionEntry->SetText(0);
343  m_nameEntry->SetText(0);
344  m_typeEntry->SetText(0);
345  m_moduleEntry->SetText(0);
346  m_instanceEntry->SetText(0);
347  m_processEntry->SetText(0);
348  // else m_isVisibleButton->SetState(kButtonDown, kFALSE);
349  m_colorSelectWidget->SetEnabled(kFALSE);
350  m_opacitySlider->SetEnabled(kFALSE);
351 
352  m_isVisibleButton->SetEnabled(kFALSE);
353  m_filterExpressionEntry->SetEnabled(kFALSE);
354  m_filterButton->SetEnabled(kFALSE);
355  m_selectExpressionEntry->SetEnabled(kFALSE);
356  m_selectButton->SetEnabled(kFALSE);
357  m_selectAllButton->SetEnabled(kFALSE);
358  m_removeButton->SetEnabled(kFALSE);
359  m_backButton->SetEnabled(kFALSE);
360  m_frontButton->SetEnabled(kFALSE);
361  m_layerEntry->SetIntNumber(0);
362  m_layerEntry->SetState(kFALSE);
363  m_layerEntry->GetNumberEntry()->SetEnabled(kFALSE);
364  m_layerEntry->GetButtonUp()->SetEnabled(kFALSE);
365  m_layerEntry->GetButtonDown()->SetEnabled(kFALSE);
366  }
367 }
sigc::connection m_displayChangedConn
Definition: CmsShowEDI.h:119
TGHSlider * m_opacitySlider
Definition: CmsShowEDI.h:105
TGCheckButton * m_isVisibleButton
Definition: CmsShowEDI.h:106
FWGUIValidatingTextEntry * m_filterExpressionEntry
Definition: CmsShowEDI.h:107
void SetColorByIndex(Color_t iColor)
TGLabel * m_objectLabel
Definition: CmsShowEDI.h:99
TGTextButton * m_selectAllButton
Definition: CmsShowEDI.h:111
TGTextEntry * m_instanceEntry
Definition: CmsShowEDI.h:115
TGNumberEntry * m_layerEntry
Definition: CmsShowEDI.h:103
TGTextButton * m_backButton
Definition: CmsShowEDI.h:102
TGTextEntry * m_moduleEntry
Definition: CmsShowEDI.h:114
sigc::connection m_destroyedConn
Definition: CmsShowEDI.h:121
TGTextButton * m_removeButton
Definition: CmsShowEDI.h:100
TGTextEntry * m_processEntry
Definition: CmsShowEDI.h:116
FWColorSelect * m_colorSelectWidget
Definition: CmsShowEDI.h:104
TGTextButton * m_filterButton
Definition: CmsShowEDI.h:109
TGTextEntry * m_typeEntry
Definition: CmsShowEDI.h:113
FWEventItem * m_item
Definition: CmsShowEDI.h:117
sigc::connection m_modelChangedConn
Definition: CmsShowEDI.h:120
FWGUIValidatingTextEntry * m_selectExpressionEntry
Definition: CmsShowEDI.h:108
TGTextEntry * m_nameEntry
Definition: CmsShowEDI.h:112
TGTextButton * m_frontButton
Definition: CmsShowEDI.h:101
TGTextButton * m_selectButton
Definition: CmsShowEDI.h:110
void CmsShowEDI::fillEDIFrame ( )

Definition at line 211 of file CmsShowEDI.cc.

References FWEventItem::changed_, FWDisplayProperties::color(), FWEventItem::defaultDisplayProperties(), FWEventItem::defaultDisplayPropertiesChanged_, disconnectAll(), FWEventItem::filterExpression(), FWEventItem::goingToBeDestroyed_, FWDisplayProperties::isVisible(), m_colorSelectWidget, 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_typeEntry, m_validator, FWEventItem::modelType(), FWEventItem::moduleLabel(), FWEventItem::name(), L1TEmulatorMonitor_cff::p, FWEventItem::processName(), FWEventItem::productInstanceLabel(), asciidump::s, FWSelectionManager::selectedItems(), FWColorSelect::SetColorByIndex(), FWExpressionValidator::setType(), FWDisplayProperties::transparency(), FWEventItem::type(), updateDisplay(), updateFilter(), and updateLayerControls().

Referenced by CmsShowEDI().

211  {
212  FWEventItem* iItem =0;
213  bool multipleCollections = false;
214  if(!m_selectionManager->selectedItems().empty()) {
215  if(m_selectionManager->selectedItems().size()==1) {
216  iItem=*(m_selectionManager->selectedItems().begin());
217  } else {
218  multipleCollections=true;
219  }
220  }
221  //m_item can be zero because we had 0 or many collections selected
222  if (0 == m_item || iItem != m_item) {
223  disconnectAll();
224  m_item = iItem;
225  if(0 != m_item) {
227  m_objectLabel->SetText(iItem->name().c_str());
229  m_opacitySlider->SetPosition(100 - p.transparency());
230  m_isVisibleButton->SetDisabledAndSelected(p.isVisible());
231  m_validator->setType(ROOT::Reflex::Type::ByTypeInfo(*(iItem->modelType()->GetTypeInfo())));
232  m_filterExpressionEntry->SetText(iItem->filterExpression().c_str());
233  m_filterError->Clear();
234  m_selectError->Clear();
235  m_nameEntry->SetText(iItem->name().c_str());
236  m_typeEntry->SetText(iItem->type()->GetName());
237  m_moduleEntry->SetText(iItem->moduleLabel().c_str());
238  m_instanceEntry->SetText(iItem->productInstanceLabel().c_str());
239  m_processEntry->SetText(iItem->processName().c_str());
240  // else m_isVisibleButton->SetState(kButtonDown, kFALSE);
241  m_colorSelectWidget->SetEnabled(kTRUE);
242  m_opacitySlider->SetEnabled(kTRUE);
243  m_isVisibleButton->SetEnabled(kTRUE);
244  m_filterExpressionEntry->SetEnabled(kTRUE);
245  m_selectExpressionEntry->SetEnabled(kTRUE);
246  m_filterButton->SetEnabled(kTRUE);
247  m_selectButton->SetEnabled(kTRUE);
248  m_selectAllButton->SetEnabled(kTRUE);
249  m_removeButton->SetEnabled(kTRUE);
251  m_layerEntry->SetState(kTRUE);
253  m_modelChangedConn = m_item->changed_.connect(boost::bind(&CmsShowEDI::updateFilter, this));
254  // m_selectionChangedConn = m_selectionManager->selectionChanged_.connect(boost::bind(&CmsShowEDI::updateSelection, this));
256  } else if(multipleCollections) {
257  std::ostringstream s;
258  s<<m_selectionManager->selectedItems().size()<<" Collections Selected";
259  m_objectLabel->SetText(s.str().c_str());
260  }
261 
262  Resize(GetDefaultSize());
263  Layout();
264  }
265 }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:452
sigc::connection m_displayChangedConn
Definition: CmsShowEDI.h:119
TGHSlider * m_opacitySlider
Definition: CmsShowEDI.h:105
TGCheckButton * m_isVisibleButton
Definition: CmsShowEDI.h:106
FWGUIValidatingTextEntry * m_filterExpressionEntry
Definition: CmsShowEDI.h:107
void SetColorByIndex(Color_t iColor)
const std::string & name() const
Definition: FWEventItem.cc:501
const std::string & filterExpression() const
Definition: FWEventItem.cc:609
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:204
TGLabel * m_objectLabel
Definition: CmsShowEDI.h:99
FWItemChangeSignal goingToBeDestroyed_
Definition: FWEventItem.h:211
void disconnectAll()
Definition: CmsShowEDI.cc:331
const std::string & processName() const
Definition: FWEventItem.cc:530
const std::set< FWEventItem * > & selectedItems() const
TGTextButton * m_selectAllButton
Definition: CmsShowEDI.h:111
void updateFilter()
Definition: CmsShowEDI.cc:326
Color_t color() const
TGTextEntry * m_instanceEntry
Definition: CmsShowEDI.h:115
Char_t transparency() const
const std::string & productInstanceLabel() const
Definition: FWEventItem.cc:524
void updateDisplay()
Definition: CmsShowEDI.cc:291
TGNumberEntry * m_layerEntry
Definition: CmsShowEDI.h:103
const TClass * type() const
Definition: FWEventItem.cc:507
TGTextEntry * m_moduleEntry
Definition: CmsShowEDI.h:114
sigc::connection m_destroyedConn
Definition: CmsShowEDI.h:121
TGTextView * m_selectError
Definition: CmsShowEDI.h:124
TGTextButton * m_removeButton
Definition: CmsShowEDI.h:100
FWExpressionValidator * m_validator
Definition: CmsShowEDI.h:125
TGTextView * m_filterError
Definition: CmsShowEDI.h:123
TGTextEntry * m_processEntry
Definition: CmsShowEDI.h:116
FWColorSelect * m_colorSelectWidget
Definition: CmsShowEDI.h:104
FWModelChangeSignal changed_
Definition: FWEventItem.h:192
TGTextButton * m_filterButton
Definition: CmsShowEDI.h:109
const TClass * modelType() const
Definition: FWEventItem.cc:562
FWSelectionManager * m_selectionManager
Definition: CmsShowEDI.h:97
TGTextEntry * m_typeEntry
Definition: CmsShowEDI.h:113
string s
Definition: asciidump.py:422
FWEventItem * m_item
Definition: CmsShowEDI.h:117
sigc::connection m_modelChangedConn
Definition: CmsShowEDI.h:120
void updateLayerControls()
Definition: CmsShowEDI.cc:300
FWGUIValidatingTextEntry * m_selectExpressionEntry
Definition: CmsShowEDI.h:108
TGTextEntry * m_nameEntry
Definition: CmsShowEDI.h:112
void setType(const ROOT::Reflex::Type &)
const std::string & moduleLabel() const
Definition: FWEventItem.cc:519
TGTextButton * m_selectButton
Definition: CmsShowEDI.h:110
void CmsShowEDI::moveToBack ( )

Definition at line 307 of file CmsShowEDI.cc.

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

308 {
309  m_item->moveToBack();
311 }
void moveToBack()
Definition: FWEventItem.cc:344
FWEventItem * m_item
Definition: CmsShowEDI.h:117
void updateLayerControls()
Definition: CmsShowEDI.cc:300
void CmsShowEDI::moveToFront ( )

Definition at line 313 of file CmsShowEDI.cc.

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

314 {
315  m_item->moveToFront();
317 }
void moveToFront()
Definition: FWEventItem.cc:321
FWEventItem * m_item
Definition: CmsShowEDI.h:117
void updateLayerControls()
Definition: CmsShowEDI.cc:300
void CmsShowEDI::moveToLayer ( Long_t  )

Definition at line 319 of file CmsShowEDI.cc.

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

320 {
321  m_item->moveToLayer(static_cast<Int_t>(m_layerEntry->GetIntNumber()));
323 }
void moveToLayer(int layer)
Definition: FWEventItem.cc:367
TGNumberEntry * m_layerEntry
Definition: CmsShowEDI.h:103
FWEventItem * m_item
Definition: CmsShowEDI.h:117
void updateLayerControls()
Definition: CmsShowEDI.cc:300
const CmsShowEDI& CmsShowEDI::operator= ( const CmsShowEDI )
private
void CmsShowEDI::removeItem ( )

Definition at line 268 of file CmsShowEDI.cc.

References FWEventItem::destroy(), m_item, argparse::message, and FWEventItem::name().

268  {
269  Int_t chosen=0;
270  std::string message("This action will remove the ");
271  message += m_item->name();
272  message +=" collection from the display."
273  "\nIf you wish to return the collection you would have to use the 'Add Collection' window.";
274  new TGMsgBox(gClient->GetDefaultRoot(),
275  this,
276  "Remove Collection Confirmation",
277  message.c_str(),
278  kMBIconExclamation,
279  kMBCancel | kMBApply,
280  &chosen);
281  if(kMBApply == chosen) {
282  m_item->destroy();
283  m_item = 0;
284  //make sure the ROOT global editor does not try to use this
285  gEve->EditElement(0);
286  gEve->Redraw3D();
287  }
288 }
void destroy() const
Definition: FWEventItem.cc:615
const std::string & name() const
Definition: FWEventItem.cc:501
string message
Definition: argparse.py:126
FWEventItem * m_item
Definition: CmsShowEDI.h:117
void CmsShowEDI::runFilter ( )

Definition at line 405 of file CmsShowEDI.cc.

References FWExpressionException::column(), ExpressReco_HICollisions_FallBack::e, align_tpl::filter, m_filterError, m_filterExpressionEntry, m_item, FWEventItem::setFilterExpression(), and FWExpressionException::what().

405  {
406  const std::string filter(m_filterExpressionEntry->GetText());
407  if (m_item != 0) {
408  try {
409  m_filterError->Clear();
411  } catch( const FWExpressionException& e) {
412  m_filterError->AddLine(e.what().c_str());
413  m_filterError->Update();
414  if(e.column() > -1) {
415  m_filterExpressionEntry->SetCursorPosition(e.column());
416  }
417  }
418  }
419 }
const std::string & what() const
FWGUIValidatingTextEntry * m_filterExpressionEntry
Definition: CmsShowEDI.h:107
tuple filter
USE THIS FOR SKIMMED TRACKS process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter2) OTHERWISE USE THIS.
Definition: align_tpl.py:86
void setFilterExpression(const std::string &)
Definition: FWEventItem.cc:210
TGTextView * m_filterError
Definition: CmsShowEDI.h:123
FWEventItem * m_item
Definition: CmsShowEDI.h:117
void CmsShowEDI::runSelection ( )

Definition at line 424 of file CmsShowEDI.cc.

References FWExpressionException::column(), ExpressReco_HICollisions_FallBack::e, m_item, m_selectError, m_selectExpressionEntry, FWModelExpressionSelector::select(), elec_selection::selection(), FWEventItem::selectionManager(), and FWExpressionException::what().

424  {
425  FWModelExpressionSelector selector;
426  const std::string selection(m_selectExpressionEntry->GetText());
427  if (m_item != 0){
428  try {
429  m_selectError->Clear();
430  //NOTE call clearModelSelectionLeaveItem so that the item does not get deselected
431  // just for safety use a copy of the pointer to m_item
432  FWEventItem* item = m_item;
433  item->selectionManager()-> clearModelSelectionLeaveItem();
434 
435  selector.select(item, selection);
436  } catch( const FWExpressionException& e) {
437  m_selectError->AddLine(e.what().c_str());
438  m_selectError->Update();
439  if(e.column() > -1) {
440  m_selectExpressionEntry->SetCursorPosition(e.column());
441  }
442  }
443  }
444 }
const std::string & what() const
bool select(FWEventItem *iItem, const std::string &iExpression) const
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:133
TGTextView * m_selectError
Definition: CmsShowEDI.h:124
FWEventItem * m_item
Definition: CmsShowEDI.h:117
FWGUIValidatingTextEntry * m_selectExpressionEntry
Definition: CmsShowEDI.h:108
void CmsShowEDI::selectAll ( )

Definition at line 447 of file CmsShowEDI.cc.

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

447  {
448  FWChangeSentry sentry(*(m_item->changeManager()));
449  for (int i = 0; i < static_cast<int>(m_item->size()); i++) {
450  m_item->select(i);
451  }
452 }
int i
Definition: DBlmapReader.cc:9
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:130
size_t size() const
Definition: FWEventItem.cc:549
void select(int iIndex) const
Definition: FWEventItem.cc:261
FWEventItem * m_item
Definition: CmsShowEDI.h:117
void CmsShowEDI::show ( FWDataCategories  iToView)
void CmsShowEDI::toggleItemVisible ( Bool_t  on = kTRUE)

See changeItemColor for additional details.

Definition at line 384 of file CmsShowEDI.cc.

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

384  {
386  changeProperties.setIsVisible(on);
387  m_item->setDefaultDisplayProperties(changeProperties);
388 }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:452
void setDefaultDisplayProperties(const FWDisplayProperties &)
Definition: FWEventItem.cc:166
FWEventItem * m_item
Definition: CmsShowEDI.h:117
void setIsVisible(bool iSet)
void CmsShowEDI::updateDisplay ( )

Definition at line 291 of file CmsShowEDI.cc.

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

Referenced by fillEDIFrame().

291  {
292  //std::cout<<"Updating display"<<std::endl;
294  m_colorSelectWidget->SetColorByIndex(props.color(),kFALSE);
295  m_opacitySlider->SetPosition(100 - props.transparency());
296  m_isVisibleButton->SetState(props.isVisible() ? kButtonDown : kButtonUp, kFALSE);
297 }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:452
TGHSlider * m_opacitySlider
Definition: CmsShowEDI.h:105
TGCheckButton * m_isVisibleButton
Definition: CmsShowEDI.h:106
void SetColorByIndex(Color_t iColor)
Color_t color() const
Char_t transparency() const
FWColorSelect * m_colorSelectWidget
Definition: CmsShowEDI.h:104
FWEventItem * m_item
Definition: CmsShowEDI.h:117
void CmsShowEDI::updateFilter ( )

Definition at line 326 of file CmsShowEDI.cc.

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

Referenced by fillEDIFrame().

326  {
327  m_filterExpressionEntry->SetText(m_item->filterExpression().c_str());
328 }
FWGUIValidatingTextEntry * m_filterExpressionEntry
Definition: CmsShowEDI.h:107
const std::string & filterExpression() const
Definition: FWEventItem.cc:609
FWEventItem * m_item
Definition: CmsShowEDI.h:117
void CmsShowEDI::updateLayerControls ( )

Definition at line 300 of file CmsShowEDI.cc.

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

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

301 {
302  m_backButton->SetEnabled(!m_item->isInBack());
303  m_frontButton->SetEnabled(!m_item->isInFront());
304  m_layerEntry->SetIntNumber(m_item->layer());
305 }
int layer() const
Definition: FWEventItem.cc:458
TGNumberEntry * m_layerEntry
Definition: CmsShowEDI.h:103
TGTextButton * m_backButton
Definition: CmsShowEDI.h:102
bool isInBack() const
returns true if item is behind all other items
Definition: FWEventItem.cc:479
bool isInFront() const
returns true if item is in front of all other items
Definition: FWEventItem.cc:464
FWEventItem * m_item
Definition: CmsShowEDI.h:117
TGTextButton * m_frontButton
Definition: CmsShowEDI.h:101

Member Data Documentation

TGTextButton* CmsShowEDI::m_backButton
private

Definition at line 102 of file CmsShowEDI.h.

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

FWColorManager* CmsShowEDI::m_colorManager
private

Definition at line 126 of file CmsShowEDI.h.

FWColorSelect* CmsShowEDI::m_colorSelectWidget
private
sigc::connection CmsShowEDI::m_destroyedConn
private

Definition at line 121 of file CmsShowEDI.h.

Referenced by disconnectAll(), and fillEDIFrame().

sigc::connection CmsShowEDI::m_displayChangedConn
private

Definition at line 119 of file CmsShowEDI.h.

Referenced by disconnectAll(), and fillEDIFrame().

TGTextButton* CmsShowEDI::m_filterButton
private

Definition at line 109 of file CmsShowEDI.h.

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

TGTextView* CmsShowEDI::m_filterError
private

Definition at line 123 of file CmsShowEDI.h.

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

FWGUIValidatingTextEntry* CmsShowEDI::m_filterExpressionEntry
private
TGTextButton* CmsShowEDI::m_frontButton
private

Definition at line 101 of file CmsShowEDI.h.

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

TGTextEntry* CmsShowEDI::m_instanceEntry
private

Definition at line 115 of file CmsShowEDI.h.

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

TGCheckButton* CmsShowEDI::m_isVisibleButton
private

Definition at line 106 of file CmsShowEDI.h.

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

FWEventItem* CmsShowEDI::m_item
private
TGNumberEntry* CmsShowEDI::m_layerEntry
private
sigc::connection CmsShowEDI::m_modelChangedConn
private

Definition at line 120 of file CmsShowEDI.h.

Referenced by disconnectAll(), and fillEDIFrame().

TGTextEntry* CmsShowEDI::m_moduleEntry
private

Definition at line 114 of file CmsShowEDI.h.

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

TGTextEntry* CmsShowEDI::m_nameEntry
private

Definition at line 112 of file CmsShowEDI.h.

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

TGLabel* CmsShowEDI::m_objectLabel
private

Definition at line 99 of file CmsShowEDI.h.

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

TGHSlider* CmsShowEDI::m_opacitySlider
private

Definition at line 105 of file CmsShowEDI.h.

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

TGTextEntry* CmsShowEDI::m_processEntry
private

Definition at line 116 of file CmsShowEDI.h.

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

TGTextButton* CmsShowEDI::m_removeButton
private

Definition at line 100 of file CmsShowEDI.h.

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

TGTextButton* CmsShowEDI::m_selectAllButton
private

Definition at line 111 of file CmsShowEDI.h.

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

TGTextButton* CmsShowEDI::m_selectButton
private

Definition at line 110 of file CmsShowEDI.h.

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

TGTextView* CmsShowEDI::m_selectError
private

Definition at line 124 of file CmsShowEDI.h.

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

FWGUIValidatingTextEntry* CmsShowEDI::m_selectExpressionEntry
private

Definition at line 108 of file CmsShowEDI.h.

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

FWSelectionManager* CmsShowEDI::m_selectionManager
private

Definition at line 97 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), and fillEDIFrame().

TGTab* CmsShowEDI::m_tabs
private

Definition at line 98 of file CmsShowEDI.h.

Referenced by CmsShowEDI(), and show().

TGTextEntry* CmsShowEDI::m_typeEntry
private

Definition at line 113 of file CmsShowEDI.h.

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

FWExpressionValidator* CmsShowEDI::m_validator
private

Definition at line 125 of file CmsShowEDI.h.

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