CMS 3D CMS Logo

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

#include <FWGUIEventFilter.h>

Inheritance diagram for FWGUIEventFilter:

Public Member Functions

void addSelector (FWEventSelector *sel)
 
void apply ()
 
void changeFilterMode ()
 
void checkApplyButton ()
 
 ClassDef (FWGUIEventFilter, 0)
 
virtual void CloseWindow ()
 
void deleteEntry (FWGUIEventSelector *)
 
void disableFilters ()
 
 FWGUIEventFilter (CmsShowNavigator *)
 
int getFilterMode ()
 
std::list< FWGUIEventSelector * > & guiSelectors ()
 
Bool_t HandleKey (Event_t *event)
 
bool isOpen ()
 
void newEventEntry ()
 
void newTriggerEntry ()
 
void reset ()
 
void setupDisableFilteringButton (bool)
 
void show (std::list< FWEventSelector * > *sels, int filterMode, int state)
 
void updateFilterStateLabel (int)
 
virtual ~FWGUIEventFilter ()
 

Private Attributes

FWCustomIconsButtonm_addBtn
 
TGTextButton * m_applyBtn
 
TGTextButton * m_disableFilteringBtn
 
TGCompositeFrame * m_eventSelectionFrame
 
TGCompositeFrame * m_eventSelectionFrameParent
 
bool m_filtersRemoved
 
std::list< FWGUIEventSelector * > m_guiSelectors
 
bool m_isOpen
 
CmsShowNavigatorm_navigator
 
int m_origFilterMode
 
TGRadioButton * m_rad1
 
TGRadioButton * m_rad2
 
TGLabel * m_stateLabel
 
TGCompositeFrame * m_triggerSelectionFrame
 
TGCompositeFrame * m_triggerSelectionFrameParent
 

Static Private Attributes

static const int s_entryHeight = 21
 

Detailed Description

Definition at line 26 of file FWGUIEventFilter.h.

Constructor & Destructor Documentation

FWGUIEventFilter::FWGUIEventFilter ( CmsShowNavigator n)

Definition at line 17 of file FWGUIEventFilter.cc.

References FWCheckBoxIcon::coreIcondir(), f, m_addBtn, m_applyBtn, m_disableFilteringBtn, m_eventSelectionFrameParent, m_rad1, m_rad2, m_stateLabel, m_triggerSelectionFrameParent, fireworks_root_gui::makeLabel(), and s_entryHeight.

