CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
FWTableViewManager Class Reference

#include <Fireworks/Core/interface/FWTableViewManager.h>

Inheritance diagram for FWTableViewManager:
FWViewManagerBase FWConfigurable

Classes

struct  TableEntry
 
class  TableHandle
 

Public Types

typedef std::vector< const FWEventItem * > Items
 
typedef std::vector< TableEntryTableEntries
 
typedef std::map< std::string, TableEntriesTableSpecs
 

Public Member Functions

void addTo (FWConfiguration &) const override
 
void addToImpl (FWConfiguration &) const
 
FWViewBasebuildView (TEveWindowSlot *iParent, const std::string &type)
 
void destroyItem (const FWEventItem *item)
 
 FWTableViewManager (FWGUIManager *)
 
const Itemsitems () const
 
void newItem (const FWEventItem *) override
 
void notifyViews ()
 
void removeAllItems (void)
 
void setFrom (const FWConfiguration &) override
 
FWTypeToRepresentations supportedTypesAndRepresentations () const override
 
TableSpecs::iterator tableFormats (const edm::TypeWithDict &key)
 
TableSpecs::iterator tableFormats (const TClass &key)
 
 ~FWTableViewManager () override
 
- Public Member Functions inherited from FWViewManagerBase
void colorsChangedSlot ()
 
const fireworks::Contextcontext () const
 
virtual void eventBegin ()
 
virtual void eventEnd ()
 
void modelChangesComingSlot ()
 
void modelChangesDoneSlot ()
 
void setChangeManager (FWModelChangeManager *iCM)
 
void setColorManager (FWColorManager *iCM)
 
virtual void setContext (const fireworks::Context *x)
 
virtual ~FWViewManagerBase ()
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
virtual ~FWConfigurable ()
 

Static Public Attributes

static const std::string kConfigColumns
 
static const std::string kConfigTypeNames = "typeNames"
 

Protected Types

typedef std::vector< std::shared_ptr< FWTableView > > Views
 

Protected Member Functions

void colorsChanged () override
 
void dataChanged ()
 
 FWTableViewManager ()
 
void modelChangesComing () override
 
void modelChangesDone () override
 
- Protected Member Functions inherited from FWViewManagerBase
FWModelChangeManagerchangeManager () const
 
FWColorManagercolorManager () const
 
void * createInstanceOf (const TClass *iBaseClass, const char *iNameOfClass)
 
 FWViewManagerBase ()
 

Protected Attributes

Items m_items
 
TableSpecs m_tableFormats
 
Views m_views
 

Private Member Functions

void beingDestroyed (const FWViewBase *)
 
 FWTableViewManager (const FWTableViewManager &)
 
const FWTableViewManageroperator= (const FWTableViewManager &)
 
TableHandle table (const char *collection)
 
TableSpecs::iterator tableFormatsImpl (const edm::TypeWithDict &key)
 

Friends

class FWTableView
 
class FWTableViewTableManager
 

Detailed Description

Description: Base class for a Manger for a specific type of View

Usage: <usage>

Definition at line 38 of file FWTableViewManager.h.

Member Typedef Documentation

typedef std::vector<const FWEventItem *> FWTableViewManager::Items

Container for the event items which have a table.

Definition at line 51 of file FWTableViewManager.h.

Container for the description of the columns of a given table.

Definition at line 53 of file FWTableViewManager.h.

typedef std::map<std::string, TableEntries> FWTableViewManager::TableSpecs

Type for the collection specific (i.e. those that do not use default) table definition.

Definition at line 56 of file FWTableViewManager.h.

typedef std::vector<std::shared_ptr<FWTableView> > FWTableViewManager::Views
protected

Definition at line 91 of file FWTableViewManager.h.

Constructor & Destructor Documentation

FWTableViewManager::FWTableViewManager ( FWGUIManager iGUIMgr)

Definition at line 46 of file FWTableViewManager.cc.

References FWTableViewManager::TableEntry::BOOL, buildView(), f, FWViewType::idToName(), FWTableViewManager::TableEntry::INT, FWViewType::kTable, FWGUIManager::registerViewBuilder(), and table().

