79template<
class DataType,
class Tuple>
85 ::Error(
"FillNtupleFromStream",
"invalid delimiter - newline character");
90 ::Error(
"FillNtuplesFromStream",
"invalid delimiter, '#' symbols can only start a comment");
96 ::Error(
"FillNtupleFromStream",
"invalid number of elements");
100 DataType *args =
tuple.GetArgs();
101 assert(args !=
nullptr &&
"FillNtupleFromStream, args buffer is a null");
113 ::Error(
"FillNtupleFromStream",
"no data read");
121 ::Error(
"FillNtupleFromStream",
"failed to read a tuple (not enough values found)");
128 ::Error(
"FillNtupleFromStream",
"delimiter expected");
138 ::Error(
"FillNtupleFromStream",
"unexpected character or eof found");
145 ::Error(
"FillNtupleFromStream",
"error while reading a value");
152 ::Error(
"FillNtupleFromStream",
153 "only whitespace and new line can follow the last number on the line");
173 ::Error(
"FillNtupleFromStream",
"no data read");
175 ::Error(
"FillNtupleFromStream",
"unexpected character or eof found");
183 ::Error(
"FillNtupleFromStream",
"delimiter expected (non-strict mode)");
195 ::Error(
"FillNtupleFromStream",
"error while reading a value");
199 if (i + 1 ==
nVars) {
242 while (
input.good()) {
243 const char next =
input.peek();
246 if (next ==
'\r' || next ==
'\n')
261 while (
input.good()) {
262 const char c =
input.peek();
268 else if (!std::isspace(
c))
282 while (
input.good()) {
283 const char next =
input.peek();
285 if (std::isspace(next) && next !=
'\n' && next !=
'\r')
303 const char next =
input.peek();
307 return next ==
'\r' || next ==
'\n';
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
A simple TTree restricted to a list of double variables only.
A simple TTree restricted to a list of float variables only.
A TTree represents a columnar dataset.
Different standalone functions to work with trees and tuples, not reqiuired to be a member of any cla...
template Long64_t FillNtupleFromStream< Float_t, TNtuple >(std::istream &, TNtuple &, char, bool)
Long64_t FillNtupleFromStream(std::istream &inputStream, Tuple &tuple, char delimiter, bool strictMode)
Function to fill tuples (TNtuple/TNtupleD) from a simple ASCII data file.
void SkipEmptyLines(std::istream &input)
Skips empty lines (newline-characters), ws-lines (consisting only of whitespace characters + newline-...
void SkipWSCharacters(std::istream &input)
Skip whitespace characters, but not newline-characters we support ('\r' or '\n').
bool NextCharacterIsEOL(std::istream &input)
Either '\r' | '\n' or eof of some problem.
void SkipComment(std::istream &input)
Skips everything from '#' to (including) '\r' or '\n'.
template Long64_t FillNtupleFromStream< Double_t, TNtupleD >(std::istream &, TNtupleD &, char, bool)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...