17  :
18  TGMainFrame(gClient->GetRoot(), 560, 300),
19 
20 
22  m_isOpen(false),
23  m_filtersRemoved(false),
24 
29 
30  m_rad1(0),
31  m_rad2(0),
32  m_stateLabel(0),
34  m_addBtn(0),
35 
36  m_navigator(n)
37 {
38  SetWindowName("Event Filters");
39 
40  TGVerticalFrame* v1 = new TGVerticalFrame(this);
41  AddFrame(v1, new TGLayoutHints(kLHintsExpandX |kLHintsExpandY));
42 
43 
44  //----------------------- Event selection
45 
46  {
47  m_eventSelectionFrameParent = new TGVerticalFrame(v1, GetWidth(), s_entryHeight, 0);
48  v1->AddFrame(m_eventSelectionFrameParent, new TGLayoutHints(kLHintsExpandX|kLHintsTop, 2, 2, 0,0));
49 
50  // headers
51  TGHorizontalFrame* selH = new TGHorizontalFrame(m_eventSelectionFrameParent);
52  m_eventSelectionFrameParent->AddFrame(selH, new TGLayoutHints(kLHintsExpandX));
53 
54  {
55  TGCompositeFrame *cfr = new TGHorizontalFrame(selH);
56  selH->AddFrame(cfr, new TGLayoutHints(kLHintsExpandX));
57  cfr->AddFrame(new TGLabel(cfr, "Event Filter Expression:"), new TGLayoutHints(kLHintsLeft|kLHintsBottom, 2, 2, 6, 4));
58  }
59  {
60  TGCompositeFrame *cfr = new TGHorizontalFrame(selH, 122, 22, kFixedSize);
61  selH->AddFrame(cfr);
62  cfr->AddFrame(new TGLabel(cfr, "Comment:"), new TGLayoutHints(kLHintsLeft|kLHintsBottom, 2, 2, 2, 0));
63  }
64  {
65  TGCompositeFrame *cfr = new TGHorizontalFrame(selH, 105, 22, kFixedSize);
66  selH->AddFrame(cfr);
67  cfr->AddFrame(new TGLabel(cfr, "Pass:"), new TGLayoutHints(kLHintsLeft|kLHintsBottom, 2, 2, 2, 0));
68  }
69 
70 
71  TGHorizontalFrame* addBtnFrame = new TGHorizontalFrame(v1);
72  v1->AddFrame(addBtnFrame, new TGLayoutHints(kLHintsExpandX));
73  addBtnFrame->AddFrame(new TGHorizontal3DLine(addBtnFrame), new TGLayoutHints(kLHintsExpandX | kLHintsCenterY,4 ,8, 2, 2));
74 
75  m_addBtn = new FWCustomIconsButton(addBtnFrame, fClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "plus-sign.png"),
76  fClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "plus-sign-over.png"),
77  fClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "plus-sign-disabled.png"));
78 
79  addBtnFrame->AddFrame(m_addBtn, new TGLayoutHints(kLHintsRight/*|kLHintsExpandX|kLHintsExpandY*/, 0, 6, 4, 1));
80  TQObject::Connect(m_addBtn, "Clicked()", "FWGUIEventFilter", this, "newEventEntry()");
81  }
82 
83  //----------------------- TriggerResults selection
84 
85  {
86  m_triggerSelectionFrameParent = new TGVerticalFrame(v1, GetWidth(), s_entryHeight, 0);
87  v1->AddFrame(m_triggerSelectionFrameParent, new TGLayoutHints(kLHintsExpandX|kLHintsTop, 2, 2, 0,0));
88 
89  // headers
90  TGHorizontalFrame* selH = new TGHorizontalFrame(m_triggerSelectionFrameParent);
91  m_triggerSelectionFrameParent->AddFrame(selH, new TGLayoutHints(kLHintsExpandX));
92 
93  {
94  TGCompositeFrame *cfr = new TGHorizontalFrame(selH);
95  selH->AddFrame(cfr, new TGLayoutHints(kLHintsExpandX));
96  cfr->AddFrame(new TGLabel(cfr, "TriggerResults Filter Expression:"), new TGLayoutHints(kLHintsLeft|kLHintsBottom, 2, 2, 6, 04));
97  }
98  {
99  TGCompositeFrame *cfr = new TGHorizontalFrame(selH, 122, 22, kFixedSize);
100  selH->AddFrame(cfr);
101  cfr->AddFrame(new TGLabel(cfr, "Comment:"), new TGLayoutHints(kLHintsLeft|kLHintsBottom, 2, 2, 0, 0));
102  }
103  {
104  TGCompositeFrame *cfr = new TGHorizontalFrame(selH, 105, 22, kFixedSize);
105  selH->AddFrame(cfr);
106  cfr->AddFrame(new TGLabel(cfr, "Pass:"), new TGLayoutHints(kLHintsLeft|kLHintsBottom, 2, 2, 0, 0));
107  }
108 
109  //-------------------- adding new selection
110 
111  TGHorizontalFrame* addBtnFrame = new TGHorizontalFrame(v1);
112  v1->AddFrame(addBtnFrame, new TGLayoutHints(kLHintsExpandX));
113 
114  addBtnFrame->AddFrame(new TGHorizontal3DLine(addBtnFrame), new TGLayoutHints(kLHintsExpandX | kLHintsCenterY,4 ,8, 2, 2));
115  m_addBtn = new FWCustomIconsButton(addBtnFrame, fClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "plus-sign.png"),
116  fClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "plus-sign-over.png"),
117  fClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "plus-sign-disabled.png"));
118 
119  addBtnFrame->AddFrame(m_addBtn, new TGLayoutHints(kLHintsRight/*|kLHintsExpandX|kLHintsExpandY*/, 0, 6, 4, 1));
120  TQObject::Connect(m_addBtn, "Clicked()", "FWGUIEventFilter", this, "newTriggerEntry()");
121 
122  }
123 
124  //-------------------- logical operations
125 
126  TGHorizontalFrame* headerFrame = new TGHorizontalFrame(v1/*, 360, 61, kHorizontalFrame | kFixedSize*/);
127 
128  {
129  TGHorizontalFrame* xx = new TGHorizontalFrame(v1);
130  fireworks_root_gui::makeLabel(xx, "Combine Expression Width:", 152, 2,2,2,2);
131  m_rad1 = new TGRadioButton(xx, "OR", 81);
132  xx->AddFrame(m_rad1, new TGLayoutHints(kLHintsNormal, 2,10, 0, 0));
133  m_rad1->SetState(kButtonDown);
134  m_rad2 = new TGRadioButton(xx, "AND", 82);
135  xx->AddFrame(m_rad2);
136  m_rad1->Connect("Clicked()", "FWGUIEventFilter", this, "changeFilterMode()");
137  m_rad2->Connect("Clicked()", "FWGUIEventFilter", this, "changeFilterMode()");
138 
139  v1->AddFrame(xx, new TGLayoutHints(kLHintsExpandX, 2, 2, 2, 2));
140  }
141  v1->AddFrame(headerFrame, new TGLayoutHints(kLHintsNormal, 1, 1, 1, 1));
142 
143 
144  //-------------------- status
145  {
146  TGHorizontalFrame* hf = new TGHorizontalFrame(v1);
147  v1->AddFrame(hf, new TGLayoutHints(kLHintsExpandX, 2, 2, 2, 20));
148  fireworks_root_gui::makeLabel(hf, "Status:", 37, 2,2,2,2);
149  {
150  TGGC *fTextGC;
151  const TGFont *font = gClient->GetFont("-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1");
152  if (!font)
153  font = gClient->GetResourcePool()->GetDefaultFont();
154  GCValues_t gval;
155  gval.fMask = kGCBackground | kGCFont | kGCForeground;
156  gval.fFont = font->GetFontHandle();
157  fTextGC = gClient->GetGC(&gval, kTRUE);
158 
159  TGHorizontalFrame *labFrame = new TGHorizontalFrame(hf, 380, 22, kHorizontalFrame | kFixedWidth);
160  hf->AddFrame(labFrame, new TGLayoutHints(kLHintsNormal));
161 
162  m_stateLabel = new TGLabel(labFrame, "x", fTextGC->GetGC());
163  labFrame->AddFrame(m_stateLabel, new TGLayoutHints( kLHintsLeft,2,2,2,2));
164 
165  }
166  }
167  //-------------------- external actions
168 
169  TGHorizontalFrame* btnFrame = new TGHorizontalFrame(v1, 280, 30);
170  v1->AddFrame(btnFrame, new TGLayoutHints(kLHintsCenterX | kLHintsExpandX | kLHintsBottom , 0, 0, 2, 4));
171 
172  TGTextButton* cancel = new TGTextButton(btnFrame," Close ");
173  btnFrame->AddFrame(cancel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 20, 20, 2, 4));
174  cancel->Connect("Clicked()","FWGUIEventFilter", this, "CloseWindow()");
175 
176  {
177  TGHorizontalFrame* f = new TGHorizontalFrame(btnFrame);
178  btnFrame->AddFrame(f, new TGLayoutHints(kLHintsRight, 4, 18, 2, 4));
179  m_disableFilteringBtn = new TGTextButton(f, " Disable Filtering ");
180  f->AddFrame(m_disableFilteringBtn, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 4, 10, 2, 4));
181  m_disableFilteringBtn->Connect("Clicked()","FWGUIEventFilter", this, "disableFilters()");
182 
183  m_applyBtn = new TGTextButton(f,"Apply Filters");
184  f->AddFrame(m_applyBtn, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 4, 8, 2, 4));
185  m_applyBtn->Connect("Clicked()","FWGUIEventFilter", this, "apply()");
186  m_applyBtn->SetToolTipText("Enable filtering and apply changes.");
187  }
188 
189 
190 }
static const TString & coreIcondir()
TGTextButton * m_applyBtn
TGRadioButton * m_rad1
TGCompositeFrame * m_eventSelectionFrameParent
TGCompositeFrame * m_triggerSelectionFrameParent
double f[11][100]
CmsShowNavigator * m_navigator
TGCompositeFrame * m_triggerSelectionFrame
static const int s_entryHeight
TGLabel * m_stateLabel
TGRadioButton * m_rad2
FWCustomIconsButton * m_addBtn
TGCompositeFrame * m_eventSelectionFrame
TGTextButton * m_disableFilteringBtn
TGLabel * makeLabel(TGCompositeFrame *p, const char *txt, int width, int lo=0, int ro=0, int to=2, int bo=0)
Definition: RootGuiUtils.cc:22
FWGUIEventFilter::~FWGUIEventFilter ( )
virtual

