CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
FWPSetTableManager Class Reference

#include <Fireworks/FWInterface/interface/FWPSetTableManager.h>

Inheritance diagram for FWPSetTableManager:
FWTableManagerBase

Classes

struct  ModuleInfo
 
struct  PathInfo
 
struct  PathUpdate
 
struct  PSetData
 

Public Member Functions

virtual FWTableCellRendererBasecellRenderer (int iSortedRowNumber, int iCol) const
 
std::vector< PSetData > & data ()
 
 FWPSetTableManager ()
 
virtual std::vector< std::string > getTitles () const
 returns the title names for each column More...
 
virtual void implSort (int, bool)
 Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'. More...
 
virtual std::vector< unsigned int > maxWidthForColumns () const
 for each column in the table this returns the present maximum width for that column More...
 
virtual int numberOfColumns () const
 Number of columns in the table. More...
 
virtual int numberOfRows () const
 Number of rows in the table. More...
 
virtual bool rowIsSelected (int row) const
 
std::vector< int > & rowToIndex ()
 
int selectedColumn () const
 
int selectedRow () const
 
virtual const std::string title () const
 
virtual int unsortedRowNumber (int unsorted) const
 when passed the index to the sorted order of the rows it returns the original row number from the underlying data More...
 
virtual void updateFilter (const char *filter)
 
virtual ~FWPSetTableManager ()
 
- Public Member Functions inherited from FWTableManagerBase
virtual void buttonPressedInRowHeader (Int_t row, Event_t *event, Int_t relX, Int_t relY)
 Called if mouse button pressed in Row Header, defaults is to do nothing. More...
 
virtual void buttonReleasedInRowHeader (Int_t row, Event_t *event, Int_t relX, Int_t relY)
 
virtual unsigned int cellHeight () const
 require all cells to be the same height More...
 
 ClassDef (FWTableManagerBase, 0)
 
void dataChanged ()
 Classes which inherit from FWTableManagerBase must call this when their underlying data changes. More...
 
 FWTableManagerBase ()
 
virtual bool hasLabelHeaders () const
 
virtual bool hasRowHeaders () const
 Returns 'true' if this table has row headers. Defaults return value is false. More...
 
virtual FWTableCellRendererBaserowHeader (int iSortedRowNumber) const
 Returns the renderer for the row header for the sorted row number iSortedRowNumber. More...
 
void sort (int iCol, bool iSortOrder)
 Call to have table sorted on values in column iCol with the sort order being descending if iSortOrder is 'true'. More...
 
int sortColumn (void)
 The current sort column. More...
 
bool sortOrder (void)
 The current sort order for the table. More...
 
void visualPropertiesChanged ()
 Classes which inherit from FWTableManagerBase must call this when how the data is shown (e.g. color) changes. More...
 
virtual ~FWTableManagerBase ()
 

Protected Member Functions

bool applyEditor ()
 
void cancelEditor ()
 
std::vector< PSetData > & entries ()
 
std::vector< ModuleInfo > & modules ()
 
void setExpanded (int row)
 
void setSelection (int row, int column, int mask)
 
void update (std::vector< PathUpdate > &pathUpdates)
 
void updateSchedule (const edm::ScheduleInfo *info)
 

Private Member Functions

template<class T >
void createScalarString (PSetData &data, T v)
 
template<typename T >
void createVectorString (FWPSetTableManager::PSetData &data, const T &v, bool quotes)
 
 FWPSetTableManager (const FWPSetTableManager &)
 
void handleEntry (const edm::Entry &entry, const std::string &key)
 
void handlePSet (const edm::ParameterSet &ps)
 
void handlePSetEntry (const edm::ParameterSetEntry &entry, const std::string &key)
 
void handleVPSetEntry (const edm::VParameterSetEntry &entry, const std::string &key)
 
const FWPSetTableManageroperator= (const FWPSetTableManager &)
 
void recalculateVisibility ()
 
void setCellValueEditor (FWPSetCellEditor *editor)
 

Private Attributes

std::vector< std::string > m_availablePaths
 
FWPSetCellEditorm_editor
 
std::vector< PSetDatam_entries
 
std::string m_filter
 
std::vector< ModuleInfom_modules
 
std::vector< size_t > m_parentStack
 
std::map< std::string, size_t > m_pathIndex
 
std::vector< PathInfom_paths
 
FWTextTreeCellRenderer m_renderer
 
std::vector< int > m_row_to_index
 
int m_selectedColumn
 
int m_selectedRow
 

Friends

class FWPathsPopup
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 38 of file FWPSetTableManager.h.

Constructor & Destructor Documentation

FWPSetTableManager::FWPSetTableManager ( )

Definition at line 91 of file FWPSetTableManager.cc.

References FWTextTableCellRenderer::getDefaultHighlightGC(), m_renderer, recalculateVisibility(), FWTextTableCellRenderer::setHighlightContext(), and FWTableManagerBase::visualPropertiesChanged().

92  : m_selectedRow(-1)
93 {
94 
96  hc->SetForeground(0xdddddd);
97 
99 
102 }
FWTextTreeCellRenderer m_renderer
void setHighlightContext(const TGGC *context)
static const TGGC & getDefaultHighlightGC()
void visualPropertiesChanged()
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e...
FWPSetTableManager::~FWPSetTableManager ( )
virtual

Definition at line 104 of file FWPSetTableManager.cc.

105 {
106 }
FWPSetTableManager::FWPSetTableManager ( const FWPSetTableManager )
private

Member Function Documentation

bool FWPSetTableManager::applyEditor ( )
protected

This is invoked every single time the editor contents must be applied to the selected entry in the pset.

Returns
true on success.

Definition at line 567 of file FWPSetTableManager.cc.

References FWPSetCellEditor::apply(), data(), m_editor, m_entries, m_modules, m_row_to_index, m_selectedColumn, m_selectedRow, FWPSetTableManager::PSetData::module, FWPSetTableManager::PSetData::parent, dbtoconf::parent, setSelection(), summarizeEdmComparisonLogfiles::success, and FWPSetTableManager::PSetData::value.

Referenced by FWPathsPopup::applyEditor(), and FWPathsPopup::updateFilterString().

