16 #include <boost/bind.hpp>
19 #include "TEveManager.h"
21 #include "Reflex/Base.h"
54 table(
"reco::GenParticle").
55 column(
"pT", 1,
"pt").
63 column(
"pT", 1,
"pt").
68 column(
"tr pt", 1,
"track().pt()").
71 column(
"matches",
TableEntry::INT,
"numberOfMatches('SegmentArbitration')").
72 column(
"d0", 3,
"track().d0()").
73 column(
"d0 / d0Err", 3,
"track().d0() / track().d0Error()");
75 table(
"reco::GsfElectron").
77 column(
"pT", 1,
"pt").
80 column(
"E/p", 3,
"eSuperClusterOverP").
81 column(
"H/E", 3,
"hadronicOverEm").
82 column(
"fbrem", 3,
"(trackMomentumAtVtx().R() - trackMomentumOut().R()) / trackMomentumAtVtx().R()").
83 column(
"dei", 3,
"deltaEtaSuperClusterTrackAtVtx()").
84 column(
"dpi", 3,
"deltaPhiSuperClusterTrackAtVtx()");
86 table(
"reco::Photon").
87 column(
"pT", 1,
"pt").
90 column(
"H/E", 3,
"hadronicOverEm");
92 table(
"reco::CaloJet").
93 column(
"pT", 1,
"pt").
96 column(
"ECAL", 1,
"p4().E() * emEnergyFraction()").
97 column(
"HCAL", 1,
"p4().E() * energyFractionHadronic()").
98 column(
"emf", 3,
"emEnergyFraction()");
101 column(
"pT", 1,
"pt").
111 table(
"reco::Track").
113 column(
"pT", 1,
"pt").
117 column(
"d0Err", 5,
"d0Error").
119 column(
"dzErr", 5,
"dzError").
123 column(
"pixel hits",
TableEntry::INT,
"hitPattern().numberOfValidPixelHits()").
124 column(
"strip hits",
TableEntry::INT,
"hitPattern().numberOfValidStripHits()").
128 table(
"reco::Vertex").
142 column(
"et", 1,
"Et").
203 FWTableViewManager::TableSpecs::iterator
211 for (Reflex::Base_Iterator it = key.Base_Begin(); it != key.Base_End(); ++it)
234 FWTableViewManager::TableSpecs::iterator
237 std::string keyType = key.Name(Reflex::SCOPED);
250 for (Reflex::Member_Iterator mi = key.Member_Begin(),
251 me = key.Member_End();
254 if (mi->FunctionParameterSize())
260 if (mi->TypeOf().ReturnType().Name() ==
"int")
262 else if (mi->TypeOf().ReturnType().Name() ==
"bool")
264 else if (mi->TypeOf().ReturnType().Name() ==
"double")
265 handle.
column(mi->Name().c_str(), 5);
266 else if (mi->TypeOf().ReturnType().Name() ==
"float")
267 handle.
column(mi->Name().c_str(), 3);
277 FWTableViewManager::TableSpecs::iterator
280 return tableFormats(Reflex::Type::ByName(key.GetName()));
286 TEveManager::TRedrawDisabler disableRedraw(gEve);
287 boost::shared_ptr<FWTableView> view(
new FWTableView(iParent,
this));
302 if(it->get() == iView)
365 gEve->DisableRedraw();
371 gEve->EnableRedraw();
422 for (TableSpecs::const_iterator
425 iType != iType_end; ++iType)
427 const std::string &
typeName = iType->first;
431 for (
size_t ei = 0, ee = entries.size(); ei != ee; ++ei)
462 iType != iTypeEnd; ++iType)
466 assert(columns != 0);
473 const std::string &
name = *it++;
474 const std::string &expr = *it++;
475 int prec = atoi(it->c_str());
476 handle.
column(name.c_str(), prec, expr.c_str());
const StringValues * stringValues() const
void addToImpl(FWConfiguration &) const
TableHandle table(const char *collection)
virtual FWTypeToRepresentations supportedTypesAndRepresentations() const
TableSpecs m_tableFormats
void setFrom(const FWConfiguration &)
virtual void newItem(const FWEventItem *)
TableHandle & column(const char *formula, int precision, const char *name)
const std::string & typeName() const
FWItemChangeSignal goingToBeDestroyed_
FWColorManager & colorManager() const
boost::function2< FWViewBase *, TEveWindowSlot *, const std::string & > ViewBuildFunctor
void registerViewBuilder(const std::string &iName, ViewBuildFunctor &iBuilder)
virtual ~FWTableViewManager()
std::pair< std::string, MonitorElement * > entry
TableSpecs::iterator tableFormatsImpl(const Reflex::Type &key)
std::vector< TableEntry > TableEntries
void removeAllItems(void)
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
void addTo(FWConfiguration &) const
FWConfiguration & addValue(const std::string &)
virtual void modelChangesDone()
virtual void colorsChanged()
void destroyItem(const FWEventItem *item)
virtual void modelChangesComing()
static const std::string & idToName(int)
const FWConfiguration * valueForKey(const std::string &iKey) const
StringValues::const_iterator StringValuesIt
static const std::string kConfigTypeNames
TableSpecs::iterator tableFormats(const Reflex::Type &key)
void beingDestroyed(const FWViewBase *)
FWViewBase * buildView(TEveWindowSlot *iParent, const std::string &type)