Definition at line 192 of file FWGUIEventFilter.cc.

193 {
194 }

Member Function Documentation

void FWGUIEventFilter::addSelector ( FWEventSelector sel)

Definition at line 197 of file FWGUIEventFilter.cc.

References CmsShowNavigator::getProcessList(), m_eventSelectionFrame, m_guiSelectors, m_navigator, FWEventSelector::m_triggerProcess, m_triggerSelectionFrame, and dbtoconf::parent.

Referenced by newEventEntry(), newTriggerEntry(), and show().

198 {
199  TGCompositeFrame* parent = sel->m_triggerProcess.empty() ? m_eventSelectionFrame : m_triggerSelectionFrame;
201  parent->AddFrame(es, new TGLayoutHints(kLHintsExpandX));
202  TQObject::Connect(es, "removeSelector(FWGUIEventSelector*)", "FWGUIEventFilter", this, "deleteEntry(FWGUIEventSelector*)");
203  TQObject::Connect(es, "selectorChanged()", "FWGUIEventFilter", this, "checkApplyButton()");
204 
205  m_guiSelectors.push_back(es);
206 
207 }
list parent
Definition: dbtoconf.py:74
std::string m_triggerProcess
CmsShowNavigator * m_navigator
TGCompositeFrame * m_triggerSelectionFrame
std::vector< std::string > & getProcessList() const
TGCompositeFrame * m_eventSelectionFrame
std::list< FWGUIEventSelector * > m_guiSelectors
void FWGUIEventFilter::apply ( )

