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 
50  expandedUser(false),
51  expandedFilter(false),
52 
53  visible(false),
54 
55  matches(false),
56  childMatches(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);
135  void updateSchedule(const edm::ScheduleInfo *info);
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>
164  void createScalarString(PSetData &data, T v);
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);
171  void handlePSetEntry(edm::ParameterSetEntry &entry, const std::string &key);
172  void handleVPSetEntry(edm::VParameterSetEntry &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
std::vector< ModuleInfo > & modules()
type
Definition: HCALResponse.h:21
std::vector< std::string > m_availablePaths
static const TGPicture * info(bool iBackgroundIsBlack)
std::vector< PathInfo > m_paths
FWTextTreeCellRenderer m_renderer
std::vector< size_t > m_parentStack
bool cellDataIsSortable() const override
#define nullptr
std::vector< int > & rowToIndex()
std::vector< ModuleInfo > m_modules
std::map< std::string, size_t > m_pathIndex
std::vector< PSetData > & data()
std::vector< int > m_row_to_index
std::vector< PSetData > m_entries
FWPSetCellEditor * m_editor
HLT enums.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
#define update(a, b)
long double T
Definition: vlib.h:198
std::vector< PSetData > & entries()