568 {
569  if (!m_editor)
570  return false;
571 
572  if (m_selectedRow == -1 ||m_selectedColumn != 1 )
573  return false;
574 
575 
576  // printf("FWPSetTableManager::applyEditor() \n");
578  PSetData &parent = m_entries[data.parent];
579  bool success = false;
580  try
581  {
582  success = m_editor->apply(data, parent);
583  if (success)
584  {
585  data.value = m_editor->GetText();
586  m_modules[data.module].dirty = true;
587  setSelection(-1, -1, 0);
588  m_editor->UnmapWindow();
589  }
590  }
591  catch(cms::Exception &e)
592  {
593  m_editor->SetForegroundColor(gVirtualX->GetPixel(kRed));
594  }
595  return success;
596 }
list parent
Definition: dbtoconf.py:74
std::vector< ModuleInfo > m_modules
std::vector< PSetData > & data()
std::vector< int > m_row_to_index
std::vector< PSetData > m_entries
bool apply(FWPSetTableManager::PSetData &data, FWPSetTableManager::PSetData &parent)
FWPSetCellEditor * m_editor
void setSelection(int row, int column, int mask)
void FWPSetTableManager::cancelEditor ( )
protected

Does not apply changes and closes window.

Definition at line 553 of file FWPSetTableManager.cc.

References m_editor, and setSelection().

Referenced by FWPathsPopup::HandleKey().

554 {
555  if (!m_editor)
556  return;
557 
558  // printf("FWPSetTableManager::cancelEditor() \n");
559  setSelection(-1, -1, 0);
560  m_editor->UnmapWindow();
561 }
FWPSetCellEditor * m_editor
void setSelection(int row, int column, int mask)
FWTableCellRendererBase * FWPSetTableManager::cellRenderer ( int  iSortedRowNumber,
int  iCol 
) const
virtual
Returns the particular renderer used to handle the requested cell.  Arguments:

iSortedRowNumber: the row number from the present sort (i.e. the cell number of the view) iCol: the column number of the cell. The returned value must be used immediately and not held onto since the same Renderer can be used for subsequent calls

Implements FWTableManagerBase.

Definition at line 717 of file FWPSetTableManager.cc.

References fireworks::boldGC(), FWPSetTableManager::PSetData::childMatches, data(), FWPSetTableManager::PSetData::editable, FWPSetTableManager::PSetData::expandedFilter, FWPSetTableManager::PSetData::expandedUser, fwLog, FWTextTableCellRenderer::getDefaultGC(), cmsRelvalreport::green(), FWTextTreeCellRenderer::iconWidth(), tablePrinter::indent(), fireworks::italicGC(), fwlog::kWarning, FWPSetTableManager::PSetData::label, label, FWPSetTableManager::PSetData::level, m_entries, m_filter, m_modules, m_paths, m_renderer, m_row_to_index, m_selectedColumn, m_selectedRow, FWPSetTableManager::PSetData::matches, reco_skim_cfg_mod::maxSize, FWPSetTableManager::PSetData::module, FWPSetTableManager::ModuleInfo::passed, FWPSetTableManager::PathInfo::passed, path(), FWPSetTableManager::PSetData::path, cmsRelvalreport::red(), FWTextTableCellRenderer::setData(), FWTextTableCellRenderer::setGraphicsContext(), FWTextTreeCellRenderer::setIndentation(), FWTextTreeCellRenderer::setIsOpen(), FWTextTreeCellRenderer::setIsParent(), FWTextTreeCellRenderer::showEditor(), TypeTrans::table_, FWPSetTableManager::PSetData::type, relativeConstraints::value, and FWPSetTableManager::PSetData::value.

718 {
719  static size_t maxSize = 512; // maximum string length
720 
721  static TGGC boldGC(fireworks::boldGC());
722  static TGGC italicGC(fireworks::italicGC());
723  static TGGC defaultGC(FWTextTableCellRenderer::getDefaultGC());
724 
725  const static Pixel_t gray = 0x777777;
726  const static Pixel_t red = gVirtualX->GetPixel(kRed-5);
727  const static Pixel_t green = gVirtualX->GetPixel(kGreen-5);
728 
729  // return in case if nothing maches filter
730  if (static_cast<int>(m_row_to_index.size()) <= iSortedRowNumber)
731  {
732  m_renderer.setData(std::string(), false);
733  return &m_renderer;
734  }
735 
736 
737  int unsortedRow = m_row_to_index[iSortedRowNumber];
738  const PSetData& data = m_entries[unsortedRow];
739 
740  std::string value;
741  std::string label;
742  TGGC* gc = 0;
743  if (data.level == 0)
744  {
745  const PathInfo &path = m_paths[data.path];
746  label = data.label + " (" + data.value + ")";
747  gc = &boldGC;
748  gc->SetForeground(path.passed ? green: red);
749  }
750  else if (data.level == 1)
751  {
752  // "passed" means if module made decision on path
753  const ModuleInfo &module = m_modules[m_paths[data.path].moduleStart + data.module];
754  label = data.label + " (" + data.value + ")";
755  gc = (TGGC*)&boldGC;
756  gc->SetForeground(module.passed ? green : red);
757  }
758  else
759  {
760  if (data.type > 0)
761  label = data.label + " (" + sTypeTranslations.table_[data.type] + ")";
762  else
763  label = data.label;
764  value = data.value;
765 
766  if (data.editable)
767  {
768  gc = &defaultGC;
769  }
770  else
771  {
772  gc = &italicGC;
773  gc->SetForeground(gray);
774  }
775  }
776 
777  // check string size and cut it if necessary (problems with X11)
778  if (iCol == 1 && value.size() >= maxSize)
779  {
780  if (iSortedRowNumber == m_selectedRow)
781  fwLog(fwlog::kWarning) << "label: " << label << " has too long value " << value << std::endl << std::endl;
782 
783  value = value.substr(0, maxSize);
784  value += "[truncated]";
785  gc->SetForeground(gVirtualX->GetPixel(kMagenta));
786  }
787 
788  // debug
789  // label = Form("%s m[%d] childm[%d] ", label.c_str(), data.matches, data.childMatches);
790 
791  // set text attributes
793  bool selected = data.matches && (m_filter.empty() == false);
794  m_renderer.setData(iCol ? value : label, selected);
795 
796  // set tree attributes
797  bool isParent = false;
798  bool isOpen = false;
799  int indent = 0;
800  if (iCol == 0)
801  {
802  if (m_filter.empty())
803  {
804  size_t nextIdx = unsortedRow + 1;
805  isParent = (nextIdx < m_entries.size() && m_entries[nextIdx].parent == (size_t)unsortedRow);
806  isOpen = data.expandedUser;
807  }
808  else
809  {
810  isParent = data.childMatches;
811  isOpen = data.expandedFilter && data.childMatches;
812  }
813 
814  indent = data.level * 10 ;
815  if (!isParent) indent += FWTextTreeCellRenderer::iconWidth();
816  }
817  m_renderer.setIsParent(isParent);
818  m_renderer.setIsOpen(isOpen);
819  m_renderer.setIndentation(indent);
820 
821 
822  // If we are rendering the selected cell,
823  // we show the editor.
824  bool showEdit = (iCol == 1 && iSortedRowNumber == m_selectedRow && iCol == m_selectedColumn && value.size() < maxSize);
825  m_renderer.showEditor(data.editable && showEdit);
826 
827  return &m_renderer;
828 } // cellRender()
static TypeTrans const sTypeTranslations
std::vector< PathInfo > m_paths
const std::string & label
Definition: MVAComputer.cc:186
FWTextTreeCellRenderer m_renderer
std::vector< ModuleInfo > m_modules
int path() const
Definition: HLTadd.h:3
std::vector< PSetData > & data()
static const TGGC & getDefaultGC()
tuple maxSize
&#39;/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 setGraphicsContext(const TGGC *iContext)
virtual void setIndentation(int indentation=0)
void setData(const std::string &, bool isSelected)
#define fwLog(_level_)
Definition: fwLog.h:51
const TGGC & italicGC()
const TGGC & boldGC()
Definition: vlib.h:209
virtual void showEditor(bool value)
template<class T >
void FWPSetTableManager::createScalarString ( PSetData data,
T  v 
)
private