Definition at line 325 of file FWGUIEventFilter.cc.

References CmsShowNavigator::applyFiltersFromGUI(), getFilterMode(), m_applyBtn, m_filtersRemoved, m_navigator, and m_origFilterMode.

Referenced by electronTools.AddElectronUserIsolation::__call__(), photonTools.AddPhotonUserIsolation::__call__(), heavyIonTools.ConfigureHeavyIons::__call__(), metTools.AddTcMET::__call__(), muonTools.AddMuonUserIsolation::__call__(), editorTools.UserCodeTool::__call__(), coreTools.RestrictInputToAOD::__call__(), HiCoreTools.RestrictInputToAOD::__call__(), trackTools.MakeAODTrackCandidates::__call__(), cmsswVersionTools.Run52xOn51xTrigger::__call__(), heavyIonTools.ProductionDefaults::__call__(), editorTools.ChangeSource::__call__(), metTools.AddPfMET::__call__(), HiCoreTools.RemoveMCMatching::__call__(), coreTools.RunOnData::__call__(), trackTools.MakePATTrackCandidates::__call__(), trigTools.SwitchOnTrigger::__call__(), cmsswVersionTools.PickRelValInputFiles::__call__(), coreTools.RemoveMCMatching::__call__(), heavyIonTools.SelectionDefaults::__call__(), HiCoreTools.RemoveAllPATObjectsBut::__call__(), heavyIonTools.DisbaleMonteCarloDeps::__call__(), jetTools.RunBTagging::__call__(), HiCoreTools.RemoveSpecificPATObjects::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), coreTools.RemoveAllPATObjectsBut::__call__(), trackTools.MakeTrackCandidates::__call__(), coreTools.RemoveSpecificPATObjects::__call__(), HiCoreTools.RemoveCleaning::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), HiCoreTools.AddCleaning::__call__(), coreTools.RemoveCleaning::__call__(), tauTools.AddTauCollection::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), coreTools.AddCleaning::__call__(), jetTools.AddJetCollection::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), trigTools.RemoveCleaningFromTriggerMatching::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.AddJetID::__call__(), metUncertaintyTools.RunMEtUncertainties::__call__(), jetTools.SetTagInfos::__call__(), and jetTools.SwitchJetCorrLevels::__call__().

