Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Browsable::RProvider Class Reference

Provider of different browsing methods for supported classes.

Author
Sergey Linev S.Lin.nosp@m.ev@g.nosp@m.si.de
Date
2019-10-14
Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!

Definition at line 37 of file RProvider.hxx.

Classes

class  ClassArg
 
class  ProgressHandle
 
struct  StructBrowse
 
struct  StructClass
 
struct  StructDraw6
 
struct  StructDraw7
 
struct  StructFile
 
struct  StructProgress
 

Public Types

using ProgressFunc_t = std::function< void(float progress, void *handle)>
 

Public Member Functions

virtual ~RProvider ()
 Automatically unregister provider from all maps.
 

Static Public Member Functions

static std::shared_ptr< RElementBrowse (std::unique_ptr< RHolder > &obj)
 Create browsable element for the object Created element may take ownership over the object.
 
static std::shared_ptr< RElementBrowseNTuple (const std::string &tuplename, const std::string &filename)
 Start browsing of RNTuple.
 
static bool CanDraw6 (const ClassArg &)
 Return true if provided class can be drawn on the TCanvas.
 
static bool CanDraw7 (const ClassArg &)
 Return true if provided class can be drawn on the RCanvas.
 
static bool CanHaveChilds (const ClassArg &)
 Return true if provided class can have childs.
 
static bool Draw6 (TVirtualPad *subpad, std::unique_ptr< RHolder > &obj, const std::string &opt="")
 Invoke drawing of object on TCanvas sub-pad All existing providers are checked, first checked are class matches (including direct parents)
 
static bool Draw7 (std::shared_ptr< ROOT::Experimental::RPadBase > &subpad, std::unique_ptr< RHolder > &obj, const std::string &opt="")
 Invoke drawing of object on RCanvas sub-pad All existing providers are checked, first checked are class matches (including direct parents)
 
static void ExtendProgressHandle (void *handle, void *handle2)
 Extend progress handle - to be able react on sub item.
 
static std::string GetClassDrawOption (const ClassArg &)
 Return configured draw option for the class.
 
static std::string GetClassIcon (const ClassArg &, bool=false)
 Return icon name for the given class - either class name or TClass *.
 
static bool IsFileFormatSupported (const std::string &extension)
 
static bool NotShowChilds (const ClassArg &)
 Check if showing of sub-elements was disabled.
 
static std::shared_ptr< RElementOpenFile (const std::string &extension, const std::string &fullname)
 
static bool ReportProgress (void *handle, float progress)
 Report running progress Returns true if handling function was invoked Method can be used to detect if there any progress handler assigned.
 
static bool SetClassDrawOption (const ClassArg &, const std::string &)
 Set draw option for the class Return true if entry for the class exists.
 

Protected Types

using BrowseFunc_t = std::function< std::shared_ptr< RElement >(std::unique_ptr< RHolder > &)>
 
using BrowseNTupleFunc_t = std::function< std::shared_ptr< RElement >(const std::string &, const std::string &)>
 
using Draw6Func_t = std::function< bool(TVirtualPad *, std::unique_ptr< RHolder > &, const std::string &)>
 
using Draw7Func_t = std::function< bool(std::shared_ptr< ROOT::Experimental::RPadBase > &, std::unique_ptr< RHolder > &, const std::string &)>
 
using FileFunc_t = std::function< std::shared_ptr< RElement >(const std::string &)>
 

Protected Member Functions

void RegisterBrowse (const TClass *cl, BrowseFunc_t func)
 
void RegisterClass (const std::string &clname, const std::string &iconname, const std::string &browselib="", const std::string &draw6lib="", const std::string &draw7lib="", const std::string &drawopt="")
 
void RegisterDraw6 (const TClass *cl, Draw6Func_t func)
 
void RegisterDraw7 (const TClass *cl, Draw7Func_t func)
 
void RegisterFile (const std::string &extension, FileFunc_t func)
 
void RegisterNTupleFunc (BrowseNTupleFunc_t func)
 

Private Types

using BrowseMap_t = std::multimap< const TClass *, StructBrowse >
 
using ClassMap_t = std::multimap< std::string, StructClass >
 
using Draw6Map_t = std::multimap< const TClass *, StructDraw6 >
 
using Draw7Map_t = std::multimap< const TClass *, StructDraw7 >
 
using FileMap_t = std::multimap< std::string, StructFile >
 
using ProgressVect_t = std::vector< StructProgress >
 

Private Member Functions

template<class Map_t >
void CleanThis (Map_t &fmap)
 

Static Private Member Functions

static BrowseMap_tGetBrowseMap ()
 
static StructClassGetClassEntry (const ClassArg &)
 
static ClassMap_tGetClassMap ()
 
static Draw6Map_tGetDraw6Map ()
 
static Draw7Map_tGetDraw7Map ()
 
static FileMap_tGetFileMap ()
 
