23using namespace std::string_literals;
69 if (!leaf->GetBranch())
82 if (provider.GetDrawExpr(leaf, expr,
name))
112 if (provider.GetDrawExpr(elem, expr,
name))
115 if (provider.GetDrawExpr(br, expr,
name))
143 if (br && br->GetLeaves())
155 if (provider.GetDrawExpr(browsable, expr,
name))
201 return std::make_shared<TBrLeafElement>(
object);
204 return std::make_shared<TBrElement>(
object);
207 return std::make_shared<TBrElement>(
object);
210 return std::make_shared<TBrBrowsableElement>(
object);
213 return std::make_shared<TTreeElement>(
object);
216 return std::make_shared<TTreeElement>(
object);
TBranchBrowseProvider newTBranchBrowseProvider
virtual std::string GetContent(const std::string &="text")
Returns element content, depends from kind.
EActionKind
Possible actions on double-click.
@ kActDraw6
can be drawn inside ROOT6 canvas
@ kActTree
can be shown in tree viewer
@ kActDraw7
can be drawn inside ROOT7 canvas
Provider of different browsing methods for supported classes.
void RegisterBrowse(const TClass *cl, BrowseFunc_t func)
static std::unique_ptr< RLevelIter > GetCollectionIter(const TCollection *)
Creates iterator for TCollection object.
TObjectElement(TObject *obj, const std::string &name="", bool _hide_childs=false)
Constructor with plain TObject* as argument - ownership is not defined.
std::unique_ptr< RHolder > fObject
virtual const TObject * CheckObject() const
Check if object still exists.
std::string GetDrawExpr() const override
TBrBrowsableElement(std::unique_ptr< RHolder > &br)
~TBrBrowsableElement() override=default
std::unique_ptr< RLevelIter > GetChildsIter() override
Create iterator for childs elements if any.
int GetNumChilds() override
Returns number of childs By default creates iterator and iterates over all items.
Long64_t GetSize() const override
TBrElement(std::unique_ptr< RHolder > &br)
std::string GetDrawExpr() const override
Long64_t GetSize() const override
std::string GetDrawExpr() const override
TBrLeafElement(std::unique_ptr< RHolder > &leaf)
A Branch for the case of an object.
A TTree is a list of TBranches.
Long64_t GetTotalSize(Option_t *option="") const
Return total number of bytes in the branch (including current buffer).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Provider for drawing of branches / leafs in the TTree.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
TBranch * GetBranch() const
const char * Data() const
bool IsCapable(EActionKind action) const override
Check if want to perform action.
virtual std::string GetDrawExpr() const
EActionKind GetDefaultAction() const override
Get default action.
std::string GetContent(const std::string &kind) override
Returns element content, depends from kind.
TTreeBrowsingElement(std::unique_ptr< RHolder > &obj)
EActionKind GetDefaultAction() const override
Get default action.
Long64_t GetSize() const override
TTreeElement(std::unique_ptr< RHolder > &br)
bool IsCapable(EActionKind action) const override
Check if want to perform action.
A TTree represents a columnar dataset.
virtual Long64_t GetTotBytes() const
TVirtualBranchBrowsable is a base class (not really abstract, but useless by itself) for helper objec...
TList * GetLeaves() const
Return list of leaves. If not set up yet we'll create them.