326 {
328 
330  m_filtersRemoved = false;
331  m_applyBtn->SetForegroundColor(0x000000);
332  fClient->NeedRedraw( this);
333 
334 }
TGTextButton * m_applyBtn
CmsShowNavigator * m_navigator
void FWGUIEventFilter::changeFilterMode ( )

Definition at line 210 of file FWGUIEventFilter.cc.

References checkApplyButton(), m_rad1, and m_rad2.

211 {
212  TGButton *btn = (TGButton *) gTQSender;
213 
214  if (btn->WidgetId() == 81)
215  m_rad2->SetState(kButtonUp);
216  else
217  m_rad1->SetState(kButtonUp);
219 }
TGRadioButton * m_rad1
TGRadioButton * m_rad2
void FWGUIEventFilter::checkApplyButton ( )

Definition at line 380 of file FWGUIEventFilter.cc.

References getFilterMode(), i, m_applyBtn, m_filtersRemoved, m_guiSelectors, and m_origFilterMode.

Referenced by changeFilterMode().

381 {
382  // set color of apply button if changed
383 
384  bool changed = ( m_filtersRemoved || (getFilterMode() != m_origFilterMode) );
385 
386  if (!changed)
387  {
388  std::list<FWGUIEventSelector*>::iterator i = m_guiSelectors.begin();
389  while (i != m_guiSelectors.end())
390  {
391  if ((*i)->origSelector() == 0 ||
392  (*i)->guiSelector()->m_enabled != (*i)->origSelector()->m_enabled ||
393  (*i)->guiSelector()->m_expression != (*i)->origSelector()->m_expression )
394  {
395  changed = true;
396  break;
397  }
398 
399  ++i;
400  }
401  }
402 
403 
404  m_applyBtn->SetForegroundColor(changed ? 0x40FF80 : 0x000000);
405  gClient->NeedRedraw( m_applyBtn);
406 }
int i
Definition: DBlmapReader.cc:9
TGTextButton * m_applyBtn
std::list< FWGUIEventSelector * > m_guiSelectors
FWGUIEventFilter::ClassDef ( FWGUIEventFilter  ,
 
)
void FWGUIEventFilter::CloseWindow ( )
virtual

Definition at line 358 of file FWGUIEventFilter.cc.

References CmsShowNavigator::editFiltersExternally(), i, m_eventSelectionFrame, m_eventSelectionFrameParent, m_guiSelectors, m_isOpen, m_navigator, m_triggerSelectionFrame, and m_triggerSelectionFrameParent.

Referenced by CmsShowNavigator::showEventFilterGUI().

359 {
360  m_isOpen = false;
365 
366  FWGUIEventSelector* gs;
367  for (std::list<FWGUIEventSelector*>::iterator i = m_guiSelectors.begin(); i != m_guiSelectors.end(); ++i)
368  {
369  gs = *i;
370  delete gs;
371  }
372 
373  m_guiSelectors.clear();
374  UnmapWindow();
376 }
int i
Definition: DBlmapReader.cc:9
TGCompositeFrame * m_eventSelectionFrameParent
TGCompositeFrame * m_triggerSelectionFrameParent
CmsShowNavigator * m_navigator
TGCompositeFrame * m_triggerSelectionFrame
TGCompositeFrame * m_eventSelectionFrame
std::list< FWGUIEventSelector * > m_guiSelectors
void FWGUIEventFilter::deleteEntry ( FWGUIEventSelector sel)

Definition at line 284 of file FWGUIEventFilter.cc.

