Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooFit::HS3::Reader Class Reference

Reads the components of a struct.

Definition at line 58 of file HS3Schema.h.

Public Member Functions

 Reader (Cursor const &cursor)
 
 Reader (Reader const &)=delete
 
 ~Reader ()
 Reports the components that were not read, unless reading the struct gave an error.
 
Cursor child (const char *key) const
 The position of a component.
 
Cursor const & cursor () const
 
bool has (const char *key)
 Whether the struct has a component. Checking for a component counts as reading it.
 
void ignoreUnread ()
 Don't report the components that were not read, because they are read later by someone else.
 
template<class Fn >
void nested (const char *key, Fn &&fn)
 Read the components of a struct that is nested in a component.
 
template<class T >
void operator() (const char *key, std::optional< T > &field)
 
template<class T >
void operator() (const char *key, T &field)
 Read a required component, or an optional one if the field is a std::optional.
 
Reader & operator= (Reader const &)=delete
 
template<class T >
void optional (const char *key, T &field)
 Read a component that can be omitted or null, which leaves the field as it is, e.g. empty for an array.
 

Private Attributes

Cursor const & _cursor
 
std::size_t _nErrorsBefore = 0
 
bool _reportUnread = true
 
std::vector< std::string > _seen
 

#include </github/home/ROOT-CI/src/roofit/hs3/src/HS3Schema.h>

Constructor & Destructor Documentation

◆ Reader() [1/2]

RooFit::HS3::Reader::Reader ( Cursor const & cursor)
explicit

Definition at line 134 of file HS3Parser.cxx.

◆ ~Reader()

RooFit::HS3::Reader::~Reader ( )

Reports the components that were not read, unless reading the struct gave an error.

Definition at line 147 of file HS3Parser.cxx.

◆ Reader() [2/2]

RooFit::HS3::Reader::Reader ( Reader const & )
delete

Member Function Documentation

◆ child()

Cursor RooFit::HS3::Reader::child ( const char * key) const
inline

The position of a component.

Definition at line 88 of file HS3Schema.h.

◆ cursor()

Cursor const & RooFit::HS3::Reader::cursor ( ) const
inline

Definition at line 86 of file HS3Schema.h.

◆ has()

bool RooFit::HS3::Reader::has ( const char * key)

Whether the struct has a component. Checking for a component counts as reading it.

Definition at line 136 of file HS3Parser.cxx.

◆ ignoreUnread()

void RooFit::HS3::Reader::ignoreUnread ( )
inline

Don't report the components that were not read, because they are read later by someone else.

Definition at line 84 of file HS3Schema.h.

◆ nested()

template<class Fn >
void RooFit::HS3::Reader::nested ( const char * key,
Fn && fn )

Read the components of a struct that is nested in a component.

Definition at line 193 of file HS3Schema.h.

◆ operator()() [1/2]

template<class T >
void RooFit::HS3::Reader::operator() ( const char * key,
std::optional< T > & field )

Definition at line 177 of file HS3Schema.h.

◆ operator()() [2/2]

template<class T >
void RooFit::HS3::Reader::operator() ( const char * key,
T & field )

Read a required component, or an optional one if the field is a std::optional.

Definition at line 167 of file HS3Schema.h.

◆ operator=()

Reader & RooFit::HS3::Reader::operator= ( Reader const & )
delete

◆ optional()

template<class T >
void RooFit::HS3::Reader::optional ( const char * key,
T & field )

Read a component that can be omitted or null, which leaves the field as it is, e.g. empty for an array.

Definition at line 185 of file HS3Schema.h.

Member Data Documentation

◆ _cursor

Cursor const& RooFit::HS3::Reader::_cursor
private

Definition at line 91 of file HS3Schema.h.

◆ _nErrorsBefore

std::size_t RooFit::HS3::Reader::_nErrorsBefore = 0
private

Definition at line 93 of file HS3Schema.h.

◆ _reportUnread

bool RooFit::HS3::Reader::_reportUnread = true
private

Definition at line 94 of file HS3Schema.h.

◆ _seen

std::vector<std::string> RooFit::HS3::Reader::_seen
private

Definition at line 92 of file HS3Schema.h.

  • roofit/hs3/src/HS3Schema.h
  • roofit/hs3/src/HS3Parser.cxx