Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TJSONTree Class Reference

Definition at line 22 of file JSONParser.h.

Classes

class  Node

Public Member Functions

 TJSONTree ()
 TJSONTree (std::istream &is)
 ~TJSONTree () override
TJSONTree::Nodeincache (const TJSONTree::Node &n)
Noderootnode () override

Static Public Member Functions

static std::unique_ptr< JSONTreecreate ()
static std::unique_ptr< JSONTreecreate (std::istream &is)
static std::unique_ptr< JSONTreecreate (std::string const &str)
static std::string getBackend ()
 Returns the name of the library that serves as the backend for the JSON interface, which is either "nlohmann-json" or "rapidyaml".
static bool hasBackend (std::string const &name)
 Check if ROOT was compiled with support for a certain JSON backend library.
static void setBackend (std::string const &name)
 Set the library that serves as the backend for the JSON interface.

Protected Member Functions

void clearcache ()

Protected Attributes

std::list< Node_nodecache
Node root

Private Types

enum class  Backend { NlohmannJson , Ryml }

Static Private Member Functions

template<typename... Args>
static std::unique_ptr< JSONTreecreateImpl (Args &&...args)
static BackendgetBackendEnum ()

#include </home/stephan/code/root-2/roofit/jsoninterface/src/JSONParser.h>

Inheritance diagram for TJSONTree:
RooFit::Detail::JSONTree

Member Enumeration Documentation

◆ Backend

enum class RooFit::Detail::JSONTree::Backend
strongprivateinherited
Enumerator
NlohmannJson 
Ryml 

Definition at line 218 of file JSONInterface.h.

Constructor & Destructor Documentation

◆ TJSONTree() [1/2]

TJSONTree::TJSONTree ( )

Definition at line 32 of file JSONParser.cxx.

◆ ~TJSONTree()

TJSONTree::~TJSONTree ( )
override

Definition at line 36 of file JSONParser.cxx.

◆ TJSONTree() [2/2]

TJSONTree::TJSONTree ( std::istream & is)

Definition at line 34 of file JSONParser.cxx.

Member Function Documentation

◆ clearcache()

void TJSONTree::clearcache ( )
protected

Definition at line 57 of file JSONParser.cxx.

◆ create() [1/3]

std::unique_ptr< JSONTree > RooFit::Detail::JSONTree::create ( )
staticinherited

Definition at line 92 of file JSONInterface.cxx.

◆ create() [2/3]

std::unique_ptr< JSONTree > RooFit::Detail::JSONTree::create ( std::istream & is)
staticinherited

Definition at line 97 of file JSONInterface.cxx.

◆ create() [3/3]

std::unique_ptr< JSONTree > RooFit::Detail::JSONTree::create ( std::string const & str)
staticinherited

Definition at line 102 of file JSONInterface.cxx.

◆ createImpl()

template<typename... Args>
std::unique_ptr< JSONTree > RooFit::Detail::JSONTree::createImpl ( Args &&... args)
staticprivateinherited

Definition at line 80 of file JSONInterface.cxx.

◆ getBackend()

std::string RooFit::Detail::JSONTree::getBackend ( )
staticinherited

Returns the name of the library that serves as the backend for the JSON interface, which is either "nlohmann-json" or "rapidyaml".

Returns
Backend name as a string.

Definition at line 133 of file JSONInterface.cxx.

◆ getBackendEnum()

JSONTree::Backend & RooFit::Detail::JSONTree::getBackendEnum ( )
staticprivateinherited

Definition at line 124 of file JSONInterface.cxx.

◆ hasBackend()

bool RooFit::Detail::JSONTree::hasBackend ( std::string const & name)
staticinherited

Check if ROOT was compiled with support for a certain JSON backend library.

Parameters
[in]nameName of the backend.

Definition at line 110 of file JSONInterface.cxx.

◆ incache()

TJSONTree::Node & TJSONTree::incache ( const TJSONTree::Node & n)

Definition at line 41 of file JSONParser.cxx.

◆ rootnode()

Node & TJSONTree::rootnode ( )
inlineoverridevirtual

Implements RooFit::Detail::JSONTree.

Definition at line 87 of file JSONParser.h.

◆ setBackend()

void RooFit::Detail::JSONTree::setBackend ( std::string const & name)
staticinherited

Set the library that serves as the backend for the JSON interface.

Note that the "rapidyaml" backend is only supported if rapidyaml was found on the system when ROOT was compiled.

Parameters
[in]nameName of the backend, can be either "nlohmann-json" or "rapidyaml".

Definition at line 141 of file JSONInterface.cxx.

Member Data Documentation

◆ _nodecache

std::list<Node> TJSONTree::_nodecache
protected

Definition at line 78 of file JSONParser.h.

◆ root

Node TJSONTree::root
protected

Definition at line 77 of file JSONParser.h.


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