25using namespace std::string_literals;
 
   30   std::unique_ptr<Browsable::RHolder> 
fObject; 
 
   46   std::string 
GetKind()
 const override { 
return "tree"s; }
 
   52   bool DrawElement(std::shared_ptr<Browsable::RElement> &elem, 
const std::string & = 
"")
 override 
   57      auto obj = elem->GetObject();
 
   71      TTree *new_tree = 
nullptr;
 
   72      std::string expr = elem->GetContent(
"tree");
 
   74      auto branch = obj->Get<
TBranch>();
 
   75      auto leaf = obj->Get<
TLeaf>();
 
   81            expr = branch->GetFullName().Data();
 
   83         new_tree = leaf->GetBranch()->
GetTree();
 
   86      } 
else if (browsable) {
 
   92      if (!new_tree || expr.empty())
 
   95      if (new_tree != 
tree) {
 
   96         fObject = std::make_unique<Browsable::TObjectHolder>(new_tree);
 
  112   std::shared_ptr<RBrowserWidget> 
Create(
const std::string &
name) 
final 
  114      return std::make_shared<RBrowserTreeWidget>(
name);
 
~RBrowserTreeProvider()=default
std::shared_ptr< RBrowserWidget > Create(const std::string &name) final
@ kActTree
can be shown in tree viewer
bool ActivateWidget(const std::string &title, const std::string &kind="")
Activate widget in RBrowser One should specify title and (optionally) kind of widget like "tcanvas" o...
void Show(const RWebDisplayArgs &args="", bool always_start_new_browser=false)
Show or update viewer in web window If web browser already started - just refresh drawing like "reloa...
void SetTree(TTree *tree)
assign new TTree to the viewer
std::string GetWindowAddr() const
Return URL address of web window used for tree viewer.
bool SuggestExpression(const std::string &expr)
Suggest to use expression in the gui Normally just assign as last edited expression.
void SetCallback(PerformDrawCallback_t func)
void SetTitle(const std::string &title)
void SetShowHierarchy(bool on=true)
Configures default hierarchy browser visibility, only has effect before showing web window.
A TTree is a list of TBranches.
virtual TString GetFullName() const
Return the 'full' name of the branch.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
TBranch * GetBranch() const
const char * GetName() const override
Returns name of object.
const char * Data() const
A TTree represents a columnar dataset.
virtual TTree * GetTree() const
TVirtualBranchBrowsable is a base class (not really abstract, but useless by itself) for helper objec...
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.