Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::RTreeViewer Class Reference

Web-based ROOT TTree viewer.

Definition at line 34 of file RTreeViewer.hxx.

Classes

struct  RBranchInfo
 
struct  RConfig
 

Public Types

using PerformDrawCallback_t = std::function< void(const std::string &)>
 

Public Member Functions

 RTreeViewer (TTree *tree=nullptr)
 constructor
 
virtual ~RTreeViewer ()
 destructor
 
bool GetShowHierarchy () const
 Returns default hierarchy browser visibility.
 
const std::string & GetTitle () const
 
std::string GetWindowAddr () const
 Return address of web window used for tree viewer.
 
std::string GetWindowUrl (bool remote)
 Return URL of web window used for tree viewer See ROOT::RWebWindow::GetUrl docu for more details.
 
void SetCallback (PerformDrawCallback_t func)
 
void SetShowHierarchy (bool on=true)
 Configures default hierarchy browser visibility, only has effect before showing web window.
 
void SetTitle (const std::string &title)
 
void SetTree (TTree *tree)
 assign new TTree to the viewer
 
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 "reload" button does If no web window exists or.
 
bool SuggestBranch (const TBranch *branch)
 Suggest to use branch in the gui Normally just assign as last edited expression.
 
bool SuggestExpression (const std::string &expr)
 Suggest to use expression in the gui Normally just assign as last edited expression.
 
bool SuggestLeaf (const TLeaf *leaf)
 Suggest to use leaf in the gui Normally just assign as last edited expression.
 
void Update ()
 Update tree viewer in all web displays.
 

Static Public Member Functions

static RTreeViewerNewViewer (TTree *)
 Create new viewer Method used for plugin.
 

Private Member Functions

void AddBranches (TObjArray *branches)
 Add branches to config.
 
std::string FormatItemName (const std::string &name)
 Format item name used in draw expression.
 
void InvokeTreeDraw ()
 Invoke tree drawing.
 
void SendCfg (unsigned connid)
 Send data for initialize viewer.
 
void SendProgress (Double_t nevent=0.)
 Send progress to the client.
 
void UpdateConfig ()
 Update RConfig data.
 
void WebWindowCallback (unsigned connid, const std::string &arg)
 receive data from client
 
void WebWindowConnect (unsigned connid)
 react on new connection
 

Private Attributes

PerformDrawCallback_t fCallback
 ! callback invoked when tree draw performed
 
RConfig fCfg
 ! configuration, exchanged between client and server
 
std::string fLastSendProgress
 ! last send progress to client
 
bool fShowHierarchy {false}
 ! show TTree hierarchy
 
std::unique_ptr< RTreeDrawInvokeTimerfTimer
 ! timer to invoke tree draw
 
std::string fTitle
 ! title of tree viewer
 
TTreefTree {nullptr}
 ! TTree to show
 
std::shared_ptr< ROOT::RWebWindowfWebWindow
 ! web window
 

Friends

class RTreeDrawInvokeTimer
 
class RTreeDrawMonitoring
 

#include <ROOT/RTreeViewer.hxx>

Member Typedef Documentation

◆ PerformDrawCallback_t

using ROOT::RTreeViewer::PerformDrawCallback_t = std::function<void(const std::string &)>

Definition at line 41 of file RTreeViewer.hxx.

Constructor & Destructor Documentation

◆ RTreeViewer()

RTreeViewer::RTreeViewer ( TTree tree = nullptr)

constructor

Definition at line 115 of file RTreeViewer.cxx.

◆ ~RTreeViewer()

RTreeViewer::~RTreeViewer ( )
virtual

destructor

Definition at line 135 of file RTreeViewer.cxx.

Member Function Documentation

◆ AddBranches()

void RTreeViewer::AddBranches ( TObjArray branches)
private

Add branches to config.

Definition at line 328 of file RTreeViewer.cxx.

◆ FormatItemName()

std::string RTreeViewer::FormatItemName ( const std::string &  name)
private

Format item name used in draw expression.

Definition at line 309 of file RTreeViewer.cxx.

◆ GetShowHierarchy()

bool ROOT::RTreeViewer::GetShowHierarchy ( ) const
inline

Returns default hierarchy browser visibility.

Definition at line 79 of file RTreeViewer.hxx.

◆ GetTitle()

const std::string & ROOT::RTreeViewer::GetTitle ( ) const
inline

Definition at line 59 of file RTreeViewer.hxx.

◆ GetWindowAddr()

std::string RTreeViewer::GetWindowAddr ( ) const

Return address of web window used for tree viewer.

Definition at line 239 of file RTreeViewer.cxx.

◆ GetWindowUrl()

std::string RTreeViewer::GetWindowUrl ( bool  remote)

Return URL of web window used for tree viewer See ROOT::RWebWindow::GetUrl docu for more details.

Definition at line 248 of file RTreeViewer.cxx.

◆ InvokeTreeDraw()

void RTreeViewer::InvokeTreeDraw ( )
private

