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);
135 std::stringstream
ss;
137 for (
size_t i = 0,
e = entry.
vpset().size();
i !=
e; ++
i) {
139 ss << key <<
"[" <<
i <<
"]";
141 vdata.
label = ss.str();
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;
177 data.
value = ss.str();
181 template <
typename T>
183 std::stringstream
ss;
185 for (
size_t ii = 0, ie = v.size();
ii != ie; ++
ii) {
195 data.
value = ss.str();
200 std::stringstream
ss;
209 if (data.
label[0] ==
'@')
275 throw std::runtime_error(
"FWPSetTableManager::handleEntryGet, entry type 'p' not expected.");
283 throw std::runtime_error(
"FWPSetTableManager::handleEntry, entry type 'P not expected.");
293 std::vector<std::string>
tags;
295 for (
size_t iti = 0, ite = tags.size(); iti != ite; ++iti)
306 std::vector<std::string>
tags;
308 for (
size_t iti = 0, ite = tags.size(); iti != ite; ++iti)
319 std::vector<edm::EventID> ids;
321 for (
size_t iri = 0, ire = ids.size(); iri != ire; ++iri)
333 std::vector<edm::LuminosityBlockID> ids;
335 for (
size_t iri = 0, ire = ids.size(); iri != ire; ++iri)
347 std::vector<edm::LuminosityBlockRange>
ranges;
349 for (
size_t iri = 0, ire = ranges.size(); iri != ire; ++iri)
361 std::vector<edm::EventRange>
ranges;
363 for (
size_t iri = 0, ire = ranges.size(); iri != ire; ++iri)
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) {
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) {
674 gc = (TGGC *)&boldGC;
675 gc->SetForeground(module.
passed ? green : red);
687 gc->SetForeground(gray);
692 if (iCol == 1 && value.size() >=
maxSize) {
694 fwLog(
fwlog::kWarning) <<
"label: " << label <<
" has too long value " << value << std::endl << std::endl;
696 value = value.substr(0, maxSize);
697 value +=
"[truncated]";
698 gc->SetForeground(gVirtualX->GetPixel(kMagenta));
710 bool isParent =
false;
715 size_t nextIdx = unsortedRow + 1;
716 isParent = (nextIdx <
m_entries.size() &&
m_entries[nextIdx].parent == (size_t)unsortedRow);
723 indent = data.
level * 10;
768 std::vector<int>
stack;
769 int previousLevel = 0;
773 if (data.
parent == (
size_t)-1) {
788 if (data.
level > previousLevel)
789 stack.push_back(data.
parent);
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)) {
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
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...
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< unsigned int > maxWidthForColumns() const override
for each column in the table this returns the present maximum width for that column ...
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'...
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()
int numberOfColumns() const override
Number of columns in the table.
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()
tuple maxSize
'/store/data/Commissioning08/BeamHalo/RECO/StuffAlmostToP5_v1/000/061/642/10A0FE34-A67D-DD11-AD05-000...
std::vector< int > m_row_to_index
std::vector< PSetData > m_entries
void setHighlightContext(const TGGC *context)
virtual void setCellEditor(TGTextEntry *editor)
tuple key
prepare the HTCondor submission files and eventually submit them
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< ESInputTag > getVESInputTag() const
void setGraphicsContext(const TGGC *iContext)
FWPSetCellEditor * m_editor
void setIsParent(bool value)
std::vector< EventRange > getVEventRange() const
std::vector< std::string > getTitles() const override
returns the title names for each column
virtual void setIndentation(int indentation=0)
void updateSchedule(const edm::ScheduleInfo *info)
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
FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const override
char data[epos_bytes_allocation]
ParameterSet & psetForUpdate()
vpsettable const & vpsetTable() const
EventRange getEventRange() const
int numberOfRows() const override
Number of rows in the table.
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