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 37 of file FWPSetTableManager.h.

Constructor & Destructor Documentation

FWPSetTableManager::FWPSetTableManager ( )

Definition at line 91 of file FWPSetTableManager.cc.

References FWTextTableCellRenderer::getDefaultHighlightGC(), AnalysisDataFormats_SUSYBSMObjects::hc, 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()
susybsm::HSCParticleCollection hc
Definition: classes.h:25
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 579 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().

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

References m_editor, and setSelection().

Referenced by FWPathsPopup::HandleKey().

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

Reimplemented from FWTableManagerBase.

Definition at line 103 of file FWPSetTableManager.h.

References edm::false.

103 { return false ; }
volatile std::atomic< bool > shutdown_flag 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 737 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, FWPSetTableManager::PSetData::path, cmsHarvester::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.

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

Definition at line 188 of file FWPSetTableManager.cc.

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

Referenced by handleEntry().

189 {
190  std::stringstream ss;
191  ss << v;
192  data.value = ss.str();
193  m_entries.push_back(data);
194 }
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 197 of file FWPSetTableManager.cc.

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

Referenced by handleEntry().

198 {
199  std::stringstream ss;
200  ss << "[";
201  for (size_t ii = 0, ie = v.size(); ii != ie; ++ii)
202  {
203  if (quotes)
204  ss << "\"";
205  ss << v[ii];
206  if (quotes)
207  ss << "\"";
208  if (ii + 1 != ie)
209  ss << ", ";
210  }
211  ss << "]";
212  data.value = ss.str();
213  m_entries.push_back(data);
214 }
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 150 of file FWPSetTableManager.h.

References m_entries.

Referenced by FWPathsPopup::scheduleReloadEvent().

150 { 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 628 of file FWPSetTableManager.cc.

References numberOfColumns().

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

Referenced by handlePSet().

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

171 {
172  edm::ParameterSet &ps = * psp;
173 
174  typedef edm::ParameterSet::table::const_iterator TIterator;
175  for (TIterator i = ps.tbl().begin(), e = ps.tbl().end(); i != e; ++i)
176  handleEntry(i->second, i->first);
177 
178  typedef edm::ParameterSet::psettable::const_iterator PSIterator;
179  for (PSIterator i = ps.psetTable().begin(), e = ps.psetTable().end(); i != e; ++i)
180  handlePSetEntry(const_cast<edm::ParameterSetEntry&>(i->second), i->first);
181 
182  typedef edm::ParameterSet::vpsettable::const_iterator VPSIterator;
183  for (VPSIterator i = ps.vpsetTable().begin(), e = ps.vpsetTable().end(); i != e; ++i)
184  handleVPSetEntry(const_cast<edm::VParameterSetEntry&>(i->second), i->first);
185 }
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:257
vpsettable const & vpsetTable() const
Definition: ParameterSet.h:260
table const & tbl() const
Definition: ParameterSet.h:254
void FWPSetTableManager::handlePSetEntry ( 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(), relval_steps::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, edm::ParameterSetEntry::psetForUpdate(), FWPSetTableManager::PSetData::tracked, and FWPSetTableManager::PSetData::type.

Referenced by handlePSet().

115 {
116  PSetData data;
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.psetForUpdate();
125  data.editable = false;
126  m_parentStack.push_back(m_entries.size());
127  m_entries.push_back(data);
128 
129  handlePSet(data.pset);
130  m_parentStack.pop_back();
131 }
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
void handlePSet(edm::ParameterSet *psp)
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
ParameterSet & psetForUpdate()
void FWPSetTableManager::handleVPSetEntry ( edm::VParameterSetEntry entry,
const std::string &  key 
)
private

Definition at line 133 of file FWPSetTableManager.cc.

References data(), alignCSCRings::e, FWPSetTableManager::PSetData::editable, handlePSet(), i, edm::VParameterSetEntry::isTracked(), relval_steps::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, contentValuesCheck::ss, FWPSetTableManager::PSetData::tracked, FWPSetTableManager::PSetData::type, edm::VParameterSetEntry::vpset(), and edm::VParameterSetEntry::vpsetForUpdate().

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 << "]";
153  PSetData vdata;
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  vdata.pset = &entry.vpsetForUpdate()[i];
162  m_parentStack.push_back(m_entries.size());
163  m_entries.push_back(vdata);
164  handlePSet( & entry.vpsetForUpdate()[i]);
165  m_parentStack.pop_back();
166  }
167  m_parentStack.pop_back();
168 }
int i
Definition: DBlmapReader.cc:9
std::vector< PathInfo > m_paths
std::vector< size_t > m_parentStack
std::vector< ParameterSet > & vpsetForUpdate()
std::vector< ModuleInfo > m_modules
std::vector< PSetData > & data()
std::vector< PSetData > m_entries
std::vector< ParameterSet > const & vpset() const
returns the VPSet
void handlePSet(edm::ParameterSet *psp)
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
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 709 of file FWPSetTableManager.cc.

Referenced by update().

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

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

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

References m_modules.

Referenced by FWPathsPopup::scheduleReloadEvent().

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

Number of columns in the table.

Implements FWTableManagerBase.

Definition at line 659 of file FWPSetTableManager.cc.

Referenced by getTitles().

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

Number of rows in the table.

Implements FWTableManagerBase.

Definition at line 655 of file FWPSetTableManager.cc.

References m_row_to_index.

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

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

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

References m_selectedRow.

646 {
647  return m_selectedRow == row;
648 }
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 641 of file FWPSetTableManager.cc.

References m_selectedColumn.

Referenced by FWPathsPopup::cellClicked().

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

Definition at line 637 of file FWPSetTableManager.cc.

References m_selectedRow.

Referenced by FWPathsPopup::cellClicked().

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

Definition at line 557 of file FWPSetTableManager.cc.

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

Referenced by FWPathsPopup::FWPathsPopup().

558 {
559  m_editor = editor;
561 }
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 714 of file FWPSetTableManager.cc.

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

Referenced by FWPathsPopup::cellClicked().

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

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

651 {
652  return unsorted;
653 }
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 519 of file FWPSetTableManager.cc.

References FWPSetTableManager::PathUpdate::choiceMaker, fwLog, implSort(), cmsHarvester::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__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.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(), MatrixUtil.Steps::overwrite(), FWPathsPopup::postEvent(), 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().

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

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

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

Definition at line 432 of file FWPSetTableManager.cc.

References assert(), 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::postEvent().

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

Member Data Documentation

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

Definition at line 194 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 187 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 185 of file FWPSetTableManager.h.

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

FWTextTreeCellRenderer FWPSetTableManager::m_renderer
mutableprivate

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

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

int FWPSetTableManager::m_selectedRow
private