References m_eventSelectionFrame, m_filtersRemoved, m_guiSelectors, FWEventSelector::m_triggerProcess, m_triggerSelectionFrame, FWGUIEventSelector::origSelector(), and AlCaHLTBitMon_ParallelJobs::p.

285 {
286  m_filtersRemoved = true;
287 
288  m_guiSelectors.remove(sel);
289 
290  TGCompositeFrame* p = 0;
291  if (sel->origSelector()->m_triggerProcess.empty())
293  else
295 
296  p->RemoveFrame(sel);
297  Resize(GetWidth(), GetDefaultHeight());
298  Layout();
299  gClient->NeedRedraw(this);
300 }
FWEventSelector * origSelector()
std::string m_triggerProcess
TGCompositeFrame * m_triggerSelectionFrame
TGCompositeFrame * m_eventSelectionFrame
std::list< FWGUIEventSelector * > m_guiSelectors
void FWGUIEventFilter::disableFilters ( )

Definition at line 343 of file FWGUIEventFilter.cc.

References m_navigator, and CmsShowNavigator::toggleFilterEnable().

344 {
346 }
CmsShowNavigator * m_navigator
int FWGUIEventFilter::getFilterMode ( )

Definition at line 349 of file FWGUIEventFilter.cc.

References CmsShowNavigator::kAnd, CmsShowNavigator::kOr, and m_rad1.

Referenced by apply(), CmsShowNavigator::applyFiltersFromGUI(), and checkApplyButton().

350 {
351  if (m_rad1->IsOn())
352  return CmsShowNavigator::kOr;
353  else
354  return CmsShowNavigator::kAnd;
355 }
TGRadioButton * m_rad1
std::list<FWGUIEventSelector*>& FWGUIEventFilter::guiSelectors ( )
inline

Definition at line 36 of file FWGUIEventFilter.h.

References m_guiSelectors.

Referenced by CmsShowNavigator::applyFiltersFromGUI(), and CmsShowNavigator::updateSelectorsInfo().

36 { return m_guiSelectors; }
std::list< FWGUIEventSelector * > m_guiSelectors
bool FWGUIEventFilter::HandleKey ( Event_t *  event)

Definition at line 454 of file FWGUIEventFilter.cc.

References CmsShowMainFrame::bindCSGActionKeys(), FWGUIManager::getGUIManager(), FWGUIManager::getMainFrame(), if(), m, GetRecoTauVFromDQM_MC_cff::next, and w().

455 {
456  // AMT workaround for problems to override root's action for 'Ctrl+s'
457 
458  if (GetBindList()->IsEmpty())
460 
461  TIter next(fBindList);
462  TGMapKey *m;
463  TGFrame *w = 0;
464 
465  while ((m = (TGMapKey *) next())) {
466  if (m->fKeyCode == event->fCode) {
467  w = (TGFrame *) m->fWindow;
468  if (w->HandleKey(event)) return kTRUE;
469  }
470  }
471  return kFALSE;
472 }
void bindCSGActionKeys(const TGMainFrame *f) const
CmsShowMainFrame * getMainFrame() const
Definition: FWGUIManager.h:200
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
static FWGUIManager * getGUIManager()
perl if(1 lt scalar(@::datatypes))
Definition: edlooper.cc:31
T w() const
bool FWGUIEventFilter::isOpen ( )
inline

Definition at line 42 of file FWGUIEventFilter.h.

References m_isOpen.

Referenced by CmsShowNavigator::canEditFiltersExternally().

42 { return m_isOpen; }
void FWGUIEventFilter::newEventEntry ( )

Definition at line 316 of file FWGUIEventFilter.cc.

References addSelector().

317 {
319  MapSubwindows();
320  Resize(GetWidth(), GetDefaultHeight());
321  Layout();
322 }
void addSelector(FWEventSelector *sel)
void FWGUIEventFilter::newTriggerEntry ( )

Definition at line 303 of file FWGUIEventFilter.cc.

References addSelector(), FWEventSelector::m_triggerProcess, and alignCSCRings::s.