Definition at line 185 of file FWPSetTableManager.cc.

References m_entries, v, and FWPSetTableManager::PSetData::value.

Referenced by handleEntry().

186 {
187  std::stringstream ss;
188  ss << v;
189  data.value = ss.str();
190  m_entries.push_back(data);
191 }
std::vector< PSetData > & data()
std::vector< PSetData > m_entries
mathSSE::Vec4< T > v
template<typename T >
void FWPSetTableManager::createVectorString ( FWPSetTableManager::PSetData data,
const T v,
bool  quotes 
)
private

Definition at line 194 of file FWPSetTableManager.cc.

References m_entries, and FWPSetTableManager::PSetData::value.

Referenced by handleEntry().

195 {
196  std::stringstream ss;
197  ss << "[";
198  for (size_t ii = 0, ie = v.size(); ii != ie; ++ii)
199  {
200  if (quotes)
201  ss << "\"";
202  ss << v[ii];
203  if (quotes)
204  ss << "\"";
205  if (ii + 1 != ie)
206  ss << ", ";
207  }
208  ss << "]";
209  data.value = ss.str();
210  m_entries.push_back(data);
211 }
std::vector< PSetData > m_entries
mathSSE::Vec4< T > v
std::vector<PSetData>& FWPSetTableManager::data ( )
inline
std::vector<PSetData>& FWPSetTableManager::entries ( )
inlineprotected

Definition at line 147 of file FWPSetTableManager.h.

References m_entries.

Referenced by FWPathsPopup::scheduleReloadEvent().

147 { return m_entries; }
std::vector< PSetData > m_entries
std::vector< std::string > FWPSetTableManager::getTitles ( ) const
virtual

returns the title names for each column

Implements FWTableManagerBase.

Definition at line 608 of file FWPSetTableManager.cc.

References numberOfColumns().

609 {
610  std::vector<std::string> returnValue;
611  returnValue.reserve(numberOfColumns());
612  returnValue.push_back("Label");
613  returnValue.push_back("Value");
614  return returnValue;
615 }
virtual int numberOfColumns() const
Number of columns in the table.
void FWPSetTableManager::handleEntry ( const edm::Entry entry,
const std::string &  key 
)
private

Definition at line 213 of file FWPSetTableManager.cc.

References createScalarString(), createVectorString(), data(), FWPSetTableManager::PSetData::editable, edm::InputTag::encode(), edm::ESInputTag::encode(), edm::Entry::getBool(), edm::Entry::getDouble(), edm::Entry::getESInputTag(), edm::Entry::getEventID(), edm::Entry::getEventRange(), edm::Entry::getFileInPath(), edm::Entry::getInputTag(), edm::Entry::getInt32(), edm::Entry::getLuminosityBlockID(), edm::Entry::getLuminosityBlockRange(), edm::Entry::getPSet(), edm::Entry::getString(), edm::Entry::getUInt32(), edm::Entry::getUInt64(), edm::Entry::getVDouble(), edm::Entry::getVESInputTag(), edm::Entry::getVEventID(), edm::Entry::getVEventRange(), edm::Entry::getVInputTag(), edm::Entry::getVInt32(), edm::Entry::getVInt64(), edm::Entry::getVLuminosityBlockID(), edm::Entry::getVLuminosityBlockRange(), edm::Entry::getVPSet(), edm::Entry::getVString(), edm::Entry::getVUInt32(), edm::Entry::getVUInt64(), handlePSet(), edm::Entry::isTracked(), combine::key, FWPSetTableManager::PSetData::label, FWPSetTableManager::PSetData::level, m_entries, m_modules, m_parentStack, FWPSetTableManager::PSetData::module, FWPSetTableManager::PSetData::parent, runregparse::ranges, edm::FileInPath::relativePath(), o2o::tags, FWPSetTableManager::PSetData::tracked, FWPSetTableManager::PSetData::type, edm::Entry::typeCode(), and FWPSetTableManager::PSetData::value.

Referenced by handlePSet().

