Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::RDF::RCsvDS::ROptions Struct Reference

Options that control how the CSV file is parsed.

Definition at line 38 of file RCsvDS.hxx.

Public Attributes

std::vector< std::string > fColumnNames
 Impose column names.
 
std::unordered_map< std::string, char > fColumnTypes
 Specify custom column types, accepts an unordered map with keys being column name, values being type alias ('O' for boolean, 'D' for double, 'L' for Long64_t, 'T' for std::string)
 
char fComment = '\0'
 Character indicating that the remainder of the line should be ignored, if different from '\0'.
 
char fDelimiter = ','
 Column delimiter character.
 
bool fHeaders = true
 The first line describes the columns.
 
bool fLeftTrim = false
 Leading whitespaces are removed.
 
std::int64_t fLinesChunkSize = -1
 Number of lines to read, -1 to read all.
 
bool fRightTrim = false
 Trailing whitespaces are removed.
 
bool fSkipBlankLines = true
 Ignore empty lines (after trimming, if trimming is enabled)
 
std::int64_t fSkipFirstNLines = 0
 Ignore the first N lines of the file.
 
std::int64_t fSkipLastNLines = 0
 Ignore the last N lines of the file.
 

#include <ROOT/RCsvDS.hxx>

Member Data Documentation

◆ fColumnNames

std::vector<std::string> ROOT::RDF::RCsvDS::ROptions::fColumnNames

Impose column names.

This can be used if a header is missing or if the header has unparsable or unwanted column names.

Definition at line 56 of file RCsvDS.hxx.

◆ fColumnTypes

std::unordered_map<std::string, char> ROOT::RDF::RCsvDS::ROptions::fColumnTypes

Specify custom column types, accepts an unordered map with keys being column name, values being type alias ('O' for boolean, 'D' for double, 'L' for Long64_t, 'T' for std::string)

Definition at line 59 of file RCsvDS.hxx.

◆ fComment

char ROOT::RDF::RCsvDS::ROptions::fComment = '\0'

Character indicating that the remainder of the line should be ignored, if different from '\0'.

If it is the first character of the line (after trimming), the line is ignored altogether. Note that the comment character must not be part of the data, e.g. in strings.

Definition at line 53 of file RCsvDS.hxx.

◆ fDelimiter

char ROOT::RDF::RCsvDS::ROptions::fDelimiter = ','

Column delimiter character.

Definition at line 43 of file RCsvDS.hxx.

◆ fHeaders

bool ROOT::RDF::RCsvDS::ROptions::fHeaders = true

The first line describes the columns.

The names are used as RDF column names unless fColumnNames is not empty, in which case it replaces the given names. If both, fHeaders is false and fColumnNames is empty, generic column names Col1.n.Col$n$ are used.

Definition at line 42 of file RCsvDS.hxx.

◆ fLeftTrim

bool ROOT::RDF::RCsvDS::ROptions::fLeftTrim = false

Leading whitespaces are removed.

Definition at line 44 of file RCsvDS.hxx.

◆ fLinesChunkSize

std::int64_t ROOT::RDF::RCsvDS::ROptions::fLinesChunkSize = -1

Number of lines to read, -1 to read all.

Definition at line 49 of file RCsvDS.hxx.

◆ fRightTrim

bool ROOT::RDF::RCsvDS::ROptions::fRightTrim = false

Trailing whitespaces are removed.

Definition at line 45 of file RCsvDS.hxx.

◆ fSkipBlankLines

bool ROOT::RDF::RCsvDS::ROptions::fSkipBlankLines = true

Ignore empty lines (after trimming, if trimming is enabled)

Definition at line 46 of file RCsvDS.hxx.

◆ fSkipFirstNLines

std::int64_t ROOT::RDF::RCsvDS::ROptions::fSkipFirstNLines = 0

Ignore the first N lines of the file.

Definition at line 47 of file RCsvDS.hxx.

◆ fSkipLastNLines

std::int64_t ROOT::RDF::RCsvDS::ROptions::fSkipLastNLines = 0

Ignore the last N lines of the file.

Definition at line 48 of file RCsvDS.hxx.

Collaboration diagram for ROOT::RDF::RCsvDS::ROptions:
[legend]

The documentation for this struct was generated from the following file: