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 RTreeViewer * | NewViewer (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< RTreeDrawInvokeTimer > | fTimer |
! timer to invoke tree draw | |
std::string | fTitle |
! title of tree viewer | |
TTree * | fTree {nullptr} |
! TTree to show | |
std::shared_ptr< ROOT::RWebWindow > | fWebWindow |
! web window | |
Friends | |
class | RTreeDrawInvokeTimer |
class | RTreeDrawMonitoring |
#include <ROOT/RTreeViewer.hxx>
using ROOT::RTreeViewer::PerformDrawCallback_t = std::function<void(const std::string &)> |
Definition at line 41 of file RTreeViewer.hxx.
RTreeViewer::RTreeViewer | ( | TTree * | tree = nullptr | ) |
constructor
Definition at line 115 of file RTreeViewer.cxx.
|
virtual |
destructor
Definition at line 135 of file RTreeViewer.cxx.
|
private |
Add branches to config.
Definition at line 328 of file RTreeViewer.cxx.
|
private |
Format item name used in draw expression.
Definition at line 309 of file RTreeViewer.cxx.
|
inline |
Returns default hierarchy browser visibility.
Definition at line 79 of file RTreeViewer.hxx.
|
inline |
Definition at line 59 of file RTreeViewer.hxx.
std::string RTreeViewer::GetWindowAddr | ( | ) | const |
Return address of web window used for tree viewer.
Definition at line 239 of file RTreeViewer.cxx.
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.
|
private |
Invoke tree drawing.
Definition at line 400 of file RTreeViewer.cxx.
|
static |
Create new viewer Method used for plugin.
Definition at line 502 of file RTreeViewer.cxx.
|
private |
Send data for initialize viewer.
Definition at line 264 of file RTreeViewer.cxx.
|
private |
Send progress to the client.
Definition at line 470 of file RTreeViewer.cxx.
|
inline |
Definition at line 73 of file RTreeViewer.hxx.
|
inline |
Configures default hierarchy browser visibility, only has effect before showing web window.
Definition at line 76 of file RTreeViewer.hxx.
|
inline |
Definition at line 58 of file RTreeViewer.hxx.
void RTreeViewer::SetTree | ( | TTree * | tree | ) |
assign new TTree to the viewer
Definition at line 143 of file RTreeViewer.cxx.
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.
always_start_new_browser | configured, starts new window |
args | arguments to display |
Definition at line 221 of file RTreeViewer.cxx.
Suggest to use branch in the gui Normally just assign as last edited expression.
Definition at line 188 of file RTreeViewer.cxx.
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.
Suggest to use leaf in the gui Normally just assign as last edited expression.
Definition at line 164 of file RTreeViewer.cxx.
void RTreeViewer::Update | ( | ) |
Update tree viewer in all web displays.
Definition at line 256 of file RTreeViewer.cxx.
|
private |
Update RConfig data.
Definition at line 379 of file RTreeViewer.cxx.
|
private |
receive data from client
Definition at line 283 of file RTreeViewer.cxx.
|
private |
react on new connection
Definition at line 275 of file RTreeViewer.cxx.
|
friend |
Definition at line 37 of file RTreeViewer.hxx.
|
friend |
Definition at line 36 of file RTreeViewer.hxx.
|
private |
! callback invoked when tree draw performed
Definition at line 94 of file RTreeViewer.hxx.
|
private |
! configuration, exchanged between client and server
Definition at line 93 of file RTreeViewer.hxx.
|
private |
! last send progress to client
Definition at line 95 of file RTreeViewer.hxx.
|
private |
! show TTree hierarchy
Definition at line 92 of file RTreeViewer.hxx.
|
private |
! timer to invoke tree draw
Definition at line 96 of file RTreeViewer.hxx.
|
private |
! title of tree viewer
Definition at line 90 of file RTreeViewer.hxx.
|
private |
! TTree to show
Definition at line 89 of file RTreeViewer.hxx.
|
private |
! web window
Definition at line 91 of file RTreeViewer.hxx.