static ProgressVect_tGetProgressVect ()
 

Static Private Attributes

static BrowseNTupleFunc_t gNTupleFunc = nullptr
 

Friends

class ProgressHandle
 

#include <ROOT/Browsable/RProvider.hxx>

Inheritance diagram for ROOT::Browsable::RProvider:
[legend]

Member Typedef Documentation

◆ BrowseFunc_t

using ROOT::Browsable::RProvider::BrowseFunc_t = std::function<std::shared_ptr<RElement>(std::unique_ptr<RHolder> &)>
protected

Definition at line 96 of file RProvider.hxx.

◆ BrowseMap_t

using ROOT::Browsable::RProvider::BrowseMap_t = std::multimap<const TClass*, StructBrowse>
private

Definition at line 130 of file RProvider.hxx.

◆ BrowseNTupleFunc_t

using ROOT::Browsable::RProvider::BrowseNTupleFunc_t = std::function<std::shared_ptr<RElement>(const std::string &, const std::string &)>
protected

Definition at line 97 of file RProvider.hxx.

◆ ClassMap_t

using ROOT::Browsable::RProvider::ClassMap_t = std::multimap<std::string, StructClass>
private

Definition at line 128 of file RProvider.hxx.

◆ Draw6Func_t

using ROOT::Browsable::RProvider::Draw6Func_t = std::function<bool(TVirtualPad *, std::unique_ptr<RHolder> &, const std::string &)>
protected

Definition at line 98 of file RProvider.hxx.

◆ Draw6Map_t

using ROOT::Browsable::RProvider::Draw6Map_t = std::multimap<const TClass*, StructDraw6>
private

Definition at line 131 of file RProvider.hxx.

◆ Draw7Func_t

using ROOT::Browsable::RProvider::Draw7Func_t = std::function<bool(std::shared_ptr<ROOT::Experimental::RPadBase> &, std::unique_ptr<RHolder> &, const std::string &)>
protected

Definition at line 99 of file RProvider.hxx.

◆ Draw7Map_t

using ROOT::Browsable::RProvider::Draw7Map_t = std::multimap<const TClass*, StructDraw7>
private

Definition at line 132 of file RProvider.hxx.

◆ FileFunc_t

using ROOT::Browsable::RProvider::FileFunc_t = std::function<std::shared_ptr<RElement>(const std::string &)>
protected

Definition at line 95 of file RProvider.hxx.

◆ FileMap_t

using ROOT::Browsable::RProvider::FileMap_t = std::multimap<std::string, StructFile>
private

Definition at line 129 of file RProvider.hxx.

◆ ProgressFunc_t

using ROOT::Browsable::RProvider::ProgressFunc_t = std::function<void(float progress, void *handle)>

Definition at line 43 of file RProvider.hxx.

◆ ProgressVect_t

Definition at line 133 of file RProvider.hxx.

Constructor & Destructor Documentation

◆ ~RProvider()

RProvider::~RProvider ( )
virtual

Automatically unregister provider from all maps.

Definition at line 82 of file RProvider.cxx.

Member Function Documentation

◆ Browse()

std::shared_ptr< RElement > RProvider::Browse ( std::unique_ptr< RHolder > &  obj)
static

Create browsable element for the object Created element may take ownership over the object.

Definition at line 273 of file RProvider.cxx.

◆ BrowseNTuple()

std::shared_ptr< RElement > RProvider::BrowseNTuple ( const std::string &  tuplename,
const std::string &  filename 
)
static

Start browsing of RNTuple.

Definition at line 301 of file RProvider.cxx.

◆ CanDraw6()

bool RProvider::CanDraw6 ( const ClassArg arg)
static

Return true if provided class can be drawn on the TCanvas.

Definition at line 418 of file RProvider.cxx.

◆ CanDraw7()

bool RProvider::CanDraw7 ( const ClassArg arg)
static

Return true if provided class can be drawn on the RCanvas.

Definition at line 432 of file RProvider.cxx.

◆ CanHaveChilds()

bool RProvider::CanHaveChilds ( const ClassArg arg)
static

Return true if provided class can have childs.

Definition at line 401 of file RProvider.cxx.

◆ CleanThis()

template<class Map_t >
void ROOT::Browsable::RProvider::CleanThis ( Map_t &  fmap)
inlineprivate

Definition at line 146 of file RProvider.hxx.

◆ Draw6()

bool RProvider::Draw6 ( TVirtualPad subpad,
std::unique_ptr< RHolder > &  obj,
const std::string &  opt = "" 
)
static

Invoke drawing of object on TCanvas sub-pad All existing providers are checked, first checked are class matches (including direct parents)

Definition at line 322 of file RProvider.cxx.

◆ Draw7()

bool RProvider::Draw7 ( std::shared_ptr< ROOT::Experimental::RPadBase > &  subpad,
std::unique_ptr< RHolder > &  obj,
const std::string &  opt = "" 
)
static