48 {
50  f=boost::bind(&FWTableViewManager::buildView,
51  this, _1, _2);
53 
54  // ---------- for some object types, we have default table contents ----------
55  table("reco::GenParticle").
56  column("pT", 1, "pt").
57  column("eta", 3).
58  column("phi", 3).
59  column("status", TableEntry::INT).
60  column("pdgId", TableEntry::INT);
61 
62  table("reco::Muon").
63  column("q", TableEntry::INT, "charge").
64  column("pT", 1, "pt").
65  column("global", TableEntry::BOOL, "isGlobalMuon").
66  column("tracker", TableEntry::BOOL, "isTrackerMuon").
67  column("SA", TableEntry::BOOL, "isStandAloneMuon").
68  column("calo", TableEntry::BOOL, "isCaloMuon").
69  column("tr pt", 1, "track().pt()").
70  column("eta", 3).
71  column("phi", 3).
72  column("matches", TableEntry::INT, "numberOfMatches('SegmentArbitration')").
73  column("d0", 3, "track().d0()").
74  column("d0 / d0Err", 3, "track().d0() / track().d0Error()");
75 
76  table("reco::GsfElectron").
77  column("q", TableEntry::INT, "charge").
78  column("pT", 1, "pt").
79  column("eta", 3).
80  column("phi", 3).
81  column("E/p", 3, "eSuperClusterOverP").
82  column("H/E", 3, "hadronicOverEm").
83  column("fbrem", 3, "(trackMomentumAtVtx().R() - trackMomentumOut().R()) / trackMomentumAtVtx().R()").
84  column("dei", 3, "deltaEtaSuperClusterTrackAtVtx()").
85  column("dpi", 3, "deltaPhiSuperClusterTrackAtVtx()");
86 
87  table("reco::Photon").
88  column("pT", 1, "pt").
89  column("eta", 3).
90  column("phi", 3).
91  column("H/E", 3, "hadronicOverEm");
92 
93  table("reco::CaloJet").
94  column("pT", 1, "pt").
95  column("eta", 3).
96  column("phi", 3).
97  column("ECAL", 1, "p4().E() * emEnergyFraction()").
98  column("HCAL", 1, "p4().E() * energyFractionHadronic()").
99  column("emf", 3, "emEnergyFraction()");
100 
101  table("reco::Jet").
102  column("pT", 1, "pt").
103  column("eta", 3).
104  column("phi", 3).
105  column("electronEnergyFraction", 3, "electronEnergyFraction()").
106  column("muonEnergyFraction", 3, "muonEnergyFraction()").
107  column("photonEnergyFraction", 3, "photonEnergyFraction()");
108 
109  table("reco::MET").
110  column("et", 1).
111  column("phi", 3).
112  column("sumEt", 1).
113  column("mEtSig", 3);
114 
115  table("reco::Track").
116  column("q", TableEntry::INT, "charge").
117  column("pT", 1, "pt").
118  column("eta", 3).
119  column("phi", 3).
120  column("d0", 5).
121  column("d0Err", 5, "d0Error").
122  column("dz", 5).
123  column("dzErr", 5, "dzError").
124  column("vx", 5).
125  column("vy", 5).
126  column("vz", 5).
127  column("pixel hits", TableEntry::INT, "hitPattern().numberOfValidPixelHits()").
128  column("strip hits", TableEntry::INT, "hitPattern().numberOfValidStripHits()").
129  column("chi2", 3).
130  column("ndof", TableEntry::INT);
131 
132  table("DTRecSegment4D").
133  column("wheel", 0, "chamberId.wheel").
134  column("station", 0, "chamberId.station").
135  column("sector", 0, "chamberId.sector").
136  column("t0phi", 2, "phiSegment.t0").
137  column("t0theta", 2, "zSegment.t0").
138  column("hasPhi", -2, "hasPhi").
139  column("hasZed", -2, "hasZed").
140  column("chi2", 2, "chi2").
141  column("dof", 0, "degreesOfFreedom");
142 
143  table("DTRecHit1DPair").
144  column("wheel", 0, "wireId.wheel").
145  column("station", 0, "wireId.station").
146  column("sector", 0, "wireId.sector").
147  column("SL", 0, "wireId.superlayer").
148  column("layer", 0, "wireId.layer").
149  column("wire", 0, "wireId.wire").
150  column("digiTime", 2, "digiTime");
151 
152  table("CSCSegment").
153  column("endcap", 0, "cscDetId.endcap").
154  column("station", 0, "cscDetId.station").
155  column("ring", 0, "cscDetId.ring").
156  column("chamber", 0, "cscDetId.chamber");
157 
158  table("reco::Vertex").
159  column("x", 5).
160  column("xError", 5).
161  column("y", 5).
162  column("yError", 5).
163  column("z", 5).
164  column("zError", 5).
165  column("tracks", TableEntry::INT, "tracksSize").
166  column("chi2", 3).
167  column("ndof", 3);
168 
169  table("CaloTower").
170  column("emEt", 1).
171  column("hadEt", 1).
172  column("et", 1, "Et").
173  column("eta", 3).
174  column("phi", 3);
175 
176  table("CaloRecHit").
177  column("id", TableEntry::INT,"detid.rawId").
178  column("energy",3).
179  column("time",3).
180  column("flags",TableEntry::INT,"flags");
181 
182  table("reco::PFCandidate").
183  column("et", 1, "Et").
184  column("eta", 3).
185  column("phi", 3).
186  column("ecalEnergy", 3,"ecalEnergy()").
187  column("hcalEnergy", 3,"hcalEnergy()").
188  column("track pt", 3,"trackRef().pt()");
189 
190  table("reco::Electron").
191  column("pT", 1, "pt").
192  column("eta", 3).
193  column("phi", 3).
194  column("E/p", 3, "eSuperClusterOverP").
195  column("H/E", 3, "hadronicOverEm").
196  column("fbrem", 3,"(trackMomentumAtVtx().R() - trackMomentumOut().R()) / trackMomentumAtVtx().R()" ).
197  column("dei",3, "deltaEtaSuperClusterTrackAtVtx" ).
198  column("dpi", 3, "deltaPhiSuperClusterTrackAtVtx()").
199  column("charge", 0, "charge").
200  column("isPF", 0, "isPF()").
201  column("sieie", 3, "sigmaIetaIeta").
202  column("isNotConv", 1, "passConversionVeto");
203 
204  table("pat::PackedCandidate").
205  column("pT", 1, "pt").
206  column("eta", 3).
207  column("phi", 3).
208  column("pdgId", 0).
209  column("charge", 0).
210  column("dxy", 3).
211  column("dzAssociatedPV", 3, "dzAssociatedPV()");
212 }
TableHandle table(const char *collection)
boost::function2< FWViewBase *, TEveWindowSlot *, const std::string & > ViewBuildFunctor
Definition: FWGUIManager.h:98
void registerViewBuilder(const std::string &iName, ViewBuildFunctor &iBuilder)
double f[11][100]
static const std::string & idToName(int)
Definition: FWViewType.cc:89
FWViewBase * buildView(TEveWindowSlot *iParent, const std::string &type)
FWTableViewManager::~FWTableViewManager ( )
override