214 {
215  std::stringstream ss;
217  data.label = key;
218  data.tracked = entry.isTracked();
219  data.type = entry.typeCode();
220  data.level = m_parentStack.size();
221  data.parent = m_parentStack.back();
222  data.module = m_modules.size() - 1;
223  data.type = entry.typeCode();
224  if (data.label[0] == '@' || data.level > 2)
225  data.editable = false;
226  else
227  data.editable = true;
228 
229  switch(entry.typeCode())
230  {
231  case 'b':
232  {
233  data.value = entry.getBool() ? "True" : "False";
234  m_entries.push_back(data);
235  break;
236  }
237  case 'B':
238  {
239  data.value = entry.getBool() ? "True" : "False";
240  m_entries.push_back(data);
241  break;
242  }
243  case 'i':
244  {
245  createVectorString(data, entry.getVInt32(), false);
246  break;
247  }
248  case 'I':
249  {
250  createScalarString(data, entry.getInt32());
251  break;
252  }
253  case 'u':
254  {
255  createVectorString(data, entry.getVUInt32(), false);
256  break;
257  }
258  case 'U':
259  {
260  createScalarString(data, entry.getUInt32());
261  break;
262  }
263  case 'l':
264  {
265  createVectorString(data, entry.getVInt64(), false);
266  break;
267  }
268  case 'L':
269  {
270  createScalarString(data, entry.getInt32());
271  break;
272  }
273  case 'x':
274  {
275  createVectorString(data, entry.getVUInt64(), false);
276  break;
277  }
278  case 'X':
279  {
280  createScalarString(data, entry.getUInt64());
281  break;
282  }
283  case 's':
284  {
285  createVectorString(data, entry.getVString(), false);
286  break;
287  }
288  case 'S':
289  {
290  createScalarString(data, entry.getString());
291  break;
292  }
293  case 'd':
294  {
295  createVectorString(data, entry.getVDouble(), false);
296  break;
297  }
298  case 'D':
299  {
300  createScalarString(data, entry.getDouble());
301  break;
302  }
303  case 'p':
304  {
305  std::vector<edm::ParameterSet> psets = entry.getVPSet();
306  for (size_t psi = 0, pse = psets.size(); psi != pse; ++psi)
307  handlePSet(psets[psi]);
308  break;
309  }
310  case 'P':
311  {
312  handlePSet(entry.getPSet());
313  break;
314  }
315  case 't':
316  {
317  data.value = entry.getInputTag().encode();
318  m_entries.push_back(data);
319  break;
320  }
321  case 'v':
322  {
323  std::vector<std::string> tags;
324  tags.resize(entry.getVInputTag().size());
325  for (size_t iti = 0, ite = tags.size(); iti != ite; ++iti)
326  tags[iti] = entry.getVInputTag()[iti].encode();
327  createVectorString(data, tags, true);
328  break;
329  }
330  case 'g':
331  {
332  data.value = entry.getESInputTag().encode();
333  m_entries.push_back(data);
334  break;
335  }
336  case 'G':
337  {
338  std::vector<std::string> tags;
339  tags.resize(entry.getVESInputTag().size());
340  for (size_t iti = 0, ite = tags.size(); iti != ite; ++iti)
341  tags[iti] = entry.getVESInputTag()[iti].encode();
342  createVectorString(data, tags, true);
343  break;
344  }
345  case 'F':
346  {
348  break;
349  }
350  case 'e':
351  {
352  data.editable = false;
353  std::vector<edm::EventID> ids;
354  ids.resize(entry.getVEventID().size());
355  for ( size_t iri = 0, ire = ids.size(); iri != ire; ++iri )
356  ids[iri] = entry.getVEventID()[iri];
357  createVectorString(data, ids, true);
358  break;
359  }
360  case 'E':
361  {
362  data.editable = false;
363  createScalarString(data, entry.getEventID());
364  break;
365  }
366  case 'm':
367  {
368  data.editable = false;
369  std::vector<edm::LuminosityBlockID> ids;
370  ids.resize(entry.getVLuminosityBlockID().size());
371  for ( size_t iri = 0, ire = ids.size(); iri != ire; ++iri )
372  ids[iri] = entry.getVLuminosityBlockID()[iri];
373  createVectorString(data, ids, true);
374  break;
375  }
376  case 'M':
377  {
378  data.editable = false;
380  break;
381  }
382  case 'a':
383  {
384  data.editable = false;
385  std::vector<edm::LuminosityBlockRange> ranges;
386  ranges.resize(entry.getVLuminosityBlockRange().size());
387  for ( size_t iri = 0, ire = ranges.size(); iri != ire; ++iri )
388  ranges[iri] = entry.getVLuminosityBlockRange()[iri];
389  createVectorString(data, ranges, true);
390  break;
391  }
392  case 'A':
393  {
394  data.editable = false;
396  break;
397  }
398  case 'r':
399  {
400  data.editable = false;
401  std::vector<edm::EventRange> ranges;
402  ranges.resize(entry.getVEventRange().size());
403  for ( size_t iri = 0, ire = ranges.size(); iri != ire; ++iri )
404  ranges[iri] = entry.getVEventRange()[iri];
405  createVectorString(data, ranges, true);
406  break;
407  }
408  case 'R':
409  {
410  data.editable = false;
411  createScalarString(data, entry.getEventRange());
412  break;
413  }
414  default:
415  {
416  break;
417  }
418  }
419 }
std::vector< unsigned > getVUInt32() const
Definition: Entry.cc:698
std::vector< double > getVDouble() const
Definition: Entry.cc:743
void handlePSet(const edm::ParameterSet &ps)
std::vector< unsigned long long > getVUInt64() const
Definition: Entry.cc:721
std::vector< LuminosityBlockID > getVLuminosityBlockID() const
Definition: Entry.cc:869
ParameterSet getPSet() const
Definition: Entry.cc:924
int getInt32() const
Definition: Entry.cc:640
unsigned getUInt32() const
Definition: Entry.cc:687
std::vector< size_t > m_parentStack
std::vector< InputTag > getVInputTag() const
Definition: Entry.cc:800
void createVectorString(FWPSetTableManager::PSetData &data, const T &v, bool quotes)
std::string relativePath() const
Definition: FileInPath.cc:151
std::vector< ModuleInfo > m_modules
LuminosityBlockRange getLuminosityBlockRange() const
Definition: Entry.cc:879
std::string encode() const
Definition: InputTag.cc:72
double getDouble() const
Definition: Entry.cc:732
std::vector< EventID > getVEventID() const
Definition: Entry.cc:846
std::map< std::string, int, std::less< std::string > > psi
unsigned long long getUInt64() const
Definition: Entry.cc:710
std::vector< PSetData > & data()
std::vector< PSetData > m_entries
bool isTracked() const
Definition: Entry.h:168
std::vector< ParameterSet > getVPSet() const
Definition: Entry.cc:935
bool getBool() const
Definition: Entry.cc:628
InputTag getInputTag() const
Definition: Entry.cc:788
std::vector< long long > getVInt64() const
Definition: Entry.cc:674
std::vector< ESInputTag > getVESInputTag() const
Definition: Entry.cc:824
std::vector< EventRange > getVEventRange() const
Definition: Entry.cc:912
tuple tags
Definition: o2o.py:248
void createScalarString(PSetData &data, T v)
FileInPath getFileInPath() const
Definition: Entry.cc:777
std::string encode() const
Definition: ESInputTag.cc:91
std::vector< int > getVInt32() const
Definition: Entry.cc:651
LuminosityBlockID getLuminosityBlockID() const
Definition: Entry.cc:858
list key
Definition: combine.py:13
EventRange getEventRange() const
Definition: Entry.cc:901
std::vector< LuminosityBlockRange > getVLuminosityBlockRange() const
Definition: Entry.cc:890
char typeCode() const
Definition: Entry.h:170
ESInputTag getESInputTag() const
Definition: Entry.cc:812
std::vector< std::string > getVString() const
Definition: Entry.cc:765
std::string getString() const
Definition: Entry.cc:754
EventID getEventID() const
Definition: Entry.cc:835
void FWPSetTableManager::handlePSet ( const edm::ParameterSet ps)
private

Definition at line 169 of file FWPSetTableManager.cc.

References handleEntry(), handlePSetEntry(), handleVPSetEntry(), i, edm::ParameterSet::psetTable(), edm::ParameterSet::tbl(), and edm::ParameterSet::vpsetTable().

Referenced by handleEntry(), handlePSetEntry(), handleVPSetEntry(), and updateSchedule().