Invoke tree drawing.

Definition at line 400 of file RTreeViewer.cxx.

◆ NewViewer()

RTreeViewer * RTreeViewer::NewViewer ( TTree t)
static

Create new viewer Method used for plugin.

Definition at line 502 of file RTreeViewer.cxx.

◆ SendCfg()

void RTreeViewer::SendCfg ( unsigned  connid)
private

Send data for initialize viewer.

Definition at line 264 of file RTreeViewer.cxx.

◆ SendProgress()

void RTreeViewer::SendProgress ( Double_t  nevent = 0.)
private

Send progress to the client.

Definition at line 470 of file RTreeViewer.cxx.

◆ SetCallback()

void ROOT::RTreeViewer::SetCallback ( PerformDrawCallback_t  func)
inline

Definition at line 73 of file RTreeViewer.hxx.

◆ SetShowHierarchy()

void ROOT::RTreeViewer::SetShowHierarchy ( bool  on = true)
inline

Configures default hierarchy browser visibility, only has effect before showing web window.

Definition at line 76 of file RTreeViewer.hxx.

◆ SetTitle()

void ROOT::RTreeViewer::SetTitle ( const std::string &  title)
inline

Definition at line 58 of file RTreeViewer.hxx.

◆ SetTree()

void RTreeViewer::SetTree ( TTree tree)

assign new TTree to the viewer

Definition at line 143 of file RTreeViewer.cxx.

◆ Show()

void RTreeViewer::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 "reload" button does If no web window exists or.

Parameters
always_start_new_browserconfigured, starts new window
argsarguments to display

Definition at line 221 of file RTreeViewer.cxx.

◆ SuggestBranch()

bool RTreeViewer::SuggestBranch ( const TBranch branch)

Suggest to use branch in the gui Normally just assign as last edited expression.

Definition at line 188 of file RTreeViewer.cxx.

◆ SuggestExpression()

bool RTreeViewer::SuggestExpression ( const std::string &  expr)

Suggest to use expression in the gui Normally just assign as last edited expression.

Definition at line 204 of file RTreeViewer.cxx.

◆ SuggestLeaf()

bool RTreeViewer::SuggestLeaf ( const TLeaf leaf)

Suggest to use leaf in the gui Normally just assign as last edited expression.

Definition at line 164 of file RTreeViewer.cxx.

◆ Update()

void RTreeViewer::Update ( )

Update tree viewer in all web displays.

Definition at line 256 of file RTreeViewer.cxx.

◆ UpdateConfig()

void RTreeViewer::UpdateConfig ( )
private

Update RConfig data.

Definition at line 379 of file RTreeViewer.cxx.

◆ WebWindowCallback()

void RTreeViewer::WebWindowCallback ( unsigned  connid,
const std::string &  arg 
)
private

receive data from client

Definition at line 283 of file RTreeViewer.cxx.

◆ WebWindowConnect()

void RTreeViewer::WebWindowConnect ( unsigned  connid)
private

react on new connection

Definition at line 275 of file RTreeViewer.cxx.

Friends And Related Symbol Documentation

◆ RTreeDrawInvokeTimer

friend class RTreeDrawInvokeTimer
friend

Definition at line 37 of file RTreeViewer.hxx.

◆ RTreeDrawMonitoring

friend class RTreeDrawMonitoring
friend

Definition at line 36 of file RTreeViewer.hxx.

Member Data Documentation

◆ fCallback

PerformDrawCallback_t ROOT::RTreeViewer::fCallback
private

! callback invoked when tree draw performed

Definition at line 94 of file RTreeViewer.hxx.

◆ fCfg

RConfig ROOT::RTreeViewer::fCfg
private

! configuration, exchanged between client and server

Definition at line 93 of file RTreeViewer.hxx.

◆ fLastSendProgress

std::string ROOT::RTreeViewer::fLastSendProgress
private

! last send progress to client

Definition at line 95 of file RTreeViewer.hxx.

◆ fShowHierarchy

bool ROOT::RTreeViewer::fShowHierarchy {false}
private

! show TTree hierarchy

Definition at line 92 of file RTreeViewer.hxx.

◆ fTimer

std::unique_ptr<RTreeDrawInvokeTimer> ROOT::RTreeViewer::fTimer
private

! timer to invoke tree draw

Definition at line 96 of file RTreeViewer.hxx.

◆ fTitle

std::string ROOT::RTreeViewer::fTitle
private

! title of tree viewer

Definition at line 90 of file RTreeViewer.hxx.

◆ fTree

TTree* ROOT::RTreeViewer::fTree {nullptr}
private

! TTree to show

Definition at line 89 of file RTreeViewer.hxx.

◆ fWebWindow

std::shared_ptr<ROOT::RWebWindow> ROOT::RTreeViewer::fWebWindow
private

! web window

Definition at line 91 of file RTreeViewer.hxx.

Libraries for ROOT::RTreeViewer:

The documentation for this class was generated from the following files: