Belle II Software  release-08-01-10
Belle2::ObjectInfo Namespace Reference

Return information on objects, for use by InfoWidget, Eve titles (popups) etc. More...

Functions

TString getName (const TObject *obj)
 human-readable name (e.g. More...
 
TString getIdentifier (const TObject *obj)
 Where is this object in the datastore?
 
TString getInfo (const TObject *obj)
 Get object info HTML (e.g. More...
 
TString getTitle (const TObject *obj)
 Get plain text for TEve object titles (shown on mouse-over).
 
std::pair< std::string, int > getDataStorePosition (const TObject *obj)
 return entry name & index for arrays, with index = -1 for objects.
 

Detailed Description

Return information on objects, for use by InfoWidget, Eve titles (popups) etc.

Expands on RelationsObject::getInfoHTML()/getName() by also providing info on e.g. genfit2::Track objects.

Function Documentation

◆ getInfo()

TString getInfo ( const TObject *  obj)

Get object info HTML (e.g.

via RelationsObject::getInfoHTML()).

Definition at line 55 of file ObjectInfo.cc.

56 {
57  if (!obj)
58  B2ERROR("ObjectInfo::getInfo() got null?");
59  if (auto relObj = dynamic_cast<const RelationsObject*>(obj)) {
60  return relObj->getInfoHTML();
61  } else if (auto vertex = dynamic_cast<const genfit::GFRaveVertex*>(obj)) {
62  return "<b>V</b>=" + HTML::getString(ROOT::Math::XYZVector(vertex->getPos())) + "<br>" +
63  TString::Format("pVal=%e", TMath::Prob(vertex->getChi2(), vertex->getNdf()));
64  }
65  return callStringMethod(obj, "getInfoHTML");
66 }
Defines interface for accessing relations of objects in StoreArray.
GFRaveVertex class.
Definition: GFRaveVertex.h:48

◆ getName()

TString getName ( const TObject *  obj)

human-readable name (e.g.

pi+)

Definition at line 45 of file ObjectInfo.cc.