Definition at line 214 of file FWTableViewManager.cc.

215 {
216 }
FWTableViewManager::FWTableViewManager ( )
protected
FWTableViewManager::FWTableViewManager ( const FWTableViewManager )
private

Member Function Documentation

void FWTableViewManager::addTo ( FWConfiguration iTo) const
overridevirtual

Implements FWConfigurable.

Definition at line 487 of file FWTableViewManager.cc.

References addToImpl(), and m_views.

Referenced by items().

488 {
489  // if there are views, it's the job of the first view to store
490  // the configuration (this is to avoid ordering problems in the
491  // case of multiple views)
492  if (!m_views.empty())
493  return;
494  // if there are no views, then it's up to us to store the column
495  // formats. This is done in addToImpl, which can be called by
496  // FWTableView as well
497  addToImpl(iTo);
498 }
void addToImpl(FWConfiguration &) const
void FWTableViewManager::addToImpl ( FWConfiguration iTo) const

Definition at line 501 of file FWTableViewManager.cc.

References FWConfiguration::addKeyValue(), FWConfiguration::addValue(), mps_check::columns, mps_splice::entry, FWTableViewManager::TableEntry::expression, kConfigTypeNames, m_tableFormats, FWTableViewManager::TableEntry::name, FWTableViewManager::TableEntry::precision, AlCaHLTBitMon_QueryRunRegistry::string, and FWViewBase::typeName().