304 {
306  s->m_triggerProcess = "HLT";
307  addSelector(s);
308  MapSubwindows();
309 
310  Resize(GetWidth(), GetDefaultHeight());
311 
312  Layout();
313 }
std::string m_triggerProcess
void addSelector(FWEventSelector *sel)
void FWGUIEventFilter::reset ( void  )

Definition at line 261 of file FWGUIEventFilter.cc.

References i, m_eventSelectionFrame, m_eventSelectionFrameParent, m_guiSelectors, m_triggerSelectionFrame, and m_triggerSelectionFrameParent.

Referenced by CmsShowNavigator::setFrom().

262 {
263  // called on load of configuration
267  }
271  }
272 
273  for (std::list<FWGUIEventSelector*>::iterator i = m_guiSelectors.begin(); i != m_guiSelectors.end(); ++i)
274  delete *i;
275 
276  m_guiSelectors.clear();
277 }
int i
Definition: DBlmapReader.cc:9
TGCompositeFrame * m_eventSelectionFrameParent
TGCompositeFrame * m_triggerSelectionFrameParent
TGCompositeFrame * m_triggerSelectionFrame
TGCompositeFrame * m_eventSelectionFrame
std::list< FWGUIEventSelector * > m_guiSelectors
void FWGUIEventFilter::setupDisableFilteringButton ( bool  x)

Definition at line 337 of file FWGUIEventFilter.cc.

References m_disableFilteringBtn.

Referenced by CmsShowNavigator::applyFiltersFromGUI(), and CmsShowNavigator::toggleFilterEnable().

338 {
339  m_disableFilteringBtn->SetEnabled(x);
340 }
x
Definition: VDTMath.h:216
TGTextButton * m_disableFilteringBtn
void FWGUIEventFilter::show ( std::list< FWEventSelector * > *  sels,
int  filterMode,
int  state 
)

Definition at line 222 of file FWGUIEventFilter.cc.

References addSelector(), i, CmsShowNavigator::kOr, m_applyBtn, m_eventSelectionFrame, m_eventSelectionFrameParent, m_filtersRemoved, m_isOpen, m_origFilterMode, m_rad1, m_rad2, m_triggerSelectionFrame, m_triggerSelectionFrameParent, and updateFilterStateLabel().

Referenced by Vispa.Main.AboutDialog.AboutDialog::onScreen(), Vispa.Gui.BoxContentDialog.BoxContentDialog::onScreen(), Vispa.Gui.FindDialog.FindDialog::onScreen(), CmsShowNavigator::setFrom(), and CmsShowNavigator::showEventFilterGUI().

223 {
224  m_applyBtn->SetForegroundColor(0x000000);
225  m_filtersRemoved = false;
226 
227  m_isOpen = true;
228 
229  m_origFilterMode = filterMode;
230 
231  if (filterMode == CmsShowNavigator::kOr)
232  {
233  m_rad1->SetState(kButtonDown, false);
234  m_rad2->SetState(kButtonUp, false);
235  }
236  else
237  {
238  m_rad2->SetState(kButtonDown, false);
239  m_rad1->SetState(kButtonUp, false);
240  }
241 
242  assert(m_eventSelectionFrame == 0);
243 
244  m_eventSelectionFrame = new TGVerticalFrame(m_eventSelectionFrameParent);
245  m_eventSelectionFrameParent->AddFrame(m_eventSelectionFrame, new TGLayoutHints(kLHintsExpandX));
246 
248  m_triggerSelectionFrameParent->AddFrame(m_triggerSelectionFrame, new TGLayoutHints(kLHintsExpandX));
249 
250  for(std::list<FWEventSelector*>::iterator i = sels->begin(); i != sels->end(); ++i)
251  addSelector(*i);
252 
253  updateFilterStateLabel(filterState);
254 
255  MapSubwindows();
256  Layout();
257  MapRaised();
258 }
int i
Definition: DBlmapReader.cc:9
TGTextButton * m_applyBtn
TGRadioButton * m_rad1
TGCompositeFrame * m_eventSelectionFrameParent
TGCompositeFrame * m_triggerSelectionFrameParent
void updateFilterStateLabel(int)
TGCompositeFrame * m_triggerSelectionFrame
TGRadioButton * m_rad2
TGCompositeFrame * m_eventSelectionFrame
void addSelector(FWEventSelector *sel)
void FWGUIEventFilter::updateFilterStateLabel ( int  state)

