Class behaving as a heterogenuous dictionary to store the metadata of a dataset.
The supported types of the metadata are: std::string, int and double. An example of creating the RMetaData object:
meta.
Add(
"sample_name",
"name"");
meta.Add("luminosity", 10064);
meta.Add("xsecs", 1.0);
The RMetaData object is passed to an RSample object which represents a single dataset sample.
A dataframe built with the RMetaData object can be accessed with the DefinePerSample() method.
Definition at line 57 of file RMetaData.hxx.
|
| | RMetaData () |
| |
| | RMetaData (RMetaData &&) |
| |
| | RMetaData (RMetaData const &) |
| |
| | ~RMetaData () |
| |
| void | Add (const std::string &key, const std::string &val) |
| | Add an RMetaData class instance.
|
| |
| void | Add (const std::string &key, double val) |
| | Add an RMetaData class instance.
|
| |
| void | Add (const std::string &key, int val) |
| | Add an RMetaData class instance.
|
| |
| std::string | Dump (const std::string &key) const |
| | Dump the value of the metadata value given the key.
|
| |
| double | GetD (const std::string &key) const |
| | Return the metadata value of type double given the key, or an error if the metadata value is of a non-double type.
|
| |
| double | GetD (const std::string &key, double defaultVal) const |
| | Return the metadata value of type double given the key, a default double metadata value if the key is not found, or an error if the metadata value is of a non-double type.
|
| |
| int | GetI (const std::string &key) const |
| | Return the metadata value of type int given the key, or an error if the metadata value is of a non-int type.
|
| |
| int | GetI (const std::string &key, int defaultVal) const |
| | Return the metadata value of type int given the key, a default int metadata value if the key is not found, or an error if the metadata value is of a non-int type.
|
| |
| std::string | GetS (const std::string &key) const |
| | Return the metadata value of type string given the key, or an error if the metadata value is of a non-string type.
|
| |
| const std::string | GetS (const std::string &key, const std::string &defaultVal) const |
| | Return the metadata value of type int given the key, a default int metadata value if the key is not found, or an error if the metadata value is of a non-string type.
|
| |
| RMetaData & | operator= (RMetaData &&) |
| |
| RMetaData & | operator= (RMetaData const &) |
| |
#include <ROOT/RDF/RMetaData.hxx>
◆ RMetaData() [1/3]
| ROOT::RDF::Experimental::RMetaData::RMetaData |
( |
| ) |
|
◆ RMetaData() [2/3]
| ROOT::RDF::Experimental::RMetaData::RMetaData |
( |
RMetaData const & | other | ) |
|
◆ RMetaData() [3/3]
| ROOT::RDF::Experimental::RMetaData::RMetaData |
( |
RMetaData && | | ) |
|
|
default |
◆ ~RMetaData()
| ROOT::RDF::Experimental::RMetaData::~RMetaData |
( |
| ) |
|
|
default |
◆ Add() [1/3]
| void ROOT::RDF::Experimental::RMetaData::Add |
( |
const std::string & | key, |
|
|
const std::string & | val ) |
Add an RMetaData class instance.
- Parameters
-
| [in] | key | input key for a given RMetaData instance. |
| [in] | val | metadata value for of type string. |
Definition at line 58 of file RMetaData.cxx.
◆ Add() [2/3]
| void ROOT::RDF::Experimental::RMetaData::Add |
( |
const std::string & | key, |
|
|
double | val ) |
◆ Add() [3/3]
| void ROOT::RDF::Experimental::RMetaData::Add |
( |
const std::string & | key, |
|
|
int | val ) |
◆ Dump()
| std::string ROOT::RDF::Experimental::RMetaData::Dump |
( |
const std::string & | key | ) |
const |
Dump the value of the metadata value given the key.
- Parameters
-
| [in] | key | input key for a given RMetaData instance. |
- Returns
- metadata value (as a string) associated with the input key, irrelevant of the actual type of the metadata value.
Definition at line 67 of file RMetaData.cxx.
◆ GetD() [1/2]
| double ROOT::RDF::Experimental::RMetaData::GetD |
( |
const std::string & | key | ) |
const |
Return the metadata value of type double given the key, or an error if the metadata value is of a non-double type.
- Parameters
-
| [in] | key | input key for a given RMetaData instance. |
Definition at line 84 of file RMetaData.cxx.
◆ GetD() [2/2]
| double ROOT::RDF::Experimental::RMetaData::GetD |
( |
const std::string & | key, |
|
|
double | defaultVal ) const |
Return the metadata value of type double given the key, a default double metadata value if the key is not found, or an error if the metadata value is of a non-double type.
- Parameters
-
| [in] | key | input key for a given RMetaData instance. |
| [in] | defaultVal | metadata value of type double which is read as default while a given key cannot be found in the dataset. |
Definition at line 122 of file RMetaData.cxx.
◆ GetI() [1/2]
| int ROOT::RDF::Experimental::RMetaData::GetI |
( |
const std::string & | key | ) |
const |
Return the metadata value of type int given the key, or an error if the metadata value is of a non-int type.
- Parameters
-
| [in] | key | input key for a given RMetaData instance. |
Definition at line 73 of file RMetaData.cxx.
◆ GetI() [2/2]
| int ROOT::RDF::Experimental::RMetaData::GetI |
( |
const std::string & | key, |
|
|
int | defaultVal ) const |
Return the metadata value of type int given the key, a default int metadata value if the key is not found, or an error if the metadata value is of a non-int type.
- Parameters
-
| [in] | key | input key for a given RMetaData instance. |
| [in] | defaultVal | metadata value of type int which is read as default while a given key cannot be found in the dataset. |
Definition at line 109 of file RMetaData.cxx.
◆ GetS() [1/2]
| std::string ROOT::RDF::Experimental::RMetaData::GetS |
( |
const std::string & | key | ) |
const |
Return the metadata value of type string given the key, or an error if the metadata value is of a non-string type.
- Parameters
-
| [in] | key | input key for a given RMetaData instance. |
Definition at line 96 of file RMetaData.cxx.
◆ GetS() [2/2]
| const std::string ROOT::RDF::Experimental::RMetaData::GetS |
( |
const std::string & | key, |
|
|
const std::string & | defaultVal ) const |
Return the metadata value of type int given the key, a default int metadata value if the key is not found, or an error if the metadata value is of a non-string type.
- Parameters
-
| [in] | key | input key for a given RMetaData instance. |
| [in] | defaultVal | metadata value of type string which is read as default while a given key cannot be found in the dataset. |
Definition at line 136 of file RMetaData.cxx.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ ROOT::Internal::RDF::ExportJSON
◆ ROOT::Internal::RDF::ImportJSON
◆ fJson
The documentation for this class was generated from the following files: