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 bool cellDataIsSortable () const
 
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 (edm::ParameterSet *psp)
 
void handlePSetEntry (edm::ParameterSetEntry &entry, const std::string &key)
 
void handleVPSetEntry (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 92 of file FWPSetTableManager.cc.

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

93  : m_selectedRow(-1)
94 {
95 
97  hc->SetForeground(0xdddddd);
98 
100 
103 }
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 105 of file FWPSetTableManager.cc.

106 {
107 }
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 580 of file FWPSetTableManager.cc.

References FWPSetCellEditor::apply(), data(), alignCSCRings::e, 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().

581 {
582  if (!m_editor)
583  return false;
584 
585  if (m_selectedRow == -1 ||m_selectedColumn != 1 )
586  return false;
587 
588 
589  // printf("FWPSetTableManager::applyEditor() \n");
591  PSetData &parent = m_entries[data.parent];
592  bool success = false;
593  try
594  {
595  success = m_editor->apply(data, parent);
596 
597  if (success)
598  {
599  data.value = m_editor->GetText();
600  m_modules[data.module].dirty = true;
601  setSelection(-1, -1, 0);
602  m_editor->UnmapWindow();
603  // ???
604  // copy current to orig
605  }
606  else
607  {
608  // ???
609  // set current from orig? reimport module ... hmmh, hard.
610  }
611  }
612  catch(cms::Exception &e)
613  {
614  m_editor->SetForegroundColor(gVirtualX->GetPixel(kRed));
615  }
616  return success;
617 }
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 566 of file FWPSetTableManager.cc.

References m_editor, and setSelection().

Referenced by FWPathsPopup::HandleKey().

567 {
568  if (!m_editor)
569  return;
570 
571  // printf("FWPSetTableManager::cancelEditor() \n");
572  setSelection(-1, -1, 0);
573  m_editor->UnmapWindow();
574 }
FWPSetCellEditor * m_editor
void setSelection(int row, int column, int mask)
virtual bool FWPSetTableManager::cellDataIsSortable ( ) const
inlinevirtual

Reimplemented from FWTableManagerBase.

Definition at line 104 of file FWPSetTableManager.h.

References funct::false.

104 { return false ; }
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 738 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(), dataformats::indent(), fireworks::italicGC(), fwlog::kWarning, diffTwoXMLs::label, FWPSetTableManager::PSetData::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, getHLTPrescaleColumns::path, FWPSetTableManager::PSetData::path, cmsRelvalreport::red(), FWTextTableCellRenderer::setData(), FWTextTableCellRenderer::setGraphicsContext(), FWTextTreeCellRenderer::setIndentation(), FWTextTreeCellRenderer::setIsOpen(), FWTextTreeCellRenderer::setIsParent(), FWTextTreeCellRenderer::showEditor(), AlCaHLTBitMon_QueryRunRegistry::string, TypeTrans::table_, FWPSetTableManager::PSetData::type, relativeConstraints::value, and FWPSetTableManager::PSetData::value.

739 {
740  const static size_t maxSize = 512; // maximum string length
741 
742  static TGGC boldGC(fireworks::boldGC());
743  static TGGC italicGC(fireworks::italicGC());
744  static TGGC defaultGC(FWTextTableCellRenderer::getDefaultGC());
745 
746  const static Pixel_t gray = 0x777777;
747  const static Pixel_t red = gVirtualX->GetPixel(kRed-5);
748  const static Pixel_t green = gVirtualX->GetPixel(kGreen-5);
749 
750  // return in case if nothing maches filter
751  if (static_cast<int>(m_row_to_index.size()) <= iSortedRowNumber)
752  {
753  m_renderer.setData(std::string(), false);
754  return &m_renderer;
755  }
756 
757 
758  int unsortedRow = m_row_to_index[iSortedRowNumber];
759  const PSetData& data = m_entries[unsortedRow];
760 
763  TGGC* gc = 0;
764  if (data.level == 0)
765  {
766  const PathInfo &path = m_paths[data.path];
767  label = data.label + " (" + data.value + ")";
768  gc = &boldGC;
769  gc->SetForeground(path.passed ? green: red);
770  }
771  else if (data.level == 1)
772  {
773  // "passed" means if module made decision on path
774  const ModuleInfo &module = m_modules[m_paths[data.path].moduleStart + data.module];
775  label = data.label + " (" + data.value + ")";
776  gc = (TGGC*)&boldGC;
777  gc->SetForeground(module.passed ? green : red);
778  }
779  else
780  {
781  if (data.type > 0)
782  label = data.label + " (" + sTypeTranslations.table_[data.type] + ")";
783  else
784  label = data.label;
785  value = data.value;
786 
787  if (data.editable)
788  {
789  gc = &defaultGC;
790  }
791  else
792  {
793  gc = &italicGC;
794  gc->SetForeground(gray);
795  }
796  }
797 
798  // check string size and cut it if necessary (problems with X11)
799  if (iCol == 1 && value.size() >= maxSize)
800  {
801  if (iSortedRowNumber == m_selectedRow)
802  fwLog(fwlog::kWarning) << "label: " << label << " has too long value " << value << std::endl << std::endl;
803 
804  value = value.substr(0, maxSize);
805  value += "[truncated]";
806  gc->SetForeground(gVirtualX->GetPixel(kMagenta));
807  }
808 
809  // debug
810  // label = Form("%s m[%d] childm[%d] ", label.c_str(), data.matches, data.childMatches);
811 
812  // set text attributes
814  bool selected = data.matches && (m_filter.empty() == false);
815  m_renderer.setData(iCol ? value : label, selected);
816 
817  // set tree attributes
818  bool isParent = false;
819  bool isOpen = false;
820  int indent = 0;
821  if (iCol == 0)
822  {
823  if (m_filter.empty())
824  {
825  size_t nextIdx = unsortedRow + 1;
826  isParent = (nextIdx < m_entries.size() && m_entries[nextIdx].parent == (size_t)unsortedRow);
827  isOpen = data.expandedUser;
828  }
829  else
830  {
831  isParent = data.childMatches;
832  isOpen = data.expandedFilter && data.childMatches;
833  }
834 
835  indent = data.level * 10 ;
836  if (!isParent) indent += FWTextTreeCellRenderer::iconWidth();
837  }
838  m_renderer.setIsParent(isParent);
839  m_renderer.setIsOpen(isOpen);
840  m_renderer.setIndentation(indent);
841 
842 
843  // If we are rendering the selected cell,
844  // we show the editor.
845  bool showEdit = (iCol == 1 && iSortedRowNumber == m_selectedRow && iCol == m_selectedColumn && value.size() < maxSize);
846  m_renderer.showEditor(data.editable && showEdit);
847 
848  return &m_renderer;
849 } // cellRender()
static TypeTrans const sTypeTranslations
std::vector< PathInfo > m_paths
FWTextTreeCellRenderer m_renderer
std::vector< ModuleInfo > m_modules
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 189 of file FWPSetTableManager.cc.

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

Referenced by handleEntry().

190 {
191  std::stringstream ss;
192  ss << v;
193  data.value = ss.str();
194  m_entries.push_back(data);
195 }
std::vector< PSetData > & data()
std::vector< PSetData > m_entries
template<typename T >
void FWPSetTableManager::createVectorString ( FWPSetTableManager::PSetData data,
const T v,
bool  quotes 
)
private

Definition at line 198 of file FWPSetTableManager.cc.

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

Referenced by handleEntry().

199 {
200  std::stringstream ss;
201  ss << "[";
202  for (size_t ii = 0, ie = v.size(); ii != ie; ++ii)
203  {
204  if (quotes)
205  ss << "\"";
206  ss << v[ii];
207  if (quotes)
208  ss << "\"";
209  if (ii + 1 != ie)
210  ss << ", ";
211  }
212  ss << "]";
213  data.value = ss.str();
214  m_entries.push_back(data);
215 }
int ii
Definition: cuy.py:588
std::vector< PSetData > m_entries
std::vector<PSetData>& FWPSetTableManager::data ( )
inline
std::vector<PSetData>& FWPSetTableManager::entries ( )
inlineprotected

Definition at line 151 of file FWPSetTableManager.h.

References m_entries.

Referenced by FWPathsPopup::scheduleReloadEvent().

151 { 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 629 of file FWPSetTableManager.cc.

References numberOfColumns().

630 {
631  std::vector<std::string> returnValue;
632  returnValue.reserve(numberOfColumns());
633  returnValue.push_back("Label");
634  returnValue.push_back("Value");
635  return returnValue;
636 }
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 217 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::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::getVString(), edm::Entry::getVUInt32(), edm::Entry::getVUInt64(), edm::Entry::isTracked(), combine::key, FWPSetTableManager::PSetData::label, FWPSetTableManager::PSetData::level, m_entries, m_modules, m_parentStack, FWPSetTableManager::PSetData::module, FWPSetTableManager::PSetData::parent, diffTwoXMLs::ranges, edm::FileInPath::relativePath(), o2o::tags, FWPSetTableManager::PSetData::tracked, FWPSetTableManager::PSetData::type, edm::Entry::typeCode(), and FWPSetTableManager::PSetData::value.

Referenced by handlePSet().

218 {
219  std::stringstream ss;
221  data.label = key;
222  data.tracked = entry.isTracked();
223  data.type = entry.typeCode();
224  data.level = m_parentStack.size();
225  data.parent = m_parentStack.back();
226  data.module = m_modules.size() - 1;
227  data.type = entry.typeCode();
228  if (data.label[0] == '@')
229  data.editable = false;
230  else
231  data.editable = true;
232 
233  switch(entry.typeCode())
234  {
235  case 'b':
236  {
237  data.value = entry.getBool() ? "True" : "False";
238  m_entries.push_back(data);
239  break;
240  }
241  case 'B':
242  {
243  data.value = entry.getBool() ? "True" : "False";
244  m_entries.push_back(data);
245  break;
246  }
247  case 'i':
248  {
249  createVectorString(data, entry.getVInt32(), false);
250  break;
251  }
252  case 'I':
253  {
254  createScalarString(data, entry.getInt32());
255  break;
256  }
257  case 'u':
258  {
259  createVectorString(data, entry.getVUInt32(), false);
260  break;
261  }
262  case 'U':
263  {
264  createScalarString(data, entry.getUInt32());
265  break;
266  }
267  case 'l':
268  {
269  createVectorString(data, entry.getVInt64(), false);
270  break;
271  }
272  case 'L':
273  {
274  createScalarString(data, entry.getInt32());
275  break;
276  }
277  case 'x':
278  {
279  createVectorString(data, entry.getVUInt64(), false);
280  break;
281  }
282  case 'X':
283  {
284  createScalarString(data, entry.getUInt64());
285  break;
286  }
287  case 's':
288  {
289  createVectorString(data, entry.getVString(), false);
290  break;
291  }
292  case 'S':
293  {
294  createScalarString(data, entry.getString());
295  break;
296  }
297  case 'd':
298  {
299  createVectorString(data, entry.getVDouble(), false);
300  break;
301  }
302  case 'D':
303  {
304  createScalarString(data, entry.getDouble());
305  break;
306  }
307  case 'p':
308  {
309  // Matevz ???
310  throw std::runtime_error("FWPSetTableManager::handleEntryGet, entry type 'p' not expected.");
311  // std::vector<edm::ParameterSet> psets = entry.getVPSet();
312  // for (size_t psi = 0, pse = psets.size(); psi != pse; ++psi)
313  // handlePSet(psets[psi]);
314  break;
315  }
316  case 'P':
317  {
318  // Matevz ???
319  throw std::runtime_error("FWPSetTableManager::handleEntry, entry type 'P not expected.");
320  // handlePSet(entry.getPSet());
321  break;
322  }
323  case 't':
324  {
325  data.value = entry.getInputTag().encode();
326  m_entries.push_back(data);
327  break;
328  }
329  case 'v':
330  {
331  std::vector<std::string> tags;
332  tags.resize(entry.getVInputTag().size());
333  for (size_t iti = 0, ite = tags.size(); iti != ite; ++iti)
334  tags[iti] = entry.getVInputTag()[iti].encode();
335  createVectorString(data, tags, true);
336  break;
337  }
338  case 'g':
339  {
340  data.value = entry.getESInputTag().encode();
341  m_entries.push_back(data);
342  break;
343  }
344  case 'G':
345  {
346  std::vector<std::string> tags;
347  tags.resize(entry.getVESInputTag().size());
348  for (size_t iti = 0, ite = tags.size(); iti != ite; ++iti)
349  tags[iti] = entry.getVESInputTag()[iti].encode();
350  createVectorString(data, tags, true);
351  break;
352  }
353  case 'F':
354  {
356  break;
357  }
358  case 'e':
359  {
360  data.editable = false;
361  std::vector<edm::EventID> ids;
362  ids.resize(entry.getVEventID().size());
363  for ( size_t iri = 0, ire = ids.size(); iri != ire; ++iri )
364  ids[iri] = entry.getVEventID()[iri];
365  createVectorString(data, ids, true);
366  break;
367  }
368  case 'E':
369  {
370  data.editable = false;
371  createScalarString(data, entry.getEventID());
372  break;
373  }
374  case 'm':
375  {
376  data.editable = false;
377  std::vector<edm::LuminosityBlockID> ids;
378  ids.resize(entry.getVLuminosityBlockID().size());
379  for ( size_t iri = 0, ire = ids.size(); iri != ire; ++iri )
380  ids[iri] = entry.getVLuminosityBlockID()[iri];
381  createVectorString(data, ids, true);
382  break;
383  }
384  case 'M':
385  {
386  data.editable = false;
388  break;
389  }
390  case 'a':
391  {
392  data.editable = false;
393  std::vector<edm::LuminosityBlockRange> ranges;
394  ranges.resize(entry.getVLuminosityBlockRange().size());
395  for ( size_t iri = 0, ire = ranges.size(); iri != ire; ++iri )
396  ranges[iri] = entry.getVLuminosityBlockRange()[iri];
397  createVectorString(data, ranges, true);
398  break;
399  }
400  case 'A':
401  {
402  data.editable = false;
404  break;
405  }
406  case 'r':
407  {
408  data.editable = false;
409  std::vector<edm::EventRange> ranges;
410  ranges.resize(entry.getVEventRange().size());
411  for ( size_t iri = 0, ire = ranges.size(); iri != ire; ++iri )
412  ranges[iri] = entry.getVEventRange()[iri];
413  createVectorString(data, ranges, true);
414  break;
415  }
416  case 'R':
417  {
418  data.editable = false;
419  createScalarString(data, entry.getEventRange());
420  break;
421  }
422  default:
423  {
424  break;
425  }
426  }
427 }
std::vector< unsigned > getVUInt32() const
Definition: Entry.cc:708
std::vector< double > getVDouble() const
Definition: Entry.cc:753
std::vector< unsigned long long > getVUInt64() const
Definition: Entry.cc:731
std::vector< LuminosityBlockID > getVLuminosityBlockID() const
Definition: Entry.cc:879
int getInt32() const
Definition: Entry.cc:650
unsigned getUInt32() const
Definition: Entry.cc:697
std::vector< size_t > m_parentStack
std::vector< InputTag > getVInputTag() const
Definition: Entry.cc:810
void createVectorString(FWPSetTableManager::PSetData &data, const T &v, bool quotes)
std::string relativePath() const
Definition: FileInPath.cc:152
std::vector< ModuleInfo > m_modules
LuminosityBlockRange getLuminosityBlockRange() const
Definition: Entry.cc:889
std::string encode() const
Definition: InputTag.cc:164
double getDouble() const
Definition: Entry.cc:742
std::vector< EventID > getVEventID() const
Definition: Entry.cc:856
unsigned long long getUInt64() const
Definition: Entry.cc:720
std::vector< PSetData > & data()
std::vector< PSetData > m_entries
bool isTracked() const
Definition: Entry.h:173
bool getBool() const
Definition: Entry.cc:638
InputTag getInputTag() const
Definition: Entry.cc:798
std::vector< long long > getVInt64() const
Definition: Entry.cc:684
std::vector< ESInputTag > getVESInputTag() const
Definition: Entry.cc:834
std::vector< EventRange > getVEventRange() const
Definition: Entry.cc:922
string ranges
Definition: diffTwoXMLs.py:78
tuple tags
Definition: o2o.py:248
void createScalarString(PSetData &data, T v)
FileInPath getFileInPath() const
Definition: Entry.cc:787
std::string encode() const
Definition: ESInputTag.cc:91
std::vector< int > getVInt32() const
Definition: Entry.cc:661
LuminosityBlockID getLuminosityBlockID() const
Definition: Entry.cc:868
list key
Definition: combine.py:13
EventRange getEventRange() const
Definition: Entry.cc:911
std::vector< LuminosityBlockRange > getVLuminosityBlockRange() const
Definition: Entry.cc:900
char typeCode() const
Definition: Entry.h:175
ESInputTag getESInputTag() const
Definition: Entry.cc:822
std::vector< std::string > getVString() const
Definition: Entry.cc:775
std::string getString() const
Definition: Entry.cc:764
EventID getEventID() const
Definition: Entry.cc:845
void FWPSetTableManager::handlePSet ( edm::ParameterSet psp)
private

Definition at line 171 of file FWPSetTableManager.cc.

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

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

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

Definition at line 115 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().

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

Definition at line 134 of file FWPSetTableManager.cc.

References data(), alignCSCRings::e, 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::pset, FWPSetTableManager::PSetData::tracked, FWPSetTableManager::PSetData::type, and edm::VParameterSetEntry::vpset().

Referenced by handlePSet().

135 {
136  PSetData data;
137  data.label = key;
138  data.tracked = entry.isTracked();
139  data.level = m_parentStack.size();
140  data.parent = m_parentStack.back();
141  data.type = 'p';
142  data.module = m_modules.size() - 1;
143  data.path = m_paths.size() - 1;
144  data.editable = false;
145  m_parentStack.push_back(m_entries.size());
146  m_entries.push_back(data);
147 
148  std::stringstream ss;
149 
150  for (size_t i = 0, e = entry.vpset().size(); i != e; ++i)
151  {
152  ss.str("");
153  ss << key << "[" << i << "]";
154  PSetData vdata;
155  vdata.label = ss.str();
156  vdata.tracked = entry.isTracked();
157  vdata.level = m_parentStack.size();
158  vdata.parent = m_parentStack.back();
159  vdata.module = m_modules.size() - 1;
160  vdata.path = m_paths.size() - 1;
161  vdata.editable = false;
162  vdata.pset = &entry.vpset()[i];
163  m_parentStack.push_back(m_entries.size());
164  m_entries.push_back(vdata);
165  handlePSet( & entry.vpset()[i]);
166  m_parentStack.pop_back();
167  }
168  m_parentStack.pop_back();
169 }
int i
Definition: DBlmapReader.cc:9
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
void handlePSet(edm::ParameterSet *psp)
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 710 of file FWPSetTableManager.cc.

Referenced by update().

711 {
712 }
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 696 of file FWPSetTableManager.cc.

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

697 {
698  std::vector<unsigned int> ww = FWTableManagerBase::maxWidthForColumns();
699  if (ww.size() > 1 && ww[1] > 0)
700  {
701  // printf("dim W %d \n",ww[1]);
702  // printf("dim H %d \n",cellHeight());
703  if (m_editor)
704  m_editor->MoveResize(m_editor->GetX(),m_editor->GetY(), ww[1], cellHeight());
705  }
706  return ww;
707 
708 }
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 150 of file FWPSetTableManager.h.

References m_modules.

Referenced by FWPathsPopup::scheduleReloadEvent().

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

Number of columns in the table.

Implements FWTableManagerBase.

Definition at line 660 of file FWPSetTableManager.cc.

Referenced by getTitles().

660  {
661  return 2;
662 }
int FWPSetTableManager::numberOfRows ( ) const
virtual

Number of rows in the table.

Implements FWTableManagerBase.

Definition at line 656 of file FWPSetTableManager.cc.

References m_row_to_index.

656  {
657  return m_row_to_index.size();
658 }
std::vector< int > m_row_to_index
const FWPSetTableManager& FWPSetTableManager::operator= ( const FWPSetTableManager )
private
void FWPSetTableManager::recalculateVisibility ( )
private

Definition at line 939 of file FWPSetTableManager.cc.

References FWPSetTableManager::PSetData::childMatches, data(), alignCSCRings::e, 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().

940 {
941  m_row_to_index.clear();
942 
943  // Decide about visibility.
944  // * If the items are toplevel and they match the filter, they get shown
945  // in any case.
946  // * If the item or any of its children match the filter, the item
947  // is visible.
948  // * If the filter is empty and the parent is expanded.
949  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
950  {
951  PSetData &data = m_entries[i];
952  if (data.parent == ((size_t) -1))
953  {
954  data.visible = data.childMatches || data.matches || m_filter.empty();
955  }
956  else
957  {
958  if (m_filter.empty())
959  {
960  data.visible = m_entries[data.parent].expandedUser && m_entries[data.parent].visible;
961  }
962  else
963  {
964  if (data.level < 2)
965  data.visible = m_entries[data.parent].expandedFilter && m_entries[data.parent].visible && (data.matches || data.childMatches);
966  else
967  data.visible = m_entries[data.parent].expandedFilter && m_entries[data.parent].visible;
968  }
969  }
970  }
971 
972  // Put in the index only the entries which are visible.
973  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
974  if (m_entries[i].visible)
975  m_row_to_index.push_back(i);
976 }
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 646 of file FWPSetTableManager.cc.

References m_selectedRow.

647 {
648  return m_selectedRow == row;
649 }
std::vector<int>& FWPSetTableManager::rowToIndex ( )
inline

Definition at line 111 of file FWPSetTableManager.h.

References m_row_to_index.

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

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

Definition at line 642 of file FWPSetTableManager.cc.

References m_selectedColumn.

Referenced by FWPathsPopup::cellClicked().

642  {
643  return m_selectedColumn;
644 }
int FWPSetTableManager::selectedRow ( ) const

Definition at line 638 of file FWPSetTableManager.cc.

References m_selectedRow.

Referenced by FWPathsPopup::cellClicked().

638  {
639  return m_selectedRow;
640 }
void FWPSetTableManager::setCellValueEditor ( FWPSetCellEditor editor)
private

Definition at line 558 of file FWPSetTableManager.cc.

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

Referenced by FWPathsPopup::FWPathsPopup().

559 {
560  m_editor = editor;
562 }
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 715 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().

716 {
717  if (row == -1)
718  return;
719 
720  int index = rowToIndex()[row];
721  PSetData& data = m_entries[index];
722 
723  if (m_filter.empty() == false && data.childMatches == false)
724  return;
725 
726  if (m_filter.empty())
727  data.expandedUser = !data.expandedUser;
728  else
729  data.expandedFilter = !data.expandedFilter;
730 
732  dataChanged();
734 }
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 664 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().

665 {
666  // printf("set selection %d %d mode %d\n", iRow, iColumn, mask);
667 
668  // Nothing changes if we clicked selected
669  // twice the same cell.
670  if (iRow == m_selectedRow && iColumn == m_selectedColumn)
671  return;
672 
673  // Otherwise update the selection information
674  // and notify observers.
675  m_selectedRow = iRow;
676  m_selectedColumn = iColumn;
677  if (iColumn == 1 && iRow > 0 )
678  {
679  int unsortedRow = m_row_to_index[iRow];
680  const PSetData& data = m_entries[unsortedRow];
681  if (m_editor && data.editable) {
682  m_editor->MoveResize(0, cellHeight()*iRow, m_editor->GetWidth() , m_editor->GetHeight());
683  m_editor->MapWindow();
684  m_editor->SetText(data.value.c_str());
685  m_editor->SetFocus();
686  m_editor->SetCursorPosition(data.value.size()-1);
687  }
688  }
689  else
690  {
691  if (m_editor) m_editor->UnmapWindow();
692  }
694 }
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 651 of file FWPSetTableManager.cc.

652 {
653  return unsorted;
654 }
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 520 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 progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), FWPathsPopup::postProcessEvent(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

521 {
522  // Reset all the path / module status information, so that
523  // by default paths and modules are considered "not passed".
524  for (size_t pi = 0, pe = m_paths.size(); pi != pe; ++pi)
525  m_paths[pi].passed = false;
526  for (size_t mi = 0, me = m_modules.size(); mi != me; ++mi)
527  m_modules[mi].passed = false;
528 
529  // Update whether or not a given path / module passed selection.
530  for (size_t pui = 0, pue = pathUpdates.size(); pui != pue; ++pui)
531  {
532  PathUpdate &update = pathUpdates[pui];
533  std::map<std::string, size_t>::const_iterator index = m_pathIndex.find(update.pathName);
534  if (index == m_pathIndex.end())
535  {
536  fwLog(fwlog::kError) << "Path " << update.pathName << "cannot be found!" << std::endl;
537  continue;
538  }
539  PathInfo &pathInfo = m_paths[index->second];
540  pathInfo.passed = update.passed;
541 
542  for (size_t mi = pathInfo.moduleStart, me = pathInfo.moduleEnd; mi != me; ++mi)
543  {
544  ModuleInfo &moduleInfo = m_modules[mi];
545  moduleInfo.passed = update.passed || ((mi-pathInfo.moduleStart) < update.choiceMaker);
546  }
547  }
548 
549  implSort(-1, true);
550 }
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 853 of file FWPSetTableManager.cc.

References data(), FWTableManagerBase::dataChanged(), alignCSCRings::e, alcazmumu_cfi::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().

854 {
855  m_filter = filter;
856 
857  if (m_filter.empty())
858  {
859  // collapse entries when filter is removed
860  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
861  m_entries[i].expandedFilter = false;
862  }
863  else
864  {
865  // Decide whether or not items match the filter.
866  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
867  {
868  PSetData &data = m_entries[i];
869 
870  // First of all decide whether or not we match
871  // the filter.
872  if (strstr(data.label.c_str(), m_filter.c_str()) || strstr(data.value.c_str(), m_filter.c_str()) )
873  data.matches = true;
874  else
875  data.matches = false;
876  }
877 
878  // We reset whether or not a given parent has children that match the
879  // filter, and we recompute the whole information by checking all the
880  // children.
881  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
882  m_entries[i].childMatches = false;
883 
884  std::vector<int> stack;
885  int previousLevel = 0;
886  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
887  {
888  PSetData &data = m_entries[i];
889  // Top level.
890  if (data.parent == (size_t)-1)
891  {
892  previousLevel = 0;
893  // std::cout << "reset stack for top level " << data.label << std::endl;
894  stack.clear();
895  continue;
896  }
897  // If the level is greater than the previous one,
898  // it means we are among the children of the
899  // previous level, hence we push the parent to
900  // the stack.
901  // If the level is not greater than the previous
902  // one it means we have popped out n levels of
903  // parents, where N is the difference between the
904  // new and the old level. In this case we
905  // pop up N parents from the stack.
906  if (data.level > previousLevel)
907  stack.push_back(data.parent);
908  else
909  for (size_t pi = 0, pe = previousLevel - data.level; pi != pe; ++pi)
910  stack.pop_back();
911 
912  if (data.matches && m_entries[stack.back()].childMatches == false)
913  {
914  // printf("match for %s with level %d\n",data.label.c_str(), data.level );
915  for (size_t pi = 0, pe = stack.size(); pi != pe; ++pi)
916  {
917  // printf("set child match to parent %s with level %d \n",m_entries[stack[pi]].label.c_str(), m_entries[stack[pi]].level);
918  m_entries[stack[pi]].childMatches = true;
919 
920  }
921  }
922 
923  previousLevel = data.level;
924  }
925 
926  // expand to matching children
927  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
928  m_entries[i].expandedFilter = m_entries[i].childMatches;
929 
930  }
931 
933 
934  dataChanged();
935 } // 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
double pi
void FWPSetTableManager::updateSchedule ( const edm::ScheduleInfo info)
protected

Definition at line 433 of file FWPSetTableManager.cc.

References edm::ScheduleInfo::availablePaths(), FWPSetTableManager::ModuleInfo::current_pset, FWPSetTableManager::ModuleInfo::dirty, alignCSCRings::e, 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, FWPSetTableManager::ModuleInfo::orig_pset, edm::ScheduleInfo::parametersForModule(), FWPSetTableManager::PSetData::parent, FWPSetTableManager::ModuleInfo::passed, FWPSetTableManager::PathInfo::passed, FWPSetTableManager::PSetData::path, FWPSetTableManager::ModuleInfo::path, EgammaValidation_cff::pathName, FWPSetTableManager::PSetData::pset, recalculateVisibility(), AlCaHLTBitMon_QueryRunRegistry::string, edm::ParameterSet::tbl(), and FWPSetTableManager::PSetData::value.

Referenced by FWPathsPopup::postProcessEvent().

434 {
435  if (!m_entries.empty())
436  return;
437  // Execute only once since the schedule itself
438  // cannot be altered.
439  assert(m_availablePaths.empty());
441 
442  for (size_t i = 0, e = m_availablePaths.size(); i != e; ++i)
443  {
444  PSetData pathEntry;
446  pathEntry.label = pathName;
447  m_pathIndex.insert(std::make_pair(pathName, m_paths.size()));
448 
449  pathEntry.value = "Path";
450  pathEntry.level= 0;
451  pathEntry.parent = -1;
452  pathEntry.path = i;
453  pathEntry.editable = false;
454 
455  PathInfo pathInfo;
456  pathInfo.entryId = m_entries.size();
457  pathInfo.passed = false;
458  pathInfo.moduleStart = m_modules.size();
459  m_paths.push_back(pathInfo);
460 
461  m_parentStack.push_back(m_entries.size());
462  m_entries.push_back(pathEntry);
463 
464  std::vector<std::string> pathModules;
465  info->modulesInPath(pathName, pathModules);
466 
467  for (size_t mi = 0, me = pathModules.size(); mi != me; ++mi)
468  {
469  PSetData moduleEntry;
470 
471  const edm::ParameterSet* ps = info->parametersForModule(pathModules[mi]);
472 
473  const edm::ParameterSet::table& pst = ps->tbl();
474  const edm::ParameterSet::table::const_iterator ti = pst.find("@module_edm_type");
475  if (ti == pst.end())
476  moduleEntry.value = "Unknown module name";
477  else
478  moduleEntry.value = ti->second.getString();
479 
480  moduleEntry.label = pathModules[mi];
481  moduleEntry.parent = m_parentStack.back();
482  moduleEntry.level = m_parentStack.size();
483  moduleEntry.module = mi;
484  moduleEntry.path = i;
485  moduleEntry.editable = false;
486 
487  ModuleInfo moduleInfo;
488  moduleInfo.path = m_paths.size() - 1;
489  moduleInfo.entry = m_entries.size();
490  moduleInfo.passed = false;
491  moduleInfo.dirty = false;
492  moduleInfo.orig_pset = new edm::ParameterSet(*ps);
493  moduleInfo.current_pset = new edm::ParameterSet(*ps);
494  m_modules.push_back(moduleInfo);
495 
496  moduleEntry.pset = moduleInfo.current_pset;
497 
498  m_parentStack.push_back(m_entries.size());
499  m_entries.push_back(moduleEntry);
500  handlePSet(moduleEntry.pset);
501  m_parentStack.pop_back();
502  }
503  m_paths.back().moduleEnd = m_modules.size();
504  m_parentStack.pop_back();
505  }
506 
507  // Nothing is expanded by default.
508  for (size_t i = 0, e = m_entries.size(); i != e; ++i)
509  m_entries[i].expandedUser = false;
510 
511  m_filter = "";
512 
514 } //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
std::vector< PathInfo > m_paths
std::vector< size_t > m_parentStack
std::vector< ModuleInfo > m_modules
std::map< std::string, size_t > m_pathIndex
std::vector< PSetData > m_entries
void handlePSet(edm::ParameterSet *psp)
const edm::ParameterSet * parametersForModule(const std::string &iLabel) const
Definition: ScheduleInfo.cc:83
std::map< std::string, Entry > table
Definition: ParameterSet.h:254
table const & tbl() const
Definition: ParameterSet.h:255
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 195 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 188 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 186 of file FWPSetTableManager.h.

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

FWTextTreeCellRenderer FWPSetTableManager::m_renderer
mutableprivate

Definition at line 197 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 192 of file FWPSetTableManager.h.

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

int FWPSetTableManager::m_selectedRow
private