Referenced by FWTableView::addTo(), addTo(), and items().

502 {
503  FWConfiguration typeNames(1);
504  char prec[100];
505 
506  for (TableSpecs::const_iterator
507  iType = m_tableFormats.begin(),
508  iType_end = m_tableFormats.end();
509  iType != iType_end; ++iType)
510  {
511  const std::string &typeName = iType->first;
512  typeNames.addValue(typeName);
514  const TableEntries &entries = iType->second;
515  for (size_t ei = 0, ee = entries.size(); ei != ee; ++ei)
516  {
517  const TableEntry &entry = entries[ei];
518  columns.addValue(entry.name);
519  columns.addValue(entry.expression);
520  columns.addValue((snprintf(prec, 100, "%d", entry.precision), prec));
521  }
522  iTo.addKeyValue(typeName, columns);
523  }
524  iTo.addKeyValue(kConfigTypeNames, typeNames);
525 }
std::vector< TableEntry > TableEntries
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
static const std::string kConfigTypeNames
void FWTableViewManager::beingDestroyed ( const FWViewBase iView)
private

Definition at line 380 of file FWTableViewManager.cc.

References m_views.

Referenced by buildView().

381 {
382  for(Views::iterator it = m_views.begin(), itEnd = m_views.end();
383  it != itEnd;
384  ++it)
385  {
386  if(it->get() == iView)
387  {
388  m_views.erase(it);
389  return;
390  }
391  }
392 }
class FWViewBase * FWTableViewManager::buildView ( TEveWindowSlot *  iParent,
const std::string &  type 
)

Definition at line 368 of file FWTableViewManager.cc.

References beingDestroyed(), FWViewManagerBase::colorManager(), and m_views.

Referenced by FWTableViewManager().

369 {
370  TEveManager::TRedrawDisabler disableRedraw(gEve);
371  auto view = std::make_shared<FWTableView>(iParent, this);
372  view->setBackgroundColor(colorManager().background());
373  m_views.push_back(view);
374  view->beingDestroyed_.connect(boost::bind(&FWTableViewManager::beingDestroyed,
375  this, _1));
376  return view.get();
377 }
FWColorManager & colorManager() const
void beingDestroyed(const FWViewBase *)
void FWTableViewManager::colorsChanged ( )
overrideprotectedvirtual

Notify all the views that colors have changed

Implements FWViewManagerBase.

Definition at line 464 of file FWTableViewManager.cc.

References FWViewManagerBase::colorManager(), MillePedeFileConverter_cfg::e, mps_fire::i, and m_views.

465 {
466  for(size_t i = 0, e = m_views.size(); i != e; ++i)
467  m_views[i].get()->resetColors(colorManager());
468 }
FWColorManager & colorManager() const
void FWTableViewManager::dataChanged ( )
protected

Definition at line 471 of file FWTableViewManager.cc.

References MillePedeFileConverter_cfg::e, mps_fire::i, and m_views.

Referenced by FWTableView::addColumn(), FWTableView::deleteColumn(), modelChangesDone(), and FWTableView::modifyColumn().

472 {
473  for(size_t i = 0, e = m_views.size(); i != e; ++i)
474  m_views[i].get()->dataChanged();
475 }
void FWTableViewManager::destroyItem ( const FWEventItem iItem)

Remove iItem from the list

iItem the item to be removed.

Definition at line 421 of file FWTableViewManager.cc.

References MillePedeFileConverter_cfg::e, mps_fire::i, m_items, and notifyViews().

