62 table_[
'F'] =
"FileInPath";
65 table_[
'g'] =
"ESInputTag";
66 table_[
'G'] =
"VESInputTag";
69 table_[
'm'] =
"VLuminosityBlockID";
70 table_[
'M'] =
"LuminosityBlockID";
71 table_[
'a'] =
"VLuminosityBlockRange";
72 table_[
'A'] =
"LuminosityBlockRange";
73 table_[
'r'] =
"VEventRange";
74 table_[
'R'] =
"EventRange";
76 for(CodeMap::const_iterator itCode =
table_.begin(), itCodeEnd =
table_.end();
95 hc->SetForeground(0xdddddd);
146 std::stringstream ss;
148 for (
size_t i = 0,
e = entry.
vpset().size();
i !=
e; ++
i)
151 ss << key <<
"[" <<
i <<
"]";
153 vdata.
label = ss.str();
173 typedef edm::ParameterSet::table::const_iterator TIterator;
174 for (TIterator
i = ps.
tbl().begin(),
e = ps.
tbl().end();
i !=
e; ++
i)
177 typedef edm::ParameterSet::psettable::const_iterator PSIterator;
181 typedef edm::ParameterSet::vpsettable::const_iterator VPSIterator;
189 std::stringstream ss;
191 data.
value = ss.str();
195 template <
typename T>
198 std::stringstream ss;
200 for (
size_t ii = 0, ie = v.size();
ii != ie; ++
ii)
211 data.
value = ss.str();
217 std::stringstream ss;
226 if (data.
label[0] ==
'@')
308 throw std::runtime_error(
"FWPSetTableManager::handleEntryGet, entry type 'p' not expected.");
317 throw std::runtime_error(
"FWPSetTableManager::handleEntry, entry type 'P not expected.");
329 std::vector<std::string> tags;
331 for (
size_t iti = 0, ite = tags.size(); iti != ite; ++iti)
344 std::vector<std::string> tags;
346 for (
size_t iti = 0, ite = tags.size(); iti != ite; ++iti)
359 std::vector<edm::EventID>
ids;
361 for (
size_t iri = 0, ire = ids.size(); iri != ire; ++iri )
375 std::vector<edm::LuminosityBlockID>
ids;
377 for (
size_t iri = 0, ire = ids.size(); iri != ire; ++iri )
391 std::vector<edm::LuminosityBlockRange>
ranges;
393 for (
size_t iri = 0, ire = ranges.size(); iri != ire; ++iri )
407 std::vector<edm::EventRange>
ranges;
409 for (
size_t iri = 0, ire = ranges.size(); iri != ire; ++iri )
444 pathEntry.
label = pathName;
447 pathEntry.
value =
"Path";
462 std::vector<std::string> pathModules;
465 for (
size_t mi = 0, me = pathModules.size(); mi != me; ++mi)
472 const edm::ParameterSet::table::const_iterator ti = pst.find(
"@module_edm_type");
474 moduleEntry.
value =
"Unknown module name";
476 moduleEntry.
value = ti->second.getString();
478 moduleEntry.
label = pathModules[mi];
482 moduleEntry.
path =
i;
488 moduleInfo.
passed =
false;
489 moduleInfo.
dirty =
false;
524 for (
size_t mi = 0, me =
m_modules.size(); mi != me; ++mi)
528 for (
size_t pui = 0, pue = pathUpdates.size(); pui != pue; ++pui)
612 m_editor->SetForegroundColor(gVirtualX->GetPixel(kRed));
624 return "Modules & their parameters";
629 std::vector<std::string> returnValue;
631 returnValue.push_back(
"Label");
632 returnValue.push_back(
"Value");
675 if (iColumn == 1 && iRow > 0 )
697 if (ww.size() > 1 && ww[1] > 0)
738 const static size_t maxSize = 512;
744 const static Pixel_t gray = 0x777777;
745 const static Pixel_t
red = gVirtualX->GetPixel(kRed-5);
746 const static Pixel_t
green = gVirtualX->GetPixel(kGreen-5);
767 gc->SetForeground(path.
passed ? green: red);
769 else if (data.
level == 1)
775 gc->SetForeground(module.
passed ? green : red);
792 gc->SetForeground(gray);
797 if (iCol == 1 && value.size() >=
maxSize)
800 fwLog(
fwlog::kWarning) <<
"label: " << label <<
" has too long value " << value << std::endl << std::endl;
802 value = value.substr(0, maxSize);
803 value +=
"[truncated]";
804 gc->SetForeground(gVirtualX->GetPixel(kMagenta));
816 bool isParent =
false;
823 size_t nextIdx = unsortedRow + 1;
824 isParent = (nextIdx <
m_entries.size() &&
m_entries[nextIdx].parent == (size_t)unsortedRow);
833 indent = data.
level * 10 ;
882 std::vector<int>
stack;
883 int previousLevel = 0;
888 if (data.
parent == (
size_t)-1)
904 if (data.
level > previousLevel)
905 stack.push_back(data.
parent);
907 for (
size_t pi = 0, pe = previousLevel - data.
level;
pi != pe; ++
pi)
913 for (
size_t pi = 0, pe = stack.size();
pi != pe; ++
pi)
921 previousLevel = data.
level;
950 if (data.
parent == ((
size_t) -1))
int selectedColumn() const
void modulesInPath(const std::string &iPathLabel, std::vector< std::string > &oLabelsToFill) const
add to oLabelsToFill in execution order the labels of all modules in path iPathLabel ...
std::vector< unsigned > getVUInt32() const
std::vector< double > getVDouble() const
void recalculateVisibility()
std::vector< std::string > m_availablePaths
std::vector< unsigned long long > getVUInt64() const
std::vector< LuminosityBlockID > getVLuminosityBlockID() const
static TypeTrans const sTypeTranslations
std::vector< PathInfo > m_paths
std::vector< std::string > CodeMap
virtual bool rowIsSelected(int row) const
~FWPSetTableManager() override
FWTextTreeCellRenderer m_renderer
unsigned getUInt32() const
std::vector< size_t > m_parentStack
std::vector< InputTag > getVInputTag() const
edm::ParameterSet * orig_pset
std::vector< int > & rowToIndex()
void setIsOpen(bool value)
void implSort(int, bool) override
Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'...
std::vector< std::string > getTitles() const override
returns the title names for each column
void handlePSetEntry(edm::ParameterSetEntry &entry, const std::string &key)
void setExpanded(int row)
void createVectorString(FWPSetTableManager::PSetData &data, const T &v, bool quotes)
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
std::vector< ParameterSet > & vpsetForUpdate()
std::vector< ModuleInfo > m_modules
LuminosityBlockRange getLuminosityBlockRange() const
virtual std::vector< unsigned int > maxWidthForColumns() const
for each column in the table this returns the present maximum width for that column ...
std::vector< EventID > getVEventID() const
virtual const std::string title() const
unsigned long long getUInt64() const
std::map< std::string, size_t > m_pathIndex
std::vector< PSetData > & data()
void handleVPSetEntry(edm::VParameterSetEntry &entry, const std::string &key)
static const TGGC & getDefaultGC()
std::vector< int > m_row_to_index
std::vector< PSetData > m_entries
void setHighlightContext(const TGGC *context)
virtual void setCellEditor(TGTextEntry *editor)
int numberOfRows() const override
Number of rows in the table.
InputTag getInputTag() const
std::map< std::string, char > type2Code_
bool apply(FWPSetTableManager::PSetData &data, FWPSetTableManager::PSetData &parent)
void handleEntry(const edm::Entry &entry, const std::string &key)
static const TGGC & getDefaultHighlightGC()
std::vector< ParameterSet > const & vpset() const
returns the VPSet
std::vector< long long > getVInt64() const
void handlePSet(edm::ParameterSet *psp)
std::vector< unsigned int > maxWidthForColumns() const override
for each column in the table this returns the present maximum width for that column ...
std::vector< ESInputTag > getVESInputTag() const
void setGraphicsContext(const TGGC *iContext)
FWPSetCellEditor * m_editor
void setIsParent(bool value)
std::vector< EventRange > getVEventRange() const
FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const override
int numberOfColumns() const override
Number of columns in the table.
virtual void setIndentation(int indentation=0)
void updateSchedule(const edm::ScheduleInfo *info)
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 createScalarString(PSetData &data, T v)
void setData(const std::string &, bool isSelected)
FileInPath getFileInPath() const
psettable const & psetTable() const
virtual void updateFilter(const char *filter)
const edm::ParameterSet * parametersForModule(const std::string &iLabel) const
std::vector< int > getVInt32() const
void setCellValueEditor(FWPSetCellEditor *editor)
std::map< std::string, Entry > table
LuminosityBlockID getLuminosityBlockID() const
ParameterSet & psetForUpdate()
vpsettable const & vpsetTable() const
EventRange getEventRange() const
void update(std::vector< PathUpdate > &pathUpdates)
void visualPropertiesChanged()
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e...
std::vector< LuminosityBlockRange > getVLuminosityBlockRange() const
void setSelection(int row, int column, int mask)
ESInputTag getESInputTag() const
virtual unsigned int cellHeight() const
require all cells to be the same height
std::string relativePath() const
table const & tbl() const
std::vector< std::string > getVString() const
void availablePaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all paths in the process
std::string getString() const
edm::ParameterSet * current_pset
virtual void showEditor(bool value)
EventID getEventID() const