Belle II Software  release-05-01-25
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 48 of file ObjectInfo.cc.

49 {
50  if (!obj)
51  B2ERROR("ObjectInfo::getInfo() got null?");
52  if (auto relObj = dynamic_cast<const RelationsObject*>(obj)) {
53  return relObj->getInfoHTML();
54  } else if (auto vertex = dynamic_cast<const genfit::GFRaveVertex*>(obj)) {
55  return "<b>V</b>=" + HTML::getString(vertex->getPos()) + "<br>" +
56  TString::Format("pVal=%e", TMath::Prob(vertex->getChi2(), vertex->getNdf()));
57  }
58  return callStringMethod(obj, "getInfoHTML");
59 }

◆ getName()

TString getName ( const TObject *  obj)

human-readable name (e.g.

pi+)

Definition at line 38 of file ObjectInfo.cc.

genfit::GFRaveVertex
GFRaveVertex class.
Definition: GFRaveVertex.h:48
Belle2::RelationsInterface
Defines interface for accessing relations of objects in StoreArray.
Definition: RelationsObject.h:102