170 {
171  typedef edm::ParameterSet::table::const_iterator TIterator;
172  for (TIterator i = ps.tbl().begin(), e = ps.tbl().end(); i != e; ++i)
173  handleEntry(i->second, i->first);
174 
175  typedef edm::ParameterSet::psettable::const_iterator PSIterator;
176  for (PSIterator i = ps.psetTable().begin(), e = ps.psetTable().end(); i != e; ++i)
177  handlePSetEntry(i->second, i->first);
178 
179  typedef edm::ParameterSet::vpsettable::const_iterator VPSIterator;
180  for (VPSIterator i = ps.vpsetTable().begin(), e = ps.vpsetTable().end(); i != e; ++i)
181  handleVPSetEntry(i->second, i->first);
182 }
int i
Definition: DBlmapReader.cc:9
void handleVPSetEntry(const edm::VParameterSetEntry &entry, const std::string &key)
void handleEntry(const edm::Entry &entry, const std::string &key)
psettable const & psetTable() const
Definition: ParameterSet.h:250
vpsettable const & vpsetTable() const
Definition: ParameterSet.h:253
void handlePSetEntry(const edm::ParameterSetEntry &entry, const std::string &key)
table const & tbl() const
Definition: ParameterSet.h:247
void FWPSetTableManager::handlePSetEntry ( const edm::ParameterSetEntry entry,
const std::string &  key 
)
private

Definition at line 114 of file FWPSetTableManager.cc.

References data(), FWPSetTableManager::PSetData::editable, handlePSet(), edm::ParameterSetEntry::isTracked(), combine::key, FWPSetTableManager::PSetData::label, FWPSetTableManager::PSetData::level, m_entries, m_modules, m_parentStack, m_paths, FWPSetTableManager::PSetData::module, FWPSetTableManager::PSetData::parent, FWPSetTableManager::PSetData::path, edm::ParameterSetEntry::pset(), FWPSetTableManager::PSetData::pset, FWPSetTableManager::PSetData::tracked, and FWPSetTableManager::PSetData::type.

Referenced by handlePSet().

115 {
117  data.label = key;
118  data.tracked = entry.isTracked();
119  data.level = m_parentStack.size();
120  data.parent = m_parentStack.back();
121  data.type = 'P';
122  data.module = m_modules.size() - 1;
123  data.path = m_paths.size() - 1;
124  data.pset = entry.pset();
125  data.editable = false;
126  m_parentStack.push_back(m_entries.size());
127  m_entries.push_back(data);
128 
129  handlePSet(entry.pset());
130  m_parentStack.pop_back();
131 }
void handlePSet(const edm::ParameterSet &ps)
std::vector< PathInfo > m_paths
std::vector< size_t > m_parentStack
std::vector< ModuleInfo > m_modules
ParameterSet const & pset() const
std::vector< PSetData > & data()
std::vector< PSetData > m_entries
list key
Definition: combine.py:13
void FWPSetTableManager::handleVPSetEntry ( const edm::VParameterSetEntry entry,
const std::string &  key 
)
private

Definition at line 133 of file FWPSetTableManager.cc.

References data(), FWPSetTableManager::PSetData::editable, handlePSet(), i, edm::VParameterSetEntry::isTracked(), combine::key, FWPSetTableManager::PSetData::label, FWPSetTableManager::PSetData::level, m_entries, m_modules, m_parentStack, m_paths, FWPSetTableManager::PSetData::module, FWPSetTableManager::PSetData::parent, FWPSetTableManager::PSetData::path, FWPSetTableManager::PSetData::tracked, FWPSetTableManager::PSetData::type, and edm::VParameterSetEntry::vpset().

Referenced by handlePSet().

134 {
135  PSetData data;
136  data.label = key;
137  data.tracked = entry.isTracked();
138  data.level = m_parentStack.size();
139  data.parent = m_parentStack.back();
140  data.type = 'p';
141  data.module = m_modules.size() - 1;
142  data.path = m_paths.size() - 1;
143  data.editable = false;
144  m_parentStack.push_back(m_entries.size());
145  m_entries.push_back(data);
146 
147  std::stringstream ss;
148 
149  for (size_t i = 0, e = entry.vpset().size(); i != e; ++i)
150  {
151  ss.str("");
152  ss << key << "[" << i << "]";
154  vdata.label = ss.str();
155  vdata.tracked = entry.isTracked();
156  vdata.level = m_parentStack.size();
157  vdata.parent = m_parentStack.back();
158  vdata.module = m_modules.size() - 1;
159  vdata.path = m_paths.size() - 1;
160  vdata.editable = false;
161  m_parentStack.push_back(m_entries.size());
162  m_entries.push_back(vdata);
163  handlePSet(entry.vpset()[i]);
164  m_parentStack.pop_back();
165  }
166  m_parentStack.pop_back();
167 }
int i
Definition: DBlmapReader.cc:9
void handlePSet(const edm::ParameterSet &ps)
std::vector< PathInfo > m_paths
std::vector< size_t > m_parentStack
std::vector< ModuleInfo > m_modules
std::vector< PSetData > & data()
std::vector< PSetData > m_entries
std::vector< ParameterSet > const & vpset() const
list key
Definition: combine.py:13
void FWPSetTableManager::implSort ( int  iCol,
bool  iSortOrder 
)
virtual

Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'.

Implements FWTableManagerBase.

Definition at line 689 of file FWPSetTableManager.cc.

Referenced by update().

690 {
691 }
std::vector< unsigned int > FWPSetTableManager::maxWidthForColumns ( ) const
virtual

for each column in the table this returns the present maximum width for that column

Reimplemented from FWTableManagerBase.

Definition at line 675 of file FWPSetTableManager.cc.

References FWTableManagerBase::cellHeight(), m_editor, and FWTableManagerBase::maxWidthForColumns().

676 {
677  std::vector<unsigned int> ww = FWTableManagerBase::maxWidthForColumns();
678  if (ww.size() > 1 && ww[1] > 0)
679  {
680  // printf("dim W %d \n",ww[1]);
681  // printf("dim H %d \n",cellHeight());
682  if (m_editor)
683  m_editor->MoveResize(m_editor->GetX(),m_editor->GetY(), ww[1], cellHeight());
684  }
685  return ww;
686 
687 }
virtual std::vector< unsigned int > maxWidthForColumns() const
for each column in the table this returns the present maximum width for that column ...
FWPSetCellEditor * m_editor
virtual unsigned int cellHeight() const
require all cells to be the same height
std::vector<ModuleInfo>& FWPSetTableManager::modules ( )
inlineprotected

Definition at line 146 of file FWPSetTableManager.h.

References m_modules.

Referenced by FWPathsPopup::scheduleReloadEvent().

