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 
24 #include <sigc++/sigc++.h>
28 
29 class FWPSetCellEditor;
30 namespace edm
31 {
32  class ScheduleInfo;
33 }
34 
35 
36 
38 {
39  friend class FWPathsPopup;
40 
41 public:
43  struct PSetData
44  {
45  PSetData() :level(-1),
46  tracked(false),
47 
48  type(-1),
49 
50  parent(-1),
51 
52  module(-1),
53  path(-1),
54 
55  expandedUser(false),
56  expandedFilter(false),
57 
58  visible(false),
59 
60  matches(false),
61  childMatches(false),
62 
63  editable(false) , pset(nullptr){}
64 
67 
68  int level;
69  bool tracked;
70  char type;
71  size_t parent;
72 
73  size_t module;
74  size_t path;
75 
78 
79  bool visible;
80  bool matches;
82  bool editable;
83 
85  };
86 
88  ~FWPSetTableManager() override;
89 
90 
91  int unsortedRowNumber(int unsorted) const override ;
92  int numberOfRows() const override;
93  int numberOfColumns() const override;
94  std::vector<std::string> getTitles() const override;
95  virtual const std::string title() const;
96  FWTableCellRendererBase* cellRenderer(int iSortedRowNumber, int iCol) const override;
97 
98  int selectedRow() const;
99  int selectedColumn() const;
100  virtual bool rowIsSelected(int row) const;
101 
102  void implSort(int, bool) override;
103  bool cellDataIsSortable() const override { return false ; }
104 
105  virtual void updateFilter(const char *filter);
106 
107  std::vector<unsigned int> maxWidthForColumns() const override;
108 
109  std::vector<PSetData> &data() { return m_entries; }
110  std::vector<int> &rowToIndex() { return m_row_to_index; }
111 
112  //______________________________________________________________________________
113 
114 protected:
115  struct ModuleInfo
116  {
120  size_t pathIndex;
121  size_t path;
122  size_t entry;
123  bool passed;
127  bool dirty;
128 
131  };
132 
134  struct PathUpdate
135  {
137  bool passed;
138  size_t choiceMaker;
139  };
140 
141 
142  void setExpanded(int row);
143  void updateSchedule(const edm::ScheduleInfo *info);
144  void update(std::vector<PathUpdate> &pathUpdates);
145 
146  bool applyEditor();
147  void cancelEditor();
148 
149  std::vector<ModuleInfo> &modules() { return m_modules; }
150  std::vector<PSetData> &entries() { return m_entries; }
151 
152  void setSelection (int row, int column, int mask);
153  //______________________________________________________________________________
154 
155 private:
156 
158  struct PathInfo
159  {
161  size_t entryId;
163  size_t moduleStart;
164  size_t moduleEnd;
165  bool passed;
166  };
167 
168  FWPSetTableManager(const FWPSetTableManager&) = delete; // stop default
169  const FWPSetTableManager& operator=(const FWPSetTableManager&) = delete; // stop default
170 
171  void recalculateVisibility();
172 
173  template <class T> void createScalarString(PSetData &data, T v);
174  template <typename T> void createVectorString(FWPSetTableManager::PSetData &data, const T &v, bool quotes);
175 
176  void setCellValueEditor(FWPSetCellEditor *editor);
177 
178  void handleEntry(const edm::Entry &entry,const std::string &key);
179  void handlePSetEntry(edm::ParameterSetEntry& entry, const std::string& key);
180  void handleVPSetEntry(edm::VParameterSetEntry& entry, const std::string& key);
181  void handlePSet(edm::ParameterSet *psp);
182 
183  std::vector<PSetData> m_entries;
185  std::vector<PathInfo> m_paths;
186  std::vector<ModuleInfo> m_modules;
187  std::map<std::string, size_t> m_pathIndex;
188  std::vector<size_t> m_parentStack;
189  std::vector<int> m_row_to_index;
194  std::vector<std::string> m_availablePaths;
195 
197 };
198 
199 
200 #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:82
#define update(a, b)
long double T
Definition: vlib.h:208
std::vector< PSetData > & entries()