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 ()
 
 FWViewManagerBase (const FWViewManagerBase &)=delete
 
void modelChangesComingSlot ()
 
void modelChangesDoneSlot ()
 
const FWViewManagerBaseoperator= (const FWViewManagerBase &)=delete
 
void setChangeManager (FWModelChangeManager *iCM)
 
void setColorManager (FWColorManager *iCM)
 
virtual void setContext (const fireworks::Context *x)
 
virtual ~FWViewManagerBase ()
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
 FWConfigurable (const FWConfigurable &)=delete
 
const FWConfigurableoperator= (const FWConfigurable &)=delete
 
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

◆ Items

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

Container for the event items which have a table.

Definition at line 51 of file FWTableViewManager.h.

◆ TableEntries

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

Definition at line 53 of file FWTableViewManager.h.

◆ TableSpecs

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.

◆ Views

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

Definition at line 91 of file FWTableViewManager.h.

Constructor & Destructor Documentation

◆ FWTableViewManager() [1/3]

FWTableViewManager::FWTableViewManager ( FWGUIManager iGUIMgr)

Definition at line 45 of file FWTableViewManager.cc.

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

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

◆ ~FWTableViewManager()

FWTableViewManager::~FWTableViewManager ( )
override

Definition at line 201 of file FWTableViewManager.cc.

201 {}

◆ FWTableViewManager() [2/3]

FWTableViewManager::FWTableViewManager ( )
protected

◆ FWTableViewManager() [3/3]

FWTableViewManager::FWTableViewManager ( const FWTableViewManager )
private

Member Function Documentation

◆ addTo()

void FWTableViewManager::addTo ( FWConfiguration iTo) const
overridevirtual

Implements FWConfigurable.

Definition at line 428 of file FWTableViewManager.cc.

References addToImpl(), and m_views.

428  {
429  // if there are views, it's the job of the first view to store
430  // the configuration (this is to avoid ordering problems in the
431  // case of multiple views)
432  if (!m_views.empty())
433  return;
434  // if there are no views, then it's up to us to store the column
435  // formats. This is done in addToImpl, which can be called by
436  // FWTableView as well
437  addToImpl(iTo);
438 }
void addToImpl(FWConfiguration &) const

◆ addToImpl()

void FWTableViewManager::addToImpl ( FWConfiguration iTo) const

Definition at line 440 of file FWTableViewManager.cc.

References FWConfiguration::addKeyValue(), mps_check::columns, mps_splice::entry, kConfigTypeNames, m_tableFormats, AlCaHLTBitMon_QueryRunRegistry::string, dqmiodumpindices::typeName, and dqmiodumpindices::typeNames.

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

440  {
442  char prec[100];
443 
444  for (TableSpecs::const_iterator iType = m_tableFormats.begin(), iType_end = m_tableFormats.end(); iType != iType_end;
445  ++iType) {
446  const std::string &typeName = iType->first;
447  typeNames.addValue(typeName);
449  const TableEntries &entries = iType->second;
450  for (size_t ei = 0, ee = entries.size(); ei != ee; ++ei) {
451  const TableEntry &entry = entries[ei];
452  columns.addValue(entry.name);
453  columns.addValue(entry.expression);
454  columns.addValue((snprintf(prec, 100, "%d", entry.precision), prec));
455  }
457  }
459 }
std::vector< TableEntry > TableEntries
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
static const std::string kConfigTypeNames

◆ beingDestroyed()

void FWTableViewManager::beingDestroyed ( const FWViewBase iView)
private

Definition at line 350 of file FWTableViewManager.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and m_views.

Referenced by buildView().

350  {
351  for (Views::iterator it = m_views.begin(), itEnd = m_views.end(); it != itEnd; ++it) {
352  if (it->get() == iView) {
353  m_views.erase(it);
354  return;
355  }
356  }
357 }

◆ buildView()

class FWViewBase * FWTableViewManager::buildView ( TEveWindowSlot *  iParent,
const std::string &  type 
)