146 { return m_modules; }
std::vector< ModuleInfo > m_modules
int FWPSetTableManager::numberOfColumns ( ) const
virtual

Number of columns in the table.

Implements FWTableManagerBase.

Definition at line 639 of file FWPSetTableManager.cc.

Referenced by getTitles().

639  {
640  return 2;
641 }
int FWPSetTableManager::numberOfRows ( ) const
virtual

Number of rows in the table.

Implements FWTableManagerBase.

Definition at line 635 of file FWPSetTableManager.cc.

References m_row_to_index.

635  {
636  return m_row_to_index.size();
637 }
std::vector< int > m_row_to_index
const FWPSetTableManager& FWPSetTableManager::operator= ( const FWPSetTableManager )
private
void FWPSetTableManager::recalculateVisibility ( )
private

Definition at line 918 of file FWPSetTableManager.cc.

References FWPSetTableManager::PSetData::childMatches, data(), i, FWPSetTableManager::PSetData::level, m_entries, m_filter, m_row_to_index, FWPSetTableManager::PSetData::matches, FWPSetTableManager::PSetData::parent, and FWPSetTableManager::PSetData::visible.

Referenced by FWPSetTableManager(), setExpanded(), updateFilter(), and updateSchedule().

919 {
920  m_row_to_index.clear();
921 
922  // Decide about visibility.
923  // * If the items are toplevel and they match the filter, they get shown
924  // in any case.
925  // * If the item or any of its children match the filter, the item
926  // is visible.
927  // * If the filter is empty and the parent is expanded.
928  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
929  {
930  PSetData &data = m_entries[i];
931  if (data.parent == ((size_t) -1))
932  {
933  data.visible = data.childMatches || data.matches || m_filter.empty();
934  }
935  else
936  {
937  if (m_filter.empty())
938  {
939  data.visible = m_entries[data.parent].expandedUser && m_entries[data.parent].visible;
940  }
941  else
942  {
943  if (data.level < 2)
944  data.visible = m_entries[data.parent].expandedFilter && m_entries[data.parent].visible && (data.matches || data.childMatches);
945  else
946  data.visible = m_entries[data.parent].expandedFilter && m_entries[data.parent].visible;
947  }
948  }
949  }
950 
951  // Put in the index only the entries which are visible.
952  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
953  if (m_entries[i].visible)
954  m_row_to_index.push_back(i);
955 }
int i
Definition: DBlmapReader.cc:9
std::vector< PSetData > & data()
std::vector< int > m_row_to_index
std::vector< PSetData > m_entries
bool FWPSetTableManager::rowIsSelected ( int  row) const
virtual

Definition at line 625 of file FWPSetTableManager.cc.

References m_selectedRow.

626 {
627  return m_selectedRow == row;
628 }
std::vector<int>& FWPSetTableManager::rowToIndex ( )
inline

Definition at line 110 of file FWPSetTableManager.h.

References m_row_to_index.

Referenced by FWPathsPopup::cellClicked(), and setExpanded().

110 { return m_row_to_index; }
std::vector< int > m_row_to_index
int FWPSetTableManager::selectedColumn ( ) const

Definition at line 621 of file FWPSetTableManager.cc.

References m_selectedColumn.

Referenced by FWPathsPopup::cellClicked().

621  {
622  return m_selectedColumn;
623 }
int FWPSetTableManager::selectedRow ( ) const

Definition at line 617 of file FWPSetTableManager.cc.

References m_selectedRow.

Referenced by FWPathsPopup::cellClicked().

617  {
618  return m_selectedRow;
619 }
void FWPSetTableManager::setCellValueEditor ( FWPSetCellEditor editor)
private

Definition at line 545 of file FWPSetTableManager.cc.

References idDealer::editor, m_editor, m_renderer, and FWTextTreeCellRenderer::setCellEditor().

Referenced by FWPathsPopup::FWPathsPopup().

546 {
547  m_editor = editor;
549 }
FWTextTreeCellRenderer m_renderer
virtual void setCellEditor(TGTextEntry *editor)
FWPSetCellEditor * m_editor
tuple editor
Definition: idDealer.py:73
void FWPSetTableManager::setExpanded ( int  row)
protected

Definition at line 694 of file FWPSetTableManager.cc.

References FWPSetTableManager::PSetData::childMatches, data(), FWTableManagerBase::dataChanged(), FWPSetTableManager::PSetData::expandedFilter, FWPSetTableManager::PSetData::expandedUser, getHLTprescales::index, m_entries, m_filter, recalculateVisibility(), rowToIndex(), and FWTableManagerBase::visualPropertiesChanged().

Referenced by FWPathsPopup::cellClicked().

695 {
696  if (row == -1)
697  return;
698 
699  int index = rowToIndex()[row];
700  PSetData& data = m_entries[index];
701 
702  if (m_filter.empty() == false && data.childMatches == false)
703  return;
704 
705  if (m_filter.empty())
706  data.expandedUser = !data.expandedUser;
707  else
708  data.expandedFilter = !data.expandedFilter;
709 
711  dataChanged();
713 }
std::vector< int > & rowToIndex()
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
std::vector< PSetData > & data()
std::vector< PSetData > m_entries
void visualPropertiesChanged()
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e...
void FWPSetTableManager::setSelection ( int  row,
int  column,
int  mask 
)
protected

Definition at line 643 of file FWPSetTableManager.cc.

References FWTableManagerBase::cellHeight(), data(), FWPSetTableManager::PSetData::editable, m_editor, m_entries, m_row_to_index, m_selectedColumn, m_selectedRow, FWPSetTableManager::PSetData::value, and FWTableManagerBase::visualPropertiesChanged().

Referenced by applyEditor(), cancelEditor(), FWPathsPopup::cellClicked(), FWPathsPopup::HandleKey(), and FWPathsPopup::updateFilterString().

644 {
645  // printf("set selection %d %d mode %d\n", iRow, iColumn, mask);
646 
647  // Nothing changes if we clicked selected
648  // twice the same cell.
649  if (iRow == m_selectedRow && iColumn == m_selectedColumn)
650  return;
651 
652  // Otherwise update the selection information
653  // and notify observers.
654  m_selectedRow = iRow;
655  m_selectedColumn = iColumn;
656  if (iColumn == 1 && iRow > 0 )
657  {
658  int unsortedRow = m_row_to_index[iRow];
659  const PSetData& data = m_entries[unsortedRow];
660  if (m_editor && data.editable) {
661  m_editor->MoveResize(0, cellHeight()*iRow, m_editor->GetWidth() , m_editor->GetHeight());
662  m_editor->MapWindow();
663  m_editor->SetText(data.value.c_str());
664  m_editor->SetFocus();
665  m_editor->SetCursorPosition(data.value.size()-1);
666  }
667  }
668  else
669  {
670  if (m_editor) m_editor->UnmapWindow();
671  }
673 }
std::vector< PSetData > & data()
std::vector< int > m_row_to_index
std::vector< PSetData > m_entries
FWPSetCellEditor * m_editor
void visualPropertiesChanged()
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e...
virtual unsigned int cellHeight() const
require all cells to be the same height
const std::string FWPSetTableManager::title ( ) const
virtual
int FWPSetTableManager::unsortedRowNumber ( int  iSortedRowNumber) const
virtual

