Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooFit::Detail::JSONTree Class Referenceabstract

Definition at line 185 of file JSONInterface.h.

Public Member Functions

virtual ~JSONTree ()=default
 
virtual JSONNoderootnode ()=0
 

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.
 

Private Types

enum class  Backend { NlohmannJson , Ryml }
 

Static Private Member Functions

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

#include <RooFit/Detail/JSONInterface.h>

Inheritance diagram for RooFit::Detail::JSONTree:
[legend]

Member Enumeration Documentation

◆ Backend

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

Definition at line 202 of file JSONInterface.h.

Constructor & Destructor Documentation

◆ ~JSONTree()

virtual RooFit::Detail::JSONTree::~JSONTree ( )
virtualdefault

Member Function Documentation

◆ create() [1/3]

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

Definition at line 85 of file JSONInterface.cxx.

◆ create() [2/3]

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

Definition at line 90 of file JSONInterface.cxx.

◆ create() [3/3]

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

Definition at line 95 of file JSONInterface.cxx.

◆ createImpl()

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

Definition at line 72 of file JSONInterface.cxx.

◆ getBackend()

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

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 126 of file JSONInterface.cxx.

◆ getBackendEnum()

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

Definition at line 117 of file JSONInterface.cxx.

◆ hasBackend()

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

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

Parameters
[in]nameName of the backend.

Definition at line 103 of file JSONInterface.cxx.

◆ rootnode()

virtual JSONNode & RooFit::Detail::JSONTree::rootnode ( )
pure virtual

Implemented in TJSONTree, and TRYMLTree.

◆ setBackend()

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

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 134 of file JSONInterface.cxx.


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