Definition at line 341 of file FWTableViewManager.cc.

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

Referenced by FWTableViewManager().

341  {
342  TEveManager::TRedrawDisabler disableRedraw(gEve);
343  auto view = std::make_shared<FWTableView>(iParent, this);
344  view->setBackgroundColor(colorManager().background());
345  m_views.push_back(view);
346  view->beingDestroyed_.connect(std::bind(&FWTableViewManager::beingDestroyed, this, std::placeholders::_1));
347  return view.get();
348 }
FWColorManager & colorManager() const
void beingDestroyed(const FWViewBase *)

◆ colorsChanged()

void FWTableViewManager::colorsChanged ( )
overrideprotectedvirtual

Notify all the views that colors have changed

Implements FWViewManagerBase.

Definition at line 411 of file FWTableViewManager.cc.

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

411  {
412  for (size_t i = 0, e = m_views.size(); i != e; ++i)
413  m_views[i].get()->resetColors(colorManager());
414 }
FWColorManager & colorManager() const

◆ dataChanged()

void FWTableViewManager::dataChanged ( )
protected

Definition at line 416 of file FWTableViewManager.cc.

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

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

416  {
417  for (size_t i = 0, e = m_views.size(); i != e; ++i)
418  m_views[i].get()->dataChanged();
419 }

◆ destroyItem()

void FWTableViewManager::destroyItem ( const FWEventItem iItem)

Remove iItem from the list

iItem the item to be removed.

Definition at line 379 of file FWTableViewManager.cc.

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

Referenced by newItem().

379  {
380  // remove the item from the list
381  // FIXME: why doesn't it use erase?? Boh...
382  for (size_t i = 0, e = m_items.size(); i != e; ++i) {
383  if (m_items[i] != iItem)
384  continue;
385  m_items[i] = nullptr;
386  }
387 
388  notifyViews();
389 }

◆ items()

const Items& FWTableViewManager::items ( ) const
inline

◆ modelChangesComing()

void FWTableViewManager::modelChangesComing ( )
overrideprotectedvirtual

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

Implements FWViewManagerBase.

Definition at line 400 of file FWTableViewManager.cc.

400 { gEve->DisableRedraw(); }

◆ modelChangesDone()

void FWTableViewManager::modelChangesDone ( )
overrideprotectedvirtual

Implements FWViewManagerBase.

Definition at line 402 of file FWTableViewManager.cc.

References dataChanged().

402  {
403  gEve->EnableRedraw();
404  // tell the views to update their item lists
405  // FIXME: doesn't this need to call updateItems as well
406  // and hence notifyViews would be more appropriate?? Boh...
407  dataChanged();
408 }

◆ newItem()

void FWTableViewManager::newItem ( const FWEventItem iItem)
overridevirtual

Implements FWViewManagerBase.

Definition at line 359 of file FWTableViewManager.cc.

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

359  {
360  m_items.push_back(iItem);
361  iItem->goingToBeDestroyed_.connect(std::bind(&FWTableViewManager::destroyItem, this, std::placeholders::_1));
362  notifyViews();
363 }
FWItemChangeSignal goingToBeDestroyed_
Definition: FWEventItem.h:197
void destroyItem(const FWEventItem *item)

◆ notifyViews()

void FWTableViewManager::notifyViews ( void  )

Tell the views to update their item list.

Definition at line 366 of file FWTableViewManager.cc.

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

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

366  {
367  for (size_t i = 0, e = m_views.size(); i != e; ++i) {
368  FWTableView *view = m_views[i].get();
369  view->updateItems();
370  view->dataChanged();
371  }
372 }

◆ operator=()

const FWTableViewManager& FWTableViewManager::operator= ( const FWTableViewManager )
private

◆ removeAllItems()

void FWTableViewManager::removeAllItems ( void  )

Remove all items present in the view.

This should watch the FWEventItemsManager::goingToClearItems_ signal.

Definition at line 395 of file FWTableViewManager.cc.

References m_items, and notifyViews().

Referenced by CmsShowMainBase::setupViewManagers().

395  {
396  m_items.clear();
397  notifyViews();
398 }

◆ setFrom()

void FWTableViewManager::setFrom ( const FWConfiguration iFrom)
overridevirtual

Implements FWConfigurable.

Definition at line 461 of file FWTableViewManager.cc.

References cms::cuda::assert(), mps_check::columns, electrons_cff::expr, fwLog, patZpeak::handle, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, kConfigTypeNames, fwlog::kWarning, Skims_PA_cff::name, AlCaHLTBitMon_QueryRunRegistry::string, table(), dqmiodumpindices::typeNames, and FWConfiguration::valueForKey().

Referenced by FWTableView::setFrom().

461  {
462  try {
464  if (typeNames == nullptr) {
465  fwLog(fwlog::kWarning) << "no table column configuration stored, using defaults\n";
466  return;
467  }
468 
469  //NOTE: FWTableViewTableManagers hold pointers into m_tableFormats so if we
470  // clear it those pointers would be invalid
471  // instead we will just clear the lists and fill them with their new values
472  //m_tableFormats.clear();
473  for (FWConfiguration::StringValuesIt iType = typeNames->stringValues()->begin(),
474  iTypeEnd = typeNames->stringValues()->end();
475  iType != iTypeEnd;
476  ++iType) {
477  //std::cout << "reading type " << *iType << std::endl;
478  const FWConfiguration *columns = iFrom.valueForKey(*iType);
479  assert(columns != nullptr);
480  TableHandle handle = table(iType->c_str());
481  for (FWConfiguration::StringValuesIt it = columns->stringValues()->begin(),
482  itEnd = columns->stringValues()->end();
483  it != itEnd;
484  ++it) {
485  const std::string &name = *it++;
486  const std::string &expr = *it++;
487  int prec = atoi(it->c_str());
488  handle.column(name.c_str(), prec, expr.c_str());
489  }
490  }
491  } catch (...) {
492  // No info about types in the configuration; this is not an
493  // error, it merely means that the types are handled by the
494  // first FWTableView.
495  }
496 }
TableHandle table(const char *collection)
assert(be >=bs)
#define fwLog(_level_)
Definition: fwLog.h:45
const FWConfiguration * valueForKey(const std::string &iKey) const
StringValues::const_iterator StringValuesIt
static const std::string kConfigTypeNames

◆ supportedTypesAndRepresentations()

FWTypeToRepresentations FWTableViewManager::supportedTypesAndRepresentations ( ) const
overridevirtual

Implements FWViewManagerBase.

Definition at line 421 of file FWTableViewManager.cc.

421  {
422  FWTypeToRepresentations returnValue;
423  return returnValue;
424 }

◆ table()

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 219 of file FWTableViewManager.cc.

References patZpeak::handle, m_tableFormats, and Skims_PA_cff::name.

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

219  {
220  TableHandle handle(name, m_tableFormats);
221  return handle;
222 }

◆ tableFormats() [1/2]

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 276 of file FWTableViewManager.cc.

References FWTableViewManager::TableEntry::BOOL, patZpeak::handle, FWTableViewManager::TableEntry::INT, submitPVResolutionJobs::key, visualization-live-secondInstance_cfg::m, m_tableFormats, runTheMatrix::ret, AlCaHLTBitMon_QueryRunRegistry::string, table(), and tableFormatsImpl().

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