when passed the index to the sorted order of the rows it returns the original row number from the underlying data

Implements FWTableManagerBase.

Definition at line 630 of file FWPSetTableManager.cc.

631 {
632  return unsorted;
633 }
void FWPSetTableManager::update ( std::vector< PathUpdate > &  pathUpdates)
protected

Update the status of a given path. This is the information that changes on event by event basis.

Definition at line 507 of file FWPSetTableManager.cc.

References FWPSetTableManager::PathUpdate::choiceMaker, fwLog, implSort(), getHLTprescales::index, fwlog::kError, m_modules, m_pathIndex, m_paths, FWPSetTableManager::PathInfo::moduleEnd, FWPSetTableManager::PathInfo::moduleStart, FWPSetTableManager::ModuleInfo::passed, FWPSetTableManager::PathUpdate::passed, FWPSetTableManager::PathInfo::passed, FWPSetTableManager::PathUpdate::pathName, and pi.

Referenced by python.Vispa.Gui.VispaWidget.VispaWidget::autosize(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), python.Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), python.Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), FWPathsPopup::postProcessEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), python.Vispa.Gui.FindDialog.FindDialog::reset(), python.Vispa.Gui.PortConnection.PointToPointConnection::select(), python.Vispa.Gui.VispaWidget.VispaWidget::select(), python.Vispa.Views.LineDecayView.LineDecayContainer::select(), python.Vispa.Gui.VispaWidget.VispaWidget::setText(), python.Vispa.Gui.VispaWidget.VispaWidget::setTitle(), python.Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), python.Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and python.Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

508 {
509  // Reset all the path / module status information, so that
510  // by default paths and modules are considered "not passed".
511  for (size_t pi = 0, pe = m_paths.size(); pi != pe; ++pi)
512  m_paths[pi].passed = false;
513  for (size_t mi = 0, me = m_modules.size(); mi != me; ++mi)
514  m_modules[mi].passed = false;
515 
516  // Update whether or not a given path / module passed selection.
517  for (size_t pui = 0, pue = pathUpdates.size(); pui != pue; ++pui)
518  {
519  PathUpdate &update = pathUpdates[pui];
520  std::map<std::string, size_t>::const_iterator index = m_pathIndex.find(update.pathName);
521  if (index == m_pathIndex.end())
522  {
523  fwLog(fwlog::kError) << "Path " << update.pathName << "cannot be found!" << std::endl;
524  continue;
525  }
526  PathInfo &pathInfo = m_paths[index->second];
527  pathInfo.passed = update.passed;
528 
529  for (size_t mi = pathInfo.moduleStart, me = pathInfo.moduleEnd; mi != me; ++mi)
530  {
531  ModuleInfo &moduleInfo = m_modules[mi];
532  moduleInfo.passed = update.passed || ((mi-pathInfo.moduleStart) < update.choiceMaker);
533  }
534  }
535 
536  implSort(-1, true);
537 }
std::vector< PathInfo > m_paths
virtual void implSort(int, bool)
Called by &#39;sort&#39; method to actually handle the sorting of the rows. Arguments are the same as &#39;sort&#39;...
std::vector< ModuleInfo > m_modules
std::map< std::string, size_t > m_pathIndex
#define fwLog(_level_)
Definition: fwLog.h:51
void update(std::vector< PathUpdate > &pathUpdates)
double pi
void FWPSetTableManager::updateFilter ( const char *  filter)
virtual

Definition at line 832 of file FWPSetTableManager.cc.

References data(), FWTableManagerBase::dataChanged(), align_tpl::filter, i, FWPSetTableManager::PSetData::label, FWPSetTableManager::PSetData::level, m_entries, m_filter, FWPSetTableManager::PSetData::matches, FWPSetTableManager::PSetData::parent, pi, recalculateVisibility(), svgfig::stack, and FWPSetTableManager::PSetData::value.

Referenced by FWPathsPopup::updateFilterString().

833 {
834  m_filter = filter;
835 
836  if (m_filter.empty())
837  {
838  // collapse entries when filter is removed
839  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
840  m_entries[i].expandedFilter = false;
841  }
842  else
843  {
844  // Decide whether or not items match the filter.
845  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
846  {
847  PSetData &data = m_entries[i];
848 
849  // First of all decide whether or not we match
850  // the filter.
851  if (strstr(data.label.c_str(), m_filter.c_str()) || strstr(data.value.c_str(), m_filter.c_str()) )
852  data.matches = true;
853  else
854  data.matches = false;
855  }
856 
857  // We reset whether or not a given parent has children that match the
858  // filter, and we recompute the whole information by checking all the
859  // children.
860  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
861  m_entries[i].childMatches = false;
862 
863  std::vector<int> stack;
864  int previousLevel = 0;
865  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
866  {
867  PSetData &data = m_entries[i];
868  // Top level.
869  if (data.parent == (size_t)-1)
870  {
871  previousLevel = 0;
872  // std::cout << "reset stack for top level " << data.label << std::endl;
873  stack.clear();
874  continue;
875  }
876  // If the level is greater than the previous one,
877  // it means we are among the children of the
878  // previous level, hence we push the parent to
879  // the stack.
880  // If the level is not greater than the previous
881  // one it means we have popped out n levels of
882  // parents, where N is the difference between the
883  // new and the old level. In this case we
884  // pop up N parents from the stack.
885  if (data.level > previousLevel)
886  stack.push_back(data.parent);
887  else
888  for (size_t pi = 0, pe = previousLevel - data.level; pi != pe; ++pi)
889  stack.pop_back();
890 
891  if (data.matches && m_entries[stack.back()].childMatches == false)
892  {
893  // printf("match for %s with level %d\n",data.label.c_str(), data.level );
894  for (size_t pi = 0, pe = stack.size(); pi != pe; ++pi)
895  {
896  // printf("set child match to parent %s with level %d \n",m_entries[stack[pi]].label.c_str(), m_entries[stack[pi]].level);
897  m_entries[stack[pi]].childMatches = true;
898 
899  }
900  }
901 
902  previousLevel = data.level;
903  }
904 
905  // expand to matching children
906  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
907  m_entries[i].expandedFilter = m_entries[i].childMatches;
908 
909  }
910 
912 
913  dataChanged();
914 } // updateFilter()
int i
Definition: DBlmapReader.cc:9
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
std::vector< PSetData > & data()
std::vector< PSetData > m_entries
stack
Definition: svgfig.py:558
tuple filter
USE THIS FOR SKIMMED TRACKS process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter2) OTHERWISE USE THIS.
Definition: align_tpl.py:86
double pi
void FWPSetTableManager::updateSchedule ( const edm::ScheduleInfo info)
protected

