ComPWA
Common Partial-Wave-Analysis Framework
|
Representation of data contained in an ASCII header. More...
#include <AsciiHeaderIO.hpp>
Public Member Functions | |
AsciiHeader (std::vector< int > PIDs={}, std::string Unit="GeV", bool EnergyFirst=false) | |
void | importYAML (const std::string &HeaderContent) |
Set data members by reading a YAML-like string (including newlines). More... | |
void | importYAML (std::istream &InputStream) |
void | dumpToYAML (std::ostream &os) const |
Serialise data members to YAML format, embedded in XML header tags. More... | |
const std::vector< int > | getFinalStatePIDs () const |
bool | isEnergyFirst () const |
const std::string & | getUnit () const |
Static Public Member Functions | |
static std::string | extractHeaderContent (std::istream &InputStream) |
Extract the part that is between the XML/HTML tags <header>...</header> including newlines. More... | |
Private Attributes | |
std::vector< int > | PIDs |
std::string | Unit |
bool | EnergyFirst |
Representation of data contained in an ASCII header.
This object takes care of reading and writing data concerning a set of events from and to a data file. The concept of a header was introduced to allow the user to document data files and facilitate comparison between Pawian and ComPWA.
Definition at line 21 of file AsciiHeaderIO.hpp.
|
inline |
Definition at line 23 of file AsciiHeaderIO.hpp.
void ComPWA::Data::Ascii::AsciiHeader::dumpToYAML | ( | std::ostream & | os | ) | const |
Serialise data members to YAML format, embedded in XML header tags.
Definition at line 118 of file AsciiHeaderIO.cpp.
|
static |
Extract the part that is between the XML/HTML tags <header>...</header>
including newlines.
Definition at line 36 of file AsciiHeaderIO.cpp.
|
inline |
Definition at line 50 of file AsciiHeaderIO.hpp.
|
inline |
Definition at line 52 of file AsciiHeaderIO.hpp.
void ComPWA::Data::Ascii::AsciiHeader::importYAML | ( | const std::string & | HeaderContent | ) |
Set data members by reading a YAML-like string (including newlines).
Set data members by reading a YAML-like string (including newline characters).
Example:
Note that even though the syntax within the header is YAML-like, there is no full YAML support. In addition, key words are case-insensitive.
Definition at line 85 of file AsciiHeaderIO.cpp.
|
inline |
Definition at line 41 of file AsciiHeaderIO.hpp.
|
inline |
Definition at line 51 of file AsciiHeaderIO.hpp.
|
private |
Definition at line 57 of file AsciiHeaderIO.hpp.
|
private |
Definition at line 55 of file AsciiHeaderIO.hpp.
|
private |
Definition at line 56 of file AsciiHeaderIO.hpp.