276  {
277  static const std::string isint("int");
278  static const std::string isbool("bool");
279  static const std::string isdouble("double");
280  static const std::string isfloat("float");
281 
282  std::string keyType = key.name();
283 
284  TableSpecs::iterator ret = m_tableFormats.find(keyType);
285 
286  if (ret != m_tableFormats.end())
287  return ret;
288 
289  ret = tableFormatsImpl(key); // recursive search for base classes
290 
291  if (ret != m_tableFormats.end())
292  return ret;
293 
294  TableHandle handle = table(keyType.c_str());
295  edm::TypeFunctionMembers functionMembers(key);
296  for (auto const &member : functionMembers) {
297  edm::FunctionWithDict m(member);
298  if (m.functionParameterSize())
299  continue;
300  if (!m.isPublic())
301  continue;
302  if (!m.isConst())
303  continue;
304  if (m.finalReturnType().name() == isint)
305  handle.column(m.name().c_str(), TableEntry::INT);
306  else if (m.finalReturnType().name() == isbool)
307  handle.column(m.name().c_str(), TableEntry::BOOL);
308  else if (m.finalReturnType().name() == isdouble)
309  handle.column(m.name().c_str(), 5);
310  else if (m.finalReturnType().name() == isfloat)
311  handle.column(m.name().c_str(), 3);
312  }
313  edm::TypeDataMembers dataMembers(key);
314  for (auto const &member : dataMembers) {
315  edm::MemberWithDict m(member);
316  if (!m.isPublic())
317  continue;
318  if (!m.isConst())
319  continue;
320  if (m.typeOf().name() == isint)
321  handle.column(m.name().c_str(), TableEntry::INT);
322  else if (m.typeOf().name() == isbool)
323  handle.column(m.name().c_str(), TableEntry::BOOL);
324  else if (m.typeOf().name() == isdouble)
325  handle.column(m.name().c_str(), 5);
326  else if (m.typeOf().name() == isfloat)
327  handle.column(m.name().c_str(), 3);
328  }
329  return m_tableFormats.find(keyType);
330 }
TableHandle table(const char *collection)
ret
prodAgent to be discontinued
TableSpecs::iterator tableFormatsImpl(const edm::TypeWithDict &key)
key
prepare the HTCondor submission files and eventually submit them

◆ tableFormats() [2/2]

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 337 of file FWTableViewManager.cc.

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

337  {
338  return tableFormats(edm::TypeWithDict::byName(key.GetName()));
339 }
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
TableSpecs::iterator tableFormats(const edm::TypeWithDict &key)
key
prepare the HTCondor submission files and eventually submit them

◆ tableFormatsImpl()

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 247 of file FWTableViewManager.cc.

References newFWLiteAna::base, submitPVResolutionJobs::key, m_tableFormats, and runTheMatrix::ret.

Referenced by tableFormats().

247  {
248  TableSpecs::iterator ret = m_tableFormats.find(key.name());
249  if (ret != m_tableFormats.end())
250  return ret;
251 
252  // if there is no exact match for the type, try the base classes
253  edm::TypeBases bases(key);
254  for (auto const &base : bases) {
256  if (ret != m_tableFormats.end())
257  return ret;
258  }
259 
260  return m_tableFormats.end();
261 }
ret
prodAgent to be discontinued
base
Main Program
Definition: newFWLiteAna.py:92
TableSpecs::iterator tableFormatsImpl(const edm::TypeWithDict &key)
key
prepare the HTCondor submission files and eventually submit them

Friends And Related Function Documentation

◆ FWTableView

friend class FWTableView
friend

Definition at line 39 of file FWTableViewManager.h.

◆ FWTableViewTableManager

friend class FWTableViewTableManager
friend

Definition at line 40 of file FWTableViewManager.h.

Member Data Documentation

◆ kConfigColumns

const std::string FWTableViewManager::kConfigColumns
static

Definition at line 80 of file FWTableViewManager.h.

◆ kConfigTypeNames

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

Definition at line 79 of file FWTableViewManager.h.

Referenced by addToImpl(), and setFrom().

◆ m_items

Items FWTableViewManager::m_items
protected

Definition at line 94 of file FWTableViewManager.h.

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

◆ m_tableFormats

TableSpecs FWTableViewManager::m_tableFormats
protected

◆ m_views

Views FWTableViewManager::m_views
protected