CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWTriggerTableViewManager.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Core
4 // Class : FWTriggerTableViewManager
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author:
10 // Created: Sun Jan 6 22:01:27 EST 2008
11 // $Id: FWTriggerTableViewManager.cc,v 1.8 2012/09/27 16:51:25 eulisse Exp $
12 //
13 
14 // system include files
15 #include <cassert>
16 #include <iostream>
17 #include <boost/bind.hpp>
18 
19 // user include files
20 
29 
30 
33 {
36  this, _1, _2);
39 }
40 
42 {
43 }
44 
45 class FWViewBase*
46 FWTriggerTableViewManager::buildView(TEveWindowSlot* iParent, const std::string& type)
47 {
48  boost::shared_ptr<FWTriggerTableView> view;
49 
51  view.reset( new FWHLTTriggerTableView(iParent));
52  else
53  view.reset( new FWL1TriggerTableView(iParent));
54 
55  view->setProcessList(&(context().metadataManager()->processNamesInJob()));
56 
57  view->setBackgroundColor(colorManager().background());
58  m_views.push_back(boost::shared_ptr<FWTriggerTableView> (view));
59  view->beingDestroyed_.connect(boost::bind(&FWTriggerTableViewManager::beingDestroyed,
60  this,_1));
61  return view.get();
62 }
63 
64 void
66 {
67  for(std::vector<boost::shared_ptr<FWTriggerTableView> >::iterator it=
68  m_views.begin(), itEnd = m_views.end();
69  it != itEnd;
70  ++it) {
71  if(it->get() == iView) {
72  m_views.erase(it);
73  return;
74  }
75  }
76 }
77 
78 void
80 {
81  for(std::vector<boost::shared_ptr<FWTriggerTableView> >::iterator it=
82  m_views.begin(), itEnd = m_views.end();
83  it != itEnd;
84  ++it) {
85  (*it)->setBackgroundColor(colorManager().background());
86  }
87 }
88 
89 void
91 {
92  for(std::vector<boost::shared_ptr<FWTriggerTableView> >::iterator it=
93  m_views.begin(), itEnd = m_views.end();
94  it != itEnd;
95  ++it) {
96  (*it)->dataChanged();
97  }
98 }
99 
100 void
102 {
103  // printf("FWTriggerTableViewManager::updateProcessLi\n");
104  for(std::vector<boost::shared_ptr<FWTriggerTableView> >::iterator it=
105  m_views.begin(), itEnd = m_views.end();
106  it != itEnd;
107  ++it) {
108 
109  (*it)->setProcessList(&(context().metadataManager()->processNamesInJob()));
110  (*it)->resetCombo();
111  }
112 }
113 
type
Definition: HCALResponse.h:21
const fireworks::Context & context() const
void beingDestroyed(const FWViewBase *)
FWViewBase * buildView(TEveWindowSlot *iParent, const std::string &type)
FWColorManager & colorManager() const
boost::function2< FWViewBase *, TEveWindowSlot *, const std::string & > ViewBuildFunctor
Definition: FWGUIManager.h:100
void registerViewBuilder(const std::string &iName, ViewBuildFunctor &iBuilder)
static std::string sName[kTypeSize]
Definition: FWViewType.h:63
std::vector< boost::shared_ptr< FWTriggerTableView > > m_views
double f[11][100]
static const std::string & idToName(int)
Definition: FWViewType.cc:90