|
|
Go to the documentation of this file.
61 table_[
'F'] =
"FileInPath";
64 table_[
'g'] =
"ESInputTag";
65 table_[
'G'] =
"VESInputTag";
68 table_[
'm'] =
"VLuminosityBlockID";
69 table_[
'M'] =
"LuminosityBlockID";
70 table_[
'a'] =
"VLuminosityBlockRange";
71 table_[
'A'] =
"LuminosityBlockRange";
72 table_[
'r'] =
"VEventRange";
73 table_[
'R'] =
"EventRange";
75 for (CodeMap::const_iterator itCode =
table_.begin(), itCodeEnd =
table_.end(); itCode != itCodeEnd; ++itCode) {
88 hc->SetForeground(0xdddddd);
114 data.editable =
false;
131 data.editable =
false;
135 std::stringstream
ss;
137 for (
size_t i = 0,
e =
entry.vpset().size();
i !=
e; ++
i) {
139 ss <<
key <<
"[" <<
i <<
"]";
160 typedef edm::ParameterSet::table::const_iterator TIterator;
161 for (TIterator
i = ps.
tbl().begin(),
e = ps.
tbl().end();
i !=
e; ++
i)
164 typedef edm::ParameterSet::psettable::const_iterator PSIterator;
168 typedef edm::ParameterSet::vpsettable::const_iterator VPSIterator;
175 std::stringstream
ss;
181 template <
typename T>
183 std::stringstream
ss;
185 for (
size_t ii = 0, ie =
v.size();
ii != ie; ++
ii) {
200 std::stringstream
ss;
209 if (
data.label[0] ==
'@')
210 data.editable =
false;
212 data.editable =
true;
214 switch (
entry.typeCode()) {
216 data.value =
entry.getBool() ?
"True" :
"False";
221 data.value =
entry.getBool() ?
"True" :
"False";
275 throw std::runtime_error(
"FWPSetTableManager::handleEntryGet, entry type 'p' not expected.");
283 throw std::runtime_error(
"FWPSetTableManager::handleEntry, entry type 'P not expected.");
288 data.value =
entry.getInputTag().encode();
293 std::vector<std::string>
tags;
294 tags.resize(
entry.getVInputTag().size());
295 for (
size_t iti = 0, ite =
tags.size(); iti != ite; ++iti)
296 tags[iti] =
entry.getVInputTag()[iti].encode();
301 data.value =
entry.getESInputTag().encode();
306 std::vector<std::string>
tags;
307 tags.resize(
entry.getVESInputTag().size());
308 for (
size_t iti = 0, ite =
tags.size(); iti != ite; ++iti)
309 tags[iti] =
entry.getVESInputTag()[iti].encode();
318 data.editable =
false;
319 std::vector<edm::EventID> ids;
320 ids.resize(
entry.getVEventID().size());
321 for (
size_t iri = 0, ire = ids.size(); iri != ire; ++iri)
322 ids[iri] =
entry.getVEventID()[iri];
327 data.editable =
false;
332 data.editable =
false;
333 std::vector<edm::LuminosityBlockID> ids;
334 ids.resize(
entry.getVLuminosityBlockID().size());
335 for (
size_t iri = 0, ire = ids.size(); iri != ire; ++iri)
336 ids[iri] =
entry.getVLuminosityBlockID()[iri];
341 data.editable =
false;
346 data.editable =
false;
347 std::vector<edm::LuminosityBlockRange>
ranges;
348 ranges.resize(
entry.getVLuminosityBlockRange().size());
349 for (
size_t iri = 0, ire =
ranges.size(); iri != ire; ++iri)
350 ranges[iri] =
entry.getVLuminosityBlockRange()[iri];
355 data.editable =
false;
360 data.editable =
false;
361 std::vector<edm::EventRange>
ranges;
363 for (
size_t iri = 0, ire =
ranges.size(); iri != ire; ++iri)
369 data.editable =
false;
397 pathEntry.
value =
"Path";
412 std::vector<std::string> pathModules;
415 for (
size_t mi = 0,
me = pathModules.size(); mi !=
me; ++mi) {
421 const edm::ParameterSet::table::const_iterator ti = pst.find(
"@module_edm_type");
423 moduleEntry.
value =
"Unknown module name";
425 moduleEntry.
value = ti->second.getString();
427 moduleEntry.
label = pathModules[mi];
431 moduleEntry.
path =
i;
437 moduleInfo.
passed =
false;
438 moduleInfo.
dirty =
false;
475 for (
size_t pui = 0, pue = pathUpdates.size(); pui != pue; ++pui) {
545 m_editor->SetForegroundColor(gVirtualX->GetPixel(kRed));
558 std::vector<std::string> returnValue;
560 returnValue.push_back(
"Label");
561 returnValue.push_back(
"Value");
589 if (iColumn == 1 && iRow > 0) {
608 if (ww.size() > 1 && ww[1] > 0) {
627 if (
m_filter.empty() ==
false &&
data.childMatches ==
false)
631 data.expandedUser = !
data.expandedUser;
633 data.expandedFilter = !
data.expandedFilter;
643 const static size_t maxSize = 512;
649 const static Pixel_t gray = 0x777777;
650 const static Pixel_t
red = gVirtualX->GetPixel(kRed - 5);
651 const static Pixel_t green = gVirtualX->GetPixel(kGreen - 5);
654 if (static_cast<int>(
m_row_to_index.size()) <= iSortedRowNumber) {
665 if (
data.level == 0) {
669 gc->SetForeground(
path.passed ? green :
red);
670 }
else if (
data.level == 1) {
675 gc->SetForeground(module.
passed ? green :
red);
687 gc->SetForeground(gray);
697 value +=
"[truncated]";
698 gc->SetForeground(gVirtualX->GetPixel(kMagenta));
706 bool selected =
data.matches && (
m_filter.empty() ==
false);
710 bool isParent =
false;
715 size_t nextIdx = unsortedRow + 1;
716 isParent = (nextIdx <
m_entries.size() &&
m_entries[nextIdx].parent == (size_t)unsortedRow);
717 isOpen =
data.expandedUser;
719 isParent =
data.childMatches;
720 isOpen =
data.expandedFilter &&
data.childMatches;
759 data.matches =
false;
768 std::vector<int>
stack;
769 int previousLevel = 0;
773 if (
data.parent == (
size_t)-1) {
788 if (
data.level > previousLevel)
791 for (
size_t pi = 0, pe = previousLevel -
data.level;
pi != pe; ++
pi)
796 for (
size_t pi = 0, pe =
stack.size();
pi != pe; ++
pi) {
802 previousLevel =
data.level;
828 if (
data.parent == ((
size_t)-1)) {
836 (
data.matches ||
data.childMatches);
void implSort(int, bool) override
Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'.
void handleVPSetEntry(edm::VParameterSetEntry &entry, const std::string &key)
virtual const std::string title() const
std::vector< std::string > getTitles() const override
returns the title names for each column
void handleEntry(const edm::Entry &entry, const std::string &key)
void setCellValueEditor(FWPSetCellEditor *editor)
std::vector< std::string > CodeMap
void handlePSetEntry(edm::ParameterSetEntry &entry, const std::string &key)
edm::ParameterSet * current_pset
bool apply(FWPSetTableManager::PSetData &data, FWPSetTableManager::PSetData &parent)
std::vector< ModuleInfo > m_modules
void recalculateVisibility()
virtual void updateFilter(const char *filter)
int selectedColumn() const
std::vector< PSetData > & data()
std::map< std::string, Entry > table
int numberOfRows() const override
Number of rows in the table.
table const & tbl() const
virtual void showEditor(bool value)
void handlePSet(edm::ParameterSet *psp)
void visualPropertiesChanged()
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e....
void setHighlightContext(const TGGC *context)
psettable const & psetTable() const
void update(std::vector< PathUpdate > &pathUpdates)
FWPSetCellEditor * m_editor
static const TGGC & getDefaultHighlightGC()
FWTextTreeCellRenderer m_renderer
void updateSchedule(const edm::ScheduleInfo *info)
int numberOfColumns() const override
Number of columns in the table.
void createVectorString(FWPSetTableManager::PSetData &data, const T &v, bool quotes)
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...
void setGraphicsContext(const TGGC *iContext)
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes.
virtual bool rowIsSelected(int row) const
std::vector< unsigned int > maxWidthForColumns() const override
for each column in the table this returns the present maximum width for that column
std::vector< std::string > m_availablePaths
std::map< std::string, char > type2Code_
static const TGGC & getDefaultGC()
std::vector< PathInfo > m_paths
FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const override
std::vector< size_t > m_parentStack
std::map< std::string, size_t > m_pathIndex
void setSelection(int row, int column, int mask)
std::vector< int > & rowToIndex()
void setData(const std::string &, bool isSelected)
vpsettable const & vpsetTable() const
static const TypeTrans sTypeTranslations
edm::ParameterSet * orig_pset
char data[epos_bytes_allocation]
virtual void setCellEditor(TGTextEntry *editor)
void setIsOpen(bool value)
void createScalarString(PSetData &data, T v)
void setIsParent(bool value)
~FWPSetTableManager() override
std::vector< int > m_row_to_index
std::vector< PSetData > m_entries
virtual unsigned int cellHeight() const
require all cells to be the same height
virtual void setIndentation(int indentation=0)
virtual std::vector< unsigned int > maxWidthForColumns() const
for each column in the table this returns the present maximum width for that column
void setExpanded(int row)