Referenced by newItem().

422 {
423  // remove the item from the list
424  // FIXME: why doesn't it use erase?? Boh...
425  for (size_t i = 0, e = m_items.size(); i != e; ++i)
426  {
427  if (m_items[i] != iItem)
428  continue;
429  m_items[i] = nullptr;
430  }
431 
432  notifyViews();
433 }
const Items& FWTableViewManager::items ( ) const
inline
void FWTableViewManager::modelChangesComing ( )
overrideprotectedvirtual

Called when models have changed and so the display must be updated.

Implements FWViewManagerBase.

Definition at line 447 of file FWTableViewManager.cc.

448 {
449  gEve->DisableRedraw();
450 }
void FWTableViewManager::modelChangesDone ( )
overrideprotectedvirtual

Implements FWViewManagerBase.

Definition at line 453 of file FWTableViewManager.cc.

References dataChanged().

454 {
455  gEve->EnableRedraw();
456  // tell the views to update their item lists
457  // FIXME: doesn't this need to call updateItems as well
458  // and hence notifyViews would be more appropriate?? Boh...
459  dataChanged();
460 }
void FWTableViewManager::newItem ( const FWEventItem iItem)
overridevirtual

Implements FWViewManagerBase.

Definition at line 395 of file FWTableViewManager.cc.

References destroyItem(), FWEventItem::goingToBeDestroyed_, m_items, and notifyViews().

396 {
397  m_items.push_back(iItem);
398  iItem->goingToBeDestroyed_.connect(boost::bind(&FWTableViewManager::destroyItem,
399  this, _1));
400  notifyViews();
401 }
FWItemChangeSignal goingToBeDestroyed_
Definition: FWEventItem.h:218
void destroyItem(const FWEventItem *item)
void FWTableViewManager::notifyViews ( void  )

Tell the views to update their item list.

Definition at line 405 of file FWTableViewManager.cc.

References FWTableView::dataChanged(), MillePedeFileConverter_cfg::e, mps_fire::i, m_views, and FWTableView::updateItems().

Referenced by destroyItem(), items(), newItem(), and removeAllItems().

406 {
407  for(size_t i = 0, e = m_views.size(); i != e; ++i)
408  {
409  FWTableView *view = m_views[i].get();
410  view->updateItems();
411  view->dataChanged();
412  }
413 }
void updateItems()
Definition: FWTableView.cc:547
void dataChanged()
Definition: FWTableView.cc:586
const FWTableViewManager& FWTableViewManager::operator= ( const FWTableViewManager )
private
void FWTableViewManager::removeAllItems ( void  )

Remove all items present in the view.

This should watch the FWEventItemsManager::goingToClearItems_ signal.

Definition at line 440 of file FWTableViewManager.cc.

References m_items, and notifyViews().

Referenced by CmsShowMainBase::setupViewManagers().

441 {
442  m_items.clear();
443  notifyViews();
444 }
void FWTableViewManager::setFrom ( const FWConfiguration iFrom)
overridevirtual

Implements FWConfigurable.

Definition at line 528 of file FWTableViewManager.cc.

References FWTableViewManager::TableHandle::column(), mps_check::columns, jets_cff::expr, fwLog, cmsBatch::handle, kConfigTypeNames, fwlog::kWarning, dataset::name, AlCaHLTBitMon_QueryRunRegistry::string, FWConfiguration::stringValues(), table(), and FWConfiguration::valueForKey().

Referenced by items(), and FWTableView::setFrom().

