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

Definition at line 29 of file JSONInterface.h.

Classes

class  child_iterator_t
 
class  children_view_t
 
class  Storage
 

Public Types

using child_iterator = child_iterator_t<JSONNode>
 
using children_view = children_view_t<JSONNode>
 
using const_child_iterator = child_iterator_t<const JSONNode>
 
using const_children_view = children_view_t<const JSONNode>
 

Public Member Functions

 JSONNode (JSONNode const &)=delete
 
JSONNode & append_child ()
 
JSONNode & child (size_t pos)
 
const JSONNode & child (size_t pos) const
 
children_view children ()
 
const_children_view children () const
 
void clear ()
 
void erase (std::string const &key)
 Remove a child of a map, if it exists.
 
template<typename Matrix >
void fill_mat (Matrix const &mat)
 
template<typename Collection >
void fill_seq (Collection const &coll)
 
template<typename Collection >
void fill_seq (Collection const &coll, size_t nmax)
 
template<typename Collection , typename TransformationFunc >
void fill_seq (Collection const &coll, TransformationFunc func)
 
JSONNode const * find (std::string const &key) const
 
template<typename... Keys_t>
JSONNode const * find (std::string const &key, Keys_t const &...keys) const
 
JSONNode & get (std::string const &key)
 
template<typename... Keys_t>
JSONNode & get (std::string const &key, Keys_t const &...keys)
 
bool has_child (std::string const &) const
 
bool has_key () const
 
bool has_val () const
 
bool is_container () const
 
bool is_map () const
 
bool is_null () const
 
bool is_number () const
 
bool is_seq () const
 
std::string key () const
 
size_t num_children () const
 
JSONNode & operator<< (bool b)
 
JSONNode & operator<< (const char *s)
 
JSONNode & operator<< (double d)
 
JSONNode & operator<< (int i)
 
JSONNode & operator<< (std::string const &s)
 
JSONNode & operator= (JSONNode const &)=delete
 
const JSONNode & operator>> (std::string &v) const
 
JSONNode & operator[] (std::string const &k)
 
const JSONNode & operator[] (std::string const &k) const
 
JSONNode & set_map ()
 
JSONNode & set_null ()
 
JSONNode & set_seq ()
 
std::string val () const
 
bool val_bool () const
 
double val_double () const
 
int val_int () const
 
template<class T >
T val_t () const
 
template<>
int val_t () const
 
template<>
double val_t () const
 
template<>
bool val_t () const
 
void writeJSON (std::ostream &os) const
 

Private Member Functions

 JSONNode (Storage &storage, void *value, std::string key)
 

Private Attributes

std::string _key
 
Storage * _storage
 
void * _value
 

Friends

class JSONReadRecorder
 
class JSONTree
 

#include <RooFit/Detail/JSONInterface.h>

Member Typedef Documentation

◆ child_iterator

◆ children_view

◆ const_child_iterator

◆ const_children_view

Constructor & Destructor Documentation

◆ JSONNode() [1/2]

RooFit::Detail::JSONNode::JSONNode ( JSONNode const & )
delete

◆ JSONNode() [2/2]

RooFit::Detail::JSONNode::JSONNode ( Storage & storage,
void * value,
std::string key )
private

Definition at line 111 of file JSONInterface.cxx.

Member Function Documentation

◆ append_child()

JSONNode & RooFit::Detail::JSONNode::append_child ( )

Definition at line 296 of file JSONInterface.cxx.

◆ child() [1/2]

JSONNode & RooFit::Detail::JSONNode::child ( size_t pos)

Definition at line 307 of file JSONInterface.cxx.

◆ child() [2/2]

const JSONNode & RooFit::Detail::JSONNode::child ( size_t pos) const

Definition at line 312 of file JSONInterface.cxx.

◆ children() [1/2]

JSONNode::children_view RooFit::Detail::JSONNode::children ( )

Definition at line 318 of file JSONInterface.cxx.

◆ children() [2/2]

JSONNode::const_children_view RooFit::Detail::JSONNode::children ( ) const

Definition at line 324 of file JSONInterface.cxx.

◆ clear()

void RooFit::Detail::JSONNode::clear ( )

Definition at line 222 of file JSONInterface.cxx.

◆ erase()

void RooFit::Detail::JSONNode::erase ( std::string const & key)

Remove a child of a map, if it exists.

Definition at line 227 of file JSONInterface.cxx.

◆ fill_mat()

template<typename Matrix >
void RooFit::Detail::JSONNode::fill_mat ( Matrix const & mat)
inline

Definition at line 151 of file JSONInterface.h.

◆ fill_seq() [1/3]

template<typename Collection >
void RooFit::Detail::JSONNode::fill_seq ( Collection const & coll)
inline

Definition at line 120 of file JSONInterface.h.

◆ fill_seq() [2/3]

template<typename Collection >
void RooFit::Detail::JSONNode::fill_seq ( Collection const & coll,
size_t nmax )
inline

Definition at line 129 of file JSONInterface.h.

◆ fill_seq() [3/3]

template<typename Collection , typename TransformationFunc >
void RooFit::Detail::JSONNode::fill_seq ( Collection const & coll,
TransformationFunc func )
inline

Definition at line 142 of file JSONInterface.h.

◆ find() [1/2]

JSONNode const * RooFit::Detail::JSONNode::find ( std::string const & key) const
inline

Definition at line 163 of file JSONInterface.h.

◆ find() [2/2]

template<typename... Keys_t>
JSONNode const * RooFit::Detail::JSONNode::find ( std::string const & key,
Keys_t const &... keys ) const
inline

Definition at line 170 of file JSONInterface.h.

◆ get() [1/2]

JSONNode & RooFit::Detail::JSONNode::get ( std::string const & key)
inline

