CMS 3D CMS Logo

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 //
12 
13 // system include files
14 #include <cassert>
15 #include <iostream>
16 #include <functional>
17 
18 // user include files
19 
28 
31  f = std::bind(&FWTriggerTableViewManager::buildView, this, std::placeholders::_1, std::placeholders::_2);
34 }
35 
37 
38 class FWViewBase* FWTriggerTableViewManager::buildView(TEveWindowSlot* iParent, const std::string& type) {
39  std::shared_ptr<FWTriggerTableView> view;
40 
42  view.reset(new FWHLTTriggerTableView(iParent));
43  else
44  view.reset(new FWL1TriggerTableView(iParent));
45 
46  view->setProcessList(&(context().metadataManager()->processNamesInJob()));
47 
48  view->setBackgroundColor(colorManager().background());
49  m_views.push_back(std::shared_ptr<FWTriggerTableView>(view));
50  view->beingDestroyed_.connect(std::bind(&FWTriggerTableViewManager::beingDestroyed, this, std::placeholders::_1));
51  return view.get();
52 }
53 
55  for (std::vector<std::shared_ptr<FWTriggerTableView> >::iterator it = m_views.begin(), itEnd = m_views.end();
56  it != itEnd;
57  ++it) {
58  if (it->get() == iView) {
59  m_views.erase(it);
60  return;
61  }
62  }
63 }
64 
66  for (std::vector<std::shared_ptr<FWTriggerTableView> >::iterator it = m_views.begin(), itEnd = m_views.end();
67  it != itEnd;
68  ++it) {
69  (*it)->setBackgroundColor(colorManager().background());
70  }
71 }
72 
74  for (std::vector<std::shared_ptr<FWTriggerTableView> >::iterator it = m_views.begin(), itEnd = m_views.end();
75  it != itEnd;
76  ++it) {
77  (*it)->dataChanged();
78  }
79 }
80 
82  // printf("FWTriggerTableViewManager::updateProcessLi\n");
83  for (std::vector<std::shared_ptr<FWTriggerTableView> >::iterator it = m_views.begin(), itEnd = m_views.end();
84  it != itEnd;
85  ++it) {
86  (*it)->setProcessList(&(context().metadataManager()->processNamesInJob()));
87  (*it)->resetCombo();
88  }
89 }
FWGUIManager
Definition: FWGUIManager.h:95
FWHLTTriggerTableView
Definition: FWHLTTriggerTableView.h:30
FWViewType::idToName
static const std::string & idToName(int)
Definition: FWViewType.cc:72
FWViewManagerBase
Definition: FWViewManagerBase.h:45
FWGUIManager::registerViewBuilder
void registerViewBuilder(const std::string &iName, ViewBuildFunctor &iBuilder)
Definition: FWGUIManager.cc:273
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
FWViewManagerBase::colorManager
FWColorManager & colorManager() const
Definition: FWViewManagerBase.cc:123
FWTriggerTableViewManager::eventEnd
void eventEnd() override
Definition: FWTriggerTableViewManager.cc:73
FWTriggerTableViewManager::m_views
std::vector< std::shared_ptr< FWTriggerTableView > > m_views
Definition: FWTriggerTableViewManager.h:48
FWViewType::kTableL1
Definition: FWViewType.h:40
FWJobMetadataManager.h
FWViewType::sName
static std::string sName[kTypeSize]
Definition: FWViewType.h:71
FWColorManager.h
FWTriggerTableViewManager::beingDestroyed
void beingDestroyed(const FWViewBase *)
Definition: FWTriggerTableViewManager.cc:54
FWTriggerTableViewManager::colorsChanged
void colorsChanged() override
Definition: FWTriggerTableViewManager.cc:65
FWGUIManager::ViewBuildFunctor
std::function< FWViewBase *(TEveWindowSlot *, const std::string &)> ViewBuildFunctor
Definition: FWGUIManager.h:98
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
FWL1TriggerTableView.h
FWTriggerTableViewManager::updateProcessList
void updateProcessList()
Definition: FWTriggerTableViewManager.cc:81
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
FWViewType::kTableHLT
Definition: FWViewType.h:41
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWEventItem.h
FWTriggerTableViewManager::~FWTriggerTableViewManager
~FWTriggerTableViewManager() override
Definition: FWTriggerTableViewManager.cc:36
FWTypeToRepresentations.h
FWTriggerTableViewManager.h
FWTriggerTableViewManager::buildView
FWViewBase * buildView(TEveWindowSlot *iParent, const std::string &type)
Definition: FWTriggerTableViewManager.cc:38
FWHLTTriggerTableView.h
FWViewBase
Definition: FWViewBase.h:36
FWViewManagerBase::context
const fireworks::Context & context() const
Definition: FWViewManagerBase.h:69
FWTriggerTableViewManager::FWTriggerTableViewManager
FWTriggerTableViewManager()
FWGUIManager.h
FWL1TriggerTableView
Definition: FWL1TriggerTableView.h:25