Definition at line 425 of file FWPSetTableManager.cc.

References edm::ScheduleInfo::availablePaths(), FWPSetTableManager::ModuleInfo::dirty, FWPSetTableManager::PSetData::editable, FWPSetTableManager::ModuleInfo::entry, FWPSetTableManager::PathInfo::entryId, handlePSet(), i, FWPSetTableManager::PSetData::label, FWPSetTableManager::PSetData::level, m_availablePaths, m_entries, m_filter, m_modules, m_parentStack, m_pathIndex, m_paths, FWPSetTableManager::PSetData::module, edm::ScheduleInfo::modulesInPath(), FWPSetTableManager::PathInfo::moduleStart, edm::ScheduleInfo::parametersForModule(), FWPSetTableManager::PSetData::parent, FWPSetTableManager::ModuleInfo::passed, FWPSetTableManager::PathInfo::passed, FWPSetTableManager::PSetData::path, FWPSetTableManager::ModuleInfo::path, pathName(), FWPSetTableManager::PSetData::pset, recalculateVisibility(), edm::ParameterSet::tbl(), and FWPSetTableManager::PSetData::value.

Referenced by FWPathsPopup::postProcessEvent().

426 {
427  if (!m_entries.empty())
428  return;
429  // Execute only once since the schedule itself
430  // cannot be altered.
431  assert(m_availablePaths.empty());
433 
434  for (size_t i = 0, e = m_availablePaths.size(); i != e; ++i)
435  {
436  PSetData pathEntry;
437  const std::string &pathName = m_availablePaths[i];
438  pathEntry.label = pathName;
439  m_pathIndex.insert(std::make_pair(pathName, m_paths.size()));
440 
441  pathEntry.value = "Path";
442  pathEntry.level= 0;
443  pathEntry.parent = -1;
444  pathEntry.path = i;
445  pathEntry.editable = false;
446 
447  PathInfo pathInfo;
448  pathInfo.entryId = m_entries.size();
449  pathInfo.passed = false;
450  pathInfo.moduleStart = m_modules.size();
451  m_paths.push_back(pathInfo);
452 
453  m_parentStack.push_back(m_entries.size());
454  m_entries.push_back(pathEntry);
455 
456  std::vector<std::string> pathModules;
457  info->modulesInPath(pathName, pathModules);
458 
459  for (size_t mi = 0, me = pathModules.size(); mi != me; ++mi)
460  {
461  PSetData moduleEntry;
462 
463  const edm::ParameterSet* ps = info->parametersForModule(pathModules[mi]);
464  const edm::ParameterSet::table& pst = ps->tbl();
465  const edm::ParameterSet::table::const_iterator ti = pst.find("@module_edm_type");
466 
467  if (ti == pst.end())
468  moduleEntry.value = "Unknown module name";
469  else
470  moduleEntry.value = ti->second.getString();
471 
472  moduleEntry.label = pathModules[mi];
473  moduleEntry.parent = m_parentStack.back();
474  moduleEntry.level = m_parentStack.size();
475  moduleEntry.module = mi;
476  moduleEntry.path = i;
477  moduleEntry.pset = *ps;
478  moduleEntry.editable = false;
479  ModuleInfo moduleInfo;
480  moduleInfo.path = m_paths.size() - 1;
481  moduleInfo.entry = m_entries.size();
482  moduleInfo.passed = false;
483  moduleInfo.dirty = false;
484  m_modules.push_back(moduleInfo);
485  m_parentStack.push_back(m_entries.size());
486  m_entries.push_back(moduleEntry);
487  handlePSet(moduleEntry.pset);
488  m_parentStack.pop_back();
489  }
490  m_paths.back().moduleEnd = m_modules.size();
491  m_parentStack.pop_back();
492  }
493 
494  // Nothing is expanded by default.
495  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
496  m_entries[i].expandedUser = false;
497 
498  m_filter = "";
499 
501 } //updateSchedule
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 ...
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > m_availablePaths
void handlePSet(const edm::ParameterSet &ps)
std::vector< PathInfo > m_paths
std::vector< size_t > m_parentStack
std::vector< ModuleInfo > m_modules
const std::string * pathName() const
Definition: HLTadd.h:31
std::map< std::string, size_t > m_pathIndex
std::vector< PSetData > m_entries
const edm::ParameterSet * parametersForModule(const std::string &iLabel) const
Definition: ScheduleInfo.cc:83
std::map< std::string, Entry > table
Definition: ParameterSet.h:246
table const & tbl() const
Definition: ParameterSet.h:247
void availablePaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all paths in the process
Definition: ScheduleInfo.cc:99

Friends And Related Function Documentation

friend class FWPathsPopup
friend

Definition at line 40 of file FWPSetTableManager.h.

Member Data Documentation

std::vector<std::string> FWPSetTableManager::m_availablePaths
private

Definition at line 191 of file FWPSetTableManager.h.

Referenced by updateSchedule().

FWPSetCellEditor* FWPSetTableManager::m_editor
private
std::vector<PSetData> FWPSetTableManager::m_entries
private
std::string FWPSetTableManager::m_filter
private
std::vector<ModuleInfo> FWPSetTableManager::m_modules
private
std::vector<size_t> FWPSetTableManager::m_parentStack
private
std::map<std::string, size_t> FWPSetTableManager::m_pathIndex
private

Definition at line 184 of file FWPSetTableManager.h.

Referenced by update(), and updateSchedule().

std::vector<PathInfo> FWPSetTableManager::m_paths
private

Index in m_entries where to find paths

Definition at line 182 of file FWPSetTableManager.h.

Referenced by cellRenderer(), handlePSetEntry(), handleVPSetEntry(), update(), and updateSchedule().

FWTextTreeCellRenderer FWPSetTableManager::m_renderer
mutableprivate

Definition at line 193 of file FWPSetTableManager.h.

Referenced by cellRenderer(), FWPSetTableManager(), and setCellValueEditor().

std::vector<int> FWPSetTableManager::m_row_to_index
private
int FWPSetTableManager::m_selectedColumn
private

Definition at line 188 of file FWPSetTableManager.h.

Referenced by applyEditor(), cellRenderer(), selectedColumn(), and setSelection().

int FWPSetTableManager::m_selectedRow
private