Definition at line 409 of file FWGUIEventFilter.cc.

References CmsShowNavigator::getNSelectedEvents(), CmsShowNavigator::getNTotalEvents(), CmsShowNavigator::kOff, CmsShowNavigator::kOn, m_navigator, and m_stateLabel.

Referenced by CmsShowNavigator::CmsShowNavigator(), and show().

410 {
412  m_stateLabel->SetText(Form("%d events selected from %d ", m_navigator->getNSelectedEvents(), m_navigator->getNTotalEvents()));
413  else if (state == CmsShowNavigator::kOff)
414  m_stateLabel->SetText("Filtering Disabled ");
415  else
416  m_stateLabel->SetText("Filtering Withdrawn ");
417 
418  Layout();
419 }
CmsShowNavigator * m_navigator
TGLabel * m_stateLabel
char state
Definition: procUtils.cc:75

Member Data Documentation

FWCustomIconsButton* FWGUIEventFilter::m_addBtn
private

Definition at line 77 of file FWGUIEventFilter.h.

Referenced by FWGUIEventFilter().

TGTextButton* FWGUIEventFilter::m_applyBtn
private

Definition at line 75 of file FWGUIEventFilter.h.

Referenced by apply(), checkApplyButton(), FWGUIEventFilter(), and show().

TGTextButton* FWGUIEventFilter::m_disableFilteringBtn
private

Definition at line 76 of file FWGUIEventFilter.h.

Referenced by FWGUIEventFilter(), and setupDisableFilteringButton().

TGCompositeFrame* FWGUIEventFilter::m_eventSelectionFrame
private

Definition at line 67 of file FWGUIEventFilter.h.

Referenced by addSelector(), CloseWindow(), deleteEntry(), reset(), and show().

TGCompositeFrame* FWGUIEventFilter::m_eventSelectionFrameParent
private

Definition at line 66 of file FWGUIEventFilter.h.

Referenced by CloseWindow(), FWGUIEventFilter(), reset(), and show().

bool FWGUIEventFilter::m_filtersRemoved
private

Definition at line 62 of file FWGUIEventFilter.h.

Referenced by apply(), checkApplyButton(), deleteEntry(), and show().

std::list<FWGUIEventSelector*> FWGUIEventFilter::m_guiSelectors
private
bool FWGUIEventFilter::m_isOpen
private

Definition at line 61 of file FWGUIEventFilter.h.

Referenced by CloseWindow(), isOpen(), and show().

CmsShowNavigator* FWGUIEventFilter::m_navigator
private
int FWGUIEventFilter::m_origFilterMode
private

Definition at line 60 of file FWGUIEventFilter.h.

Referenced by apply(), checkApplyButton(), and show().

TGRadioButton* FWGUIEventFilter::m_rad1
private

Definition at line 72 of file FWGUIEventFilter.h.

Referenced by changeFilterMode(), FWGUIEventFilter(), getFilterMode(), and show().

TGRadioButton* FWGUIEventFilter::m_rad2
private

Definition at line 73 of file FWGUIEventFilter.h.

Referenced by changeFilterMode(), FWGUIEventFilter(), and show().

TGLabel* FWGUIEventFilter::m_stateLabel
private

Definition at line 74 of file FWGUIEventFilter.h.

Referenced by FWGUIEventFilter(), and updateFilterStateLabel().

TGCompositeFrame* FWGUIEventFilter::m_triggerSelectionFrame
private

Definition at line 70 of file FWGUIEventFilter.h.

Referenced by addSelector(), CloseWindow(), deleteEntry(), reset(), and show().

TGCompositeFrame* FWGUIEventFilter::m_triggerSelectionFrameParent
private

Definition at line 69 of file FWGUIEventFilter.h.

Referenced by CloseWindow(), FWGUIEventFilter(), reset(), and show().

const int FWGUIEventFilter::s_entryHeight = 21
staticprivate

Definition at line 58 of file FWGUIEventFilter.h.

Referenced by FWGUIEventFilter().