CMS 3D CMS Logo

FWPSetTableManager.h
Go to the documentation of this file.
1 #ifndef Fireworks_FWInterface_FWPSetTableManager_h
2 #define Fireworks_FWInterface_FWPSetTableManager_h
3 // -*- C++ -*-
4 //
5 // Package: FWInterface
6 // Class : FWPSetTableManager
7 //
16 //
17 // Original Author:
18 // Created: Mon Feb 28 17:06:50 CET 2011
19 //
20 
21 // system include files
22 
23 #include <sigc++/sigc++.h>
27 
28 class FWPSetCellEditor;
29 namespace edm {
30  class ScheduleInfo;
31 }
32 
34  friend class FWPathsPopup;
35 
36 public:
38  struct PSetData {
40  : level(-1),
41  tracked(false),
42 
43  type(-1),
44 
45  parent(-1),
46 
47  module(-1),
48  path(-1),
49 
52 
53  visible(false),
54 
55  matches(false),
57 
58  editable(false),
59  pset(nullptr) {}
60 
63 
64  int level;
65  bool tracked;
66  char type;
67  size_t parent;
68 
69  size_t module;
70  size_t path;
71 
74 
75  bool visible;
76  bool matches;
78  bool editable;
79 
81  };
82 
84  ~FWPSetTableManager() override;
85 
86  int unsortedRowNumber(int unsorted) const override;
87  int numberOfRows() const override;
88  int numberOfColumns() const override;
89  std::vector<std::string> getTitles() const override;
90  virtual const std::string title() const;
91  FWTableCellRendererBase *cellRenderer(int iSortedRowNumber, int iCol) const override;
92 
93  int selectedRow() const;
94  int selectedColumn() const;
95  virtual bool rowIsSelected(int row) const;
96 
97  void implSort(int, bool) override;
98  bool cellDataIsSortable() const override { return false; }
99 
100  virtual void updateFilter(const char *filter);
101 
102  std::vector<unsigned int> maxWidthForColumns() const override;
103 
104  std::vector<PSetData> &data() { return m_entries; }
105  std::vector<int> &rowToIndex() { return m_row_to_index; }
106 
107  //______________________________________________________________________________
108 
109 protected:
110  struct ModuleInfo {
114  size_t pathIndex;
115  size_t path;
116  size_t entry;
117  bool passed;
121  bool dirty;
122 
125  };
126 
128  struct PathUpdate {
130  bool passed;
131  size_t choiceMaker;
132  };
133 
134  void setExpanded(int row);
136  void update(std::vector<PathUpdate> &pathUpdates);
137 
138  bool applyEditor();
139  void cancelEditor();
140 
141  std::vector<ModuleInfo> &modules() { return m_modules; }
142  std::vector<PSetData> &entries() { return m_entries; }
143 
144  void setSelection(int row, int column, int mask);
145  //______________________________________________________________________________
146 
147 private:
149  struct PathInfo {
151  size_t entryId;
153  size_t moduleStart;
154  size_t moduleEnd;
155  bool passed;
156  };
157 
158  FWPSetTableManager(const FWPSetTableManager &) = delete; // stop default
159  const FWPSetTableManager &operator=(const FWPSetTableManager &) = delete; // stop default
160 
161  void recalculateVisibility();
162 
163  template <class T>
165  template <typename T>
166  void createVectorString(FWPSetTableManager::PSetData &data, const T &v, bool quotes);
167 
168  void setCellValueEditor(FWPSetCellEditor *editor);
169 
170  void handleEntry(const edm::Entry &entry, const std::string &key);
173  void handlePSet(edm::ParameterSet *psp);
174 
175  std::vector<PSetData> m_entries;
177  std::vector<PathInfo> m_paths;
178  std::vector<ModuleInfo> m_modules;
179  std::map<std::string, size_t> m_pathIndex;
180  std::vector<size_t> m_parentStack;
181  std::vector<int> m_row_to_index;
186  std::vector<std::string> m_availablePaths;
187 
189 };
190 
191 #endif
FWPSetTableManager::cellDataIsSortable
bool cellDataIsSortable() const override
Definition: FWPSetTableManager.h:98
FWPSetTableManager::operator=
const FWPSetTableManager & operator=(const FWPSetTableManager &)=delete
FWPSetTableManager::PathInfo::passed
bool passed
Definition: FWPSetTableManager.h:155
FWPSetTableManager::implSort
void implSort(int, bool) override
Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'.
Definition: FWPSetTableManager.cc:617
FWPSetTableManager::ModuleInfo::path
size_t path
Definition: FWPSetTableManager.h:115
FWPSetTableManager::handleVPSetEntry
void handleVPSetEntry(edm::VParameterSetEntry &entry, const std::string &key)
Definition: FWPSetTableManager.cc:122
FWPSetTableManager::title
virtual const std::string title() const
Definition: FWPSetTableManager.cc:555
funct::false
false
Definition: Factorize.h:29
FWPSetTableManager::getTitles
std::vector< std::string > getTitles() const override
returns the title names for each column
Definition: FWPSetTableManager.cc:557
FWPSetTableManager::m_filter
std::string m_filter
Definition: FWPSetTableManager.h:184
FWPSetTableManager::handleEntry
void handleEntry(const edm::Entry &entry, const std::string &key)
Definition: FWPSetTableManager.cc:199
FWPSetTableManager::setCellValueEditor
void setCellValueEditor(FWPSetCellEditor *editor)
Definition: FWPSetTableManager.cc:500
edm
HLT enums.
Definition: AlignableModifier.h:19
mps_splice.entry
entry
Definition: mps_splice.py:68
FWPSetTableManager::handlePSetEntry
void handlePSetEntry(edm::ParameterSetEntry &entry, const std::string &key)
Definition: FWPSetTableManager.cc:104
FWPSetTableManager::ModuleInfo::current_pset
edm::ParameterSet * current_pset
Definition: FWPSetTableManager.h:124
FWPSetTableManager::ModuleInfo::passed
bool passed
Definition: FWPSetTableManager.h:117
FWPSetTableManager::m_modules
std::vector< ModuleInfo > m_modules
Definition: FWPSetTableManager.h:178
FWPSetTableManager::recalculateVisibility
void recalculateVisibility()
Definition: FWPSetTableManager.cc:817
FWTextTreeCellRenderer
Definition: FWTextTreeCellRenderer.h:17
FWPSetTableManager::updateFilter
virtual void updateFilter(const char *filter)
Definition: FWPSetTableManager.cc:742
FWPSetTableManager::selectedColumn
int selectedColumn() const
Definition: FWPSetTableManager.cc:567
FWPSetTableManager::cancelEditor
void cancelEditor()
Definition: FWPSetTableManager.cc:506
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
FWPSetTableManager::PSetData::PSetData
PSetData()
Definition: FWPSetTableManager.h:39
FWPSetTableManager::data
std::vector< PSetData > & data()
Definition: FWPSetTableManager.h:104
FWPSetTableManager::numberOfRows
int numberOfRows() const override
Number of rows in the table.
Definition: FWPSetTableManager.cc:573
findQualityFiles.v
v
Definition: findQualityFiles.py:179
FWPSetTableManager::selectedRow
int selectedRow() const
Definition: FWPSetTableManager.cc:565
FWPSetTableManager::handlePSet
void handlePSet(edm::ParameterSet *psp)
Definition: FWPSetTableManager.cc:157
FWPSetTableManager::FWPSetTableManager
FWPSetTableManager()
Definition: FWPSetTableManager.cc:86
FWPSetTableManager::entries
std::vector< PSetData > & entries()
Definition: FWPSetTableManager.h:142
FWPSetTableManager::update
void update(std::vector< PathUpdate > &pathUpdates)
Definition: FWPSetTableManager.cc:466
FWPSetTableManager::m_editor
FWPSetCellEditor * m_editor
Definition: FWPSetTableManager.h:185
FWPSetTableManager::m_renderer
FWTextTreeCellRenderer m_renderer
Definition: FWPSetTableManager.h:188
ScheduleInfo
FWPSetTableManager::updateSchedule
void updateSchedule(const edm::ScheduleInfo *info)
Definition: FWPSetTableManager.cc:383
FWPSetTableManager::numberOfColumns
int numberOfColumns() const override
Number of columns in the table.
Definition: FWPSetTableManager.cc:575
FWPSetTableManager::PSetData
Definition: FWPSetTableManager.h:38
FWPSetTableManager::m_selectedRow
int m_selectedRow
Definition: FWPSetTableManager.h:182
FWPSetTableManager::PathInfo::modulePassed
int modulePassed
Definition: FWPSetTableManager.h:152
FWPSetTableManager::createVectorString
void createVectorString(FWPSetTableManager::PSetData &data, const T &v, bool quotes)
Definition: FWPSetTableManager.cc:182
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
FWPSetTableManager::PSetData::value
std::string value
Definition: FWPSetTableManager.h:62
FWPSetTableManager::PSetData::expandedUser
bool expandedUser
Definition: FWPSetTableManager.h:72
FWPSetTableManager::PathUpdate::passed
bool passed
Definition: FWPSetTableManager.h:130
FWTableManagerBase
Definition: FWTableManagerBase.h:44
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWPathsPopup
Definition: FWPathsPopup.h:27
FWPSetTableManager::unsortedRowNumber
int unsortedRowNumber(int unsorted) const override
when passed the index to the sorted order of the rows it returns the original row number from the und...
Definition: FWPSetTableManager.cc:571
FWPSetTableManager::PSetData::expandedFilter
bool expandedFilter
Definition: FWPSetTableManager.h:73
FWPSetTableManager::PSetData::editable
bool editable
Definition: FWPSetTableManager.h:78
FWTextTreeCellRenderer.h
edm::ParameterSet
Definition: ParameterSet.h:47
FWPSetTableManager::rowIsSelected
virtual bool rowIsSelected(int row) const
Definition: FWPSetTableManager.cc:569
FWPSetTableManager::PathUpdate::pathName
std::string pathName
Definition: FWPSetTableManager.h:129
FWPSetTableManager::maxWidthForColumns
std::vector< unsigned int > maxWidthForColumns() const override
for each column in the table this returns the present maximum width for that column
Definition: FWPSetTableManager.cc:606
FWPSetTableManager::m_availablePaths
std::vector< std::string > m_availablePaths
Definition: FWPSetTableManager.h:186
FWPSetTableManager::PathInfo
Definition: FWPSetTableManager.h:149
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
FWPSetTableManager::PSetData::matches
bool matches
Definition: FWPSetTableManager.h:76
FWPSetTableManager::PSetData::level
int level
Definition: FWPSetTableManager.h:64
FWPSetTableManager::m_paths
std::vector< PathInfo > m_paths
Definition: FWPSetTableManager.h:177
FWPSetTableManager::PathInfo::pathName
std::string pathName
Definition: FWPSetTableManager.h:150
FWPSetTableManager::cellRenderer
FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const override
Definition: FWPSetTableManager.cc:642
FWPSetTableManager::m_parentStack
std::vector< size_t > m_parentStack
Definition: FWPSetTableManager.h:180
FWTableCellRendererBase
Definition: FWTableCellRendererBase.h:44
FWPSetTableManager::ModuleInfo::entry
size_t entry
Definition: FWPSetTableManager.h:116
FWPSetTableManager::m_pathIndex
std::map< std::string, size_t > m_pathIndex
Definition: FWPSetTableManager.h:179
FWPSetTableManager::PSetData::pset
edm::ParameterSet * pset
Definition: FWPSetTableManager.h:80
FWPSetTableManager::setSelection
void setSelection(int row, int column, int mask)
Definition: FWPSetTableManager.cc:577
edm::ScheduleInfo
Definition: ScheduleInfo.h:32
FWPSetTableManager::PathInfo::moduleStart
size_t moduleStart
Definition: FWPSetTableManager.h:153
FWPSetTableManager::rowToIndex
std::vector< int > & rowToIndex()
Definition: FWPSetTableManager.h:105
FWPSetTableManager
Definition: FWPSetTableManager.h:33
FWPSetTableManager::PSetData::visible
bool visible
Definition: FWPSetTableManager.h:75
FWPSetTableManager::m_selectedColumn
int m_selectedColumn
Definition: FWPSetTableManager.h:183
FWPSetTableManager::PathInfo::moduleEnd
size_t moduleEnd
Definition: FWPSetTableManager.h:154
T
long double T
Definition: Basic3DVectorLD.h:48
FWPSetCellEditor
Definition: FWPSetCellEditor.h:24
FWPSetTableManager::PathUpdate::choiceMaker
size_t choiceMaker
Definition: FWPSetTableManager.h:131
FWPSetTableManager::PSetData::childMatches
bool childMatches
Definition: FWPSetTableManager.h:77
edm::VParameterSetEntry
Definition: VParameterSetEntry.h:24
FWPSetTableManager::PSetData::module
size_t module
Definition: FWPSetTableManager.h:69
edm::ParameterSetEntry
Definition: ParameterSetEntry.h:23
FWPSetTableManager::ModuleInfo::orig_pset
edm::ParameterSet * orig_pset
Definition: FWPSetTableManager.h:123
FWPSetTableManager::ModuleInfo::pathIndex
size_t pathIndex
Definition: FWPSetTableManager.h:114
FWPSetTableManager::modules
std::vector< ModuleInfo > & modules()
Definition: FWPSetTableManager.h:141
FWPSetTableManager::applyEditor
bool applyEditor()
Definition: FWPSetTableManager.cc:519
ParameterSet.h
FWPSetTableManager::PSetData::type
char type
Definition: FWPSetTableManager.h:66
FWPSetTableManager::createScalarString
void createScalarString(PSetData &data, T v)
Definition: FWPSetTableManager.cc:174
FWPSetTableManager::PSetData::tracked
bool tracked
Definition: FWPSetTableManager.h:65
crabWrapper.key
key
Definition: crabWrapper.py:19
FWPSetTableManager::~FWPSetTableManager
~FWPSetTableManager() override
Definition: FWPSetTableManager.cc:96
FWPSetTableManager::ModuleInfo
Definition: FWPSetTableManager.h:110
FWPSetTableManager::m_row_to_index
std::vector< int > m_row_to_index
Definition: FWPSetTableManager.h:181
FWPSetTableManager::m_entries
std::vector< PSetData > m_entries
Definition: FWPSetTableManager.h:175
FWPSetTableManager::ModuleInfo::dirty
bool dirty
Definition: FWPSetTableManager.h:121
edm::Entry
Definition: Entry.h:40
FWPSetTableManager::PathUpdate
Definition: FWPSetTableManager.h:128
FWPSetTableManager::PSetData::path
size_t path
Definition: FWPSetTableManager.h:70
FWPSetTableManager::PSetData::parent
size_t parent
Definition: FWPSetTableManager.h:67
FWPSetTableManager::PathInfo::entryId
size_t entryId
Definition: FWPSetTableManager.h:151
FWTableManagerBase.h
FWPSetTableManager::setExpanded
void setExpanded(int row)
Definition: FWPSetTableManager.cc:620
FWPSetTableManager::PSetData::label
std::string label
Definition: FWPSetTableManager.h:61