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

Reads the components of a struct.

Definition at line 59 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 const & cursor () const
 
bool has (const char *key)
 Whether the struct has a component. Checking for a component counts as reading it.
 
template<class T >
void list (const char *key, std::vector< T > &field)
 Read an array that can be omitted, which is equivalent to an empty one.
 
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
 

Private Attributes

Cursor const & _cursor
 
std::size_t _nErrorsBefore = 0
 
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 136 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 149 of file HS3Parser.cxx.

◆ Reader() [2/2]

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

Member Function Documentation

◆ cursor()

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

Definition at line 84 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 138 of file HS3Parser.cxx.

◆ list()

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

Read an array that can be omitted, which is equivalent to an empty one.

Definition at line 165 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 178 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 151 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 141 of file HS3Schema.h.

◆ operator=()

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

Member Data Documentation

◆ _cursor

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

Definition at line 87 of file HS3Schema.h.

◆ _nErrorsBefore

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

Definition at line 89 of file HS3Schema.h.

◆ _seen

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

Definition at line 88 of file HS3Schema.h.

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