Invoke drawing of object on RCanvas sub-pad All existing providers are checked, first checked are class matches (including direct parents)

Definition at line 345 of file RProvider.cxx.

◆ ExtendProgressHandle()

void RProvider::ExtendProgressHandle ( void *  handle,
void *  handle2 
)
static

Extend progress handle - to be able react on sub item.

Definition at line 479 of file RProvider.cxx.

◆ GetBrowseMap()

RProvider::BrowseMap_t & RProvider::GetBrowseMap ( )
staticprivate

Definition at line 26 of file RProvider.cxx.

◆ GetClassDrawOption()

std::string RProvider::GetClassDrawOption ( const ClassArg arg)
static

Return configured draw option for the class.

Definition at line 379 of file RProvider.cxx.

◆ GetClassEntry()

RProvider::StructClass & RProvider::GetClassEntry ( const ClassArg cl)
staticprivate

Definition at line 173 of file RProvider.cxx.

◆ GetClassIcon()

std::string RProvider::GetClassIcon ( const ClassArg arg,
bool  is_folder = false 
)
static

Return icon name for the given class - either class name or TClass *.

Definition at line 367 of file RProvider.cxx.

◆ GetClassMap()

RProvider::ClassMap_t & RProvider::GetClassMap ( )
staticprivate

Definition at line 62 of file RProvider.cxx.

◆ GetDraw6Map()

RProvider::Draw6Map_t & RProvider::GetDraw6Map ( )
staticprivate

Definition at line 44 of file RProvider.cxx.

◆ GetDraw7Map()

RProvider::Draw7Map_t & RProvider::GetDraw7Map ( )
staticprivate

Definition at line 53 of file RProvider.cxx.

◆ GetFileMap()

RProvider::FileMap_t & RProvider::GetFileMap ( )
staticprivate

Definition at line 35 of file RProvider.cxx.

◆ GetProgressVect()

RProvider::ProgressVect_t & RProvider::GetProgressVect ( )
staticprivate

Definition at line 71 of file RProvider.cxx.

◆ IsFileFormatSupported()

bool RProvider::IsFileFormatSupported ( const std::string &  extension)
static

Definition at line 199 of file RProvider.cxx.

◆ NotShowChilds()

bool RProvider::NotShowChilds ( const ClassArg arg)
static

Check if showing of sub-elements was disabled.

Definition at line 409 of file RProvider.cxx.

◆ OpenFile()

std::shared_ptr< RElement > RProvider::OpenFile ( const std::string &  extension,
const std::string &  fullname 
)
static

Definition at line 212 of file RProvider.cxx.

◆ RegisterBrowse()

void RProvider::RegisterBrowse ( const TClass cl,
BrowseFunc_t  func 
)
protected

Definition at line 108 of file RProvider.cxx.

◆ RegisterClass()

void RProvider::RegisterClass ( const std::string &  clname,
const std::string &  iconname,
const std::string &  browselib = "",
const std::string &  draw6lib = "",
const std::string &  draw7lib = "",
const std::string &  drawopt = "" 
)
protected

Definition at line 155 of file RProvider.cxx.

◆ RegisterDraw6()

void RProvider::RegisterDraw6 ( const TClass cl,
Draw6Func_t  func 
)
protected

Definition at line 121 of file RProvider.cxx.

◆ RegisterDraw7()

void RProvider::RegisterDraw7 ( const TClass cl,
Draw7Func_t  func 
)
protected

Definition at line 134 of file RProvider.cxx.

◆ RegisterFile()

void RProvider::RegisterFile ( const std::string &  extension,
FileFunc_t  func 
)
protected

Definition at line 95 of file RProvider.cxx.

◆ RegisterNTupleFunc()

void RProvider::RegisterNTupleFunc ( BrowseNTupleFunc_t  func)
protected

Definition at line 147 of file RProvider.cxx.

◆ ReportProgress()

bool RProvider::ReportProgress ( void *  handle,
float  progress 
)
static

Report running progress Returns true if handling function was invoked Method can be used to detect if there any progress handler assigned.

Definition at line 492 of file RProvider.cxx.

◆ SetClassDrawOption()

bool RProvider::SetClassDrawOption ( const ClassArg arg,
const std::string &  opt 
)
static

Set draw option for the class Return true if entry for the class exists.

Definition at line 388 of file RProvider.cxx.

Friends And Related Symbol Documentation

◆ ProgressHandle

friend class ProgressHandle
friend

Definition at line 72 of file RProvider.hxx.

Member Data Documentation

◆ gNTupleFunc

RProvider::BrowseNTupleFunc_t RProvider::gNTupleFunc = nullptr
staticprivate

Definition at line 141 of file RProvider.hxx.

Libraries for ROOT::Browsable::RProvider:

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