529 {
530  try
531  {
532  const FWConfiguration *typeNames = iFrom.valueForKey(kConfigTypeNames);
533  if (typeNames == nullptr)
534  {
535  fwLog(fwlog::kWarning) << "no table column configuration stored, using defaults\n";
536  return;
537  }
538 
539  //NOTE: FWTableViewTableManagers hold pointers into m_tableFormats so if we
540  // clear it those pointers would be invalid
541  // instead we will just clear the lists and fill them with their new values
542  //m_tableFormats.clear();
544  iType = typeNames->stringValues()->begin(),
545  iTypeEnd = typeNames->stringValues()->end();
546  iType != iTypeEnd; ++iType)
547  {
548  //std::cout << "reading type " << *iType << std::endl;
549  const FWConfiguration *columns = iFrom.valueForKey(*iType);
550  assert(columns != nullptr);
551  TableHandle handle = table(iType->c_str());
553  it = columns->stringValues()->begin(),
554  itEnd = columns->stringValues()->end();
555  it != itEnd; ++it)
556  {
557  const std::string &name = *it++;
558  const std::string &expr = *it++;
559  int prec = atoi(it->c_str());
560  handle.column(name.c_str(), prec, expr.c_str());
561  }
562  }
563  }
564  catch (...)
565  {
566  // No info about types in the configuration; this is not an
567  // error, it merely means that the types are handled by the
568  // first FWTableView.
569  }
570 }
const StringValues * stringValues() const
TableHandle table(const char *collection)
#define fwLog(_level_)
Definition: fwLog.h:50
const FWConfiguration * valueForKey(const std::string &iKey) const
StringValues::const_iterator StringValuesIt
static const std::string kConfigTypeNames
FWTypeToRepresentations FWTableViewManager::supportedTypesAndRepresentations ( ) const
overridevirtual

Implements FWViewManagerBase.

Definition at line 478 of file FWTableViewManager.cc.

References kConfigTypeNames, and AlCaHLTBitMon_QueryRunRegistry::string.

479 {
480  FWTypeToRepresentations returnValue;
481  return returnValue;
482 }
FWTableViewManager::TableHandle FWTableViewManager::table ( const char *  name)
private

Define a new table for type name

name the typename of the object contained in the table.

Returns
the TableHandle for this table, which can be used to create columns via the columns() method. All subsequent calls for method column will be relative to this table.

If a table with the same name is already there, its entries are reset.

Definition at line 235 of file FWTableViewManager.cc.

References cmsBatch::handle, and m_tableFormats.

Referenced by FWTableViewManager(), setFrom(), and tableFormats().

236 {
237  TableHandle handle(name, m_tableFormats);
238  return handle;
239 }
FWTableViewManager::TableSpecs::iterator FWTableViewManager::tableFormats ( const edm::TypeWithDict key)

Find the entries for a given type key, possibly recursively searching recursively in the class hierarchy for a base class that matches.

  • If the recursion succeeds return the specific table.
  • Otherwise, create a dummy table with most common properties.

key the edm::TypeWithDict of the collection for which we want to have the key definition.

FIXME: how about actually inspecting the type and show all the int and floats if no description is found??

Definition at line 297 of file FWTableViewManager.cc.

References FWTableViewManager::TableEntry::BOOL, FWTableViewManager::TableHandle::column(), edm::FunctionWithDict::finalReturnType(), edm::FunctionWithDict::functionParameterSize(), cmsBatch::handle, FWTableViewManager::TableEntry::INT, edm::MemberWithDict::isConst(), edm::FunctionWithDict::isConst(), edm::MemberWithDict::isPublic(), edm::FunctionWithDict::isPublic(), funct::m, m_tableFormats, edm::MemberWithDict::name(), edm::FunctionWithDict::name(), edm::TypeWithDict::name(), AlCaHLTBitMon_QueryRunRegistry::string, table(), tableFormatsImpl(), and edm::MemberWithDict::typeOf().

Referenced by items(), FWTableView::selectCollection(), and tableFormats().

298 {
299  static const std::string isint("int");
300  static const std::string isbool("bool");
301  static const std::string isdouble("double");
302  static const std::string isfloat("float");
303 
304  std::string keyType = key.name();
305 
306  TableSpecs::iterator ret = m_tableFormats.find(keyType);
307 
308  if (ret != m_tableFormats.end())
309  return ret;
310 
311  ret = tableFormatsImpl(key); // recursive search for base classes
312 
313  if (ret != m_tableFormats.end())
314  return ret;
315 
316  TableHandle handle = table(keyType.c_str());
317  edm::TypeFunctionMembers functionMembers(key);
318  for (auto const& member : functionMembers)
319  {
320  edm::FunctionWithDict m(member);
321  if (m.functionParameterSize())
322  continue;
323  if (!m.isPublic())
324  continue;
325  if (!m.isConst())
326  continue;
327  if (m.finalReturnType().name() == isint)
328  handle.column(m.name().c_str(), TableEntry::INT);
329  else if (m.finalReturnType().name() == isbool)
330  handle.column(m.name().c_str(), TableEntry::BOOL);
331  else if (m.finalReturnType().name() == isdouble)
332  handle.column(m.name().c_str(), 5);
333  else if (m.finalReturnType().name() == isfloat)
334  handle.column(m.name().c_str(), 3);
335  }
336  edm::TypeDataMembers dataMembers(key);
337  for (auto const& member : dataMembers)
338  {
339  edm::MemberWithDict m(member);
340  if (!m.isPublic())
341  continue;
342  if (!m.isConst())
343  continue;
344  if (m.typeOf().name() == isint)
345  handle.column(m.name().c_str(), TableEntry::INT);
346  else if (m.typeOf().name() == isbool)
347  handle.column(m.name().c_str(), TableEntry::BOOL);
348  else if (m.typeOf().name() == isdouble)
349  handle.column(m.name().c_str(), 5);
350  else if (m.typeOf().name() == isfloat)
351  handle.column(m.name().c_str(), 3);
352  }
353  return m_tableFormats.find(keyType);
354 }
TableHandle table(const char *collection)
std::string name() const
TableSpecs::iterator tableFormatsImpl(const edm::TypeWithDict &key)
FWTableViewManager::TableSpecs::iterator FWTableViewManager::tableFormats ( const TClass &  key)

Helper function which uses TClass rather than edm::TypeWithDict.

Otherwise identical to FWTableViewManager::tableFormats(const TClass &key).

Definition at line 362 of file FWTableViewManager.cc.

References edm::TypeWithDict::byName(), and tableFormats().

363 {
364  return tableFormats(edm::TypeWithDict::byName(key.GetName()));
365 }
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:82
TableSpecs::iterator tableFormats(const edm::TypeWithDict &key)
FWTableViewManager::TableSpecs::iterator FWTableViewManager::tableFormatsImpl ( const edm::TypeWithDict key)
private

Helper function to do recursive lookup of specialized table description for a given type key.

Definition at line 265 of file FWTableViewManager.cc.

References runEdmFileComparison::base, m_tableFormats, and edm::TypeWithDict::name().

Referenced by tableFormats().

266 {
267  TableSpecs::iterator ret = m_tableFormats.find(key.name());
268  if (ret != m_tableFormats.end())
269  return ret;
270 
271  // if there is no exact match for the type, try the base classes
272  edm::TypeBases bases(key);
273  for (auto const& base : bases)
274  {
275  ret = tableFormatsImpl(edm::BaseWithDict(base).typeOf());
276  if (ret != m_tableFormats.end())
277  return ret;
278  }
279 
280  return m_tableFormats.end();
281 }
std::string name() const
TableSpecs::iterator tableFormatsImpl(const edm::TypeWithDict &key)
base
Make Sure CMSSW is Setup ##.

Friends And Related Function Documentation

friend class FWTableView
friend

Definition at line 40 of file FWTableViewManager.h.

friend class FWTableViewTableManager
friend

Definition at line 41 of file FWTableViewManager.h.

Member Data Documentation

const std::string FWTableViewManager::kConfigColumns
static

Definition at line 80 of file FWTableViewManager.h.

const std::string FWTableViewManager::kConfigTypeNames = "typeNames"
static

Definition at line 79 of file FWTableViewManager.h.

Referenced by addToImpl(), setFrom(), and supportedTypesAndRepresentations().

Items FWTableViewManager::m_items
protected

Definition at line 94 of file FWTableViewManager.h.

Referenced by destroyItem(), items(), newItem(), and removeAllItems().

TableSpecs FWTableViewManager::m_tableFormats
protected
Views FWTableViewManager::m_views
protected