Definition at line 176 of file JSONInterface.h.

◆ get() [2/2]

template<typename... Keys_t>
JSONNode & RooFit::Detail::JSONNode::get ( std::string const & key,
Keys_t const &... keys )
inline

Definition at line 184 of file JSONInterface.h.

◆ has_child()

bool RooFit::Detail::JSONNode::has_child ( std::string const & c) const

Definition at line 290 of file JSONInterface.cxx.

◆ has_key()

bool RooFit::Detail::JSONNode::has_key ( ) const

Definition at line 280 of file JSONInterface.cxx.

◆ has_val()

bool RooFit::Detail::JSONNode::has_val ( ) const

Definition at line 285 of file JSONInterface.cxx.

◆ is_container()

bool RooFit::Detail::JSONNode::is_container ( ) const

Definition at line 163 of file JSONInterface.cxx.

◆ is_map()

bool RooFit::Detail::JSONNode::is_map ( ) const

Definition at line 168 of file JSONInterface.cxx.

◆ is_null()

bool RooFit::Detail::JSONNode::is_null ( ) const

Definition at line 178 of file JSONInterface.cxx.

◆ is_number()

bool RooFit::Detail::JSONNode::is_number ( ) const

Definition at line 183 of file JSONInterface.cxx.

◆ is_seq()

bool RooFit::Detail::JSONNode::is_seq ( ) const

Definition at line 173 of file JSONInterface.cxx.

◆ key()

std::string RooFit::Detail::JSONNode::key ( ) const

Definition at line 232 of file JSONInterface.cxx.

◆ num_children()

size_t RooFit::Detail::JSONNode::num_children ( ) const

Definition at line 302 of file JSONInterface.cxx.

◆ operator<<() [1/5]

JSONNode & RooFit::Detail::JSONNode::operator<< ( bool b)

Definition at line 140 of file JSONInterface.cxx.

◆ operator<<() [2/5]

JSONNode & RooFit::Detail::JSONNode::operator<< ( const char * s)
inline

Definition at line 79 of file JSONInterface.h.

◆ operator<<() [3/5]

JSONNode & RooFit::Detail::JSONNode::operator<< ( double d)

Definition at line 134 of file JSONInterface.cxx.

◆ operator<<() [4/5]

JSONNode & RooFit::Detail::JSONNode::operator<< ( int i)

Definition at line 128 of file JSONInterface.cxx.

◆ operator<<() [5/5]

JSONNode & RooFit::Detail::JSONNode::operator<< ( std::string const & s)

Definition at line 122 of file JSONInterface.cxx.

◆ operator=()

JSONNode & RooFit::Detail::JSONNode::operator= ( JSONNode const & )
delete

◆ operator>>()

const JSONNode & RooFit::Detail::JSONNode::operator>> ( std::string & v) const

Definition at line 146 of file JSONInterface.cxx.

◆ operator[]() [1/2]

JSONNode & RooFit::Detail::JSONNode::operator[] ( std::string const & k)

Definition at line 152 of file JSONInterface.cxx.

◆ operator[]() [2/2]

const JSONNode & RooFit::Detail::JSONNode::operator[] ( std::string const & k) const

Definition at line 157 of file JSONInterface.cxx.

◆ set_map()

JSONNode & RooFit::Detail::JSONNode::set_map ( )

Definition at line 188 of file JSONInterface.cxx.

◆ set_null()

JSONNode & RooFit::Detail::JSONNode::set_null ( )

Definition at line 216 of file JSONInterface.cxx.

◆ set_seq()

JSONNode & RooFit::Detail::JSONNode::set_seq ( )

Definition at line 202 of file JSONInterface.cxx.

◆ val()

std::string RooFit::Detail::JSONNode::val ( ) const

Definition at line 237 of file JSONInterface.cxx.

◆ val_bool()

bool RooFit::Detail::JSONNode::val_bool ( ) const

Definition at line 264 of file JSONInterface.cxx.

◆ val_double()

double RooFit::Detail::JSONNode::val_double ( ) const

Definition at line 260 of file JSONInterface.cxx.

◆ val_int()

int RooFit::Detail::JSONNode::val_int ( ) const

Definition at line 256 of file JSONInterface.cxx.

◆ val_t() [1/4]

template<class T >
T RooFit::Detail::JSONNode::val_t ( ) const

◆ val_t() [2/4]

template<>
int RooFit::Detail::JSONNode::val_t ( ) const
inline

Definition at line 291 of file JSONInterface.h.

◆ val_t() [3/4]

template<>
double RooFit::Detail::JSONNode::val_t ( ) const
inline

Definition at line 296 of file JSONInterface.h.

◆ val_t() [4/4]

template<>
bool RooFit::Detail::JSONNode::val_t ( ) const
inline

Definition at line 301 of file JSONInterface.h.

◆ writeJSON()

void RooFit::Detail::JSONNode::writeJSON ( std::ostream & os) const

Definition at line 116 of file JSONInterface.cxx.

Friends And Related Symbol Documentation

◆ JSONReadRecorder

friend class JSONReadRecorder
friend

Definition at line 193 of file JSONInterface.h.

◆ JSONTree

friend class JSONTree
friend

Definition at line 192 of file JSONInterface.h.

Member Data Documentation

◆ _key

std::string RooFit::Detail::JSONNode::_key
private

Definition at line 202 of file JSONInterface.h.

◆ _storage

Storage* RooFit::Detail::JSONNode::_storage
private

Definition at line 200 of file JSONInterface.h.

◆ _value

void* RooFit::Detail::JSONNode::_value
private

Definition at line 201 of file JSONInterface.h.

Libraries for RooFit::Detail::JSONNode:

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