53 char fDelimiter =
',';
54 bool fLeftTrim =
false;
55 bool fRightTrim =
false;
56 bool fSkipBlankLines =
true;
57 std::int64_t fSkipFirstNLines = 0;
58 std::int64_t fSkipLastNLines = 0;
59 std::int64_t fLinesChunkSize = -1;
76 static const std::unordered_map<ColType_t, std::string>
fgColTypeMap;
82 std::uint64_t fDataPos = 0;
83 std::int64_t fDataLineNumber = 0;
84 std::int64_t fLineNumber = 0;
85 std::int64_t fMaxLineNumber = -1;
86 std::unique_ptr<ROOT::Internal::RRawFile>
fCsvFile;
90 std::unordered_map<std::string, ColType_t>
fColTypes;
104 bool Readln(std::string &
line);
106 void FillHeaders(
const std::string &);
107 void FillRecord(
const std::string &,
Record_t &);
108 void GenerateHeaders(
size_t);
109 std::vector<void *> GetColumnReadersImpl(std::string_view,
const std::type_info &)
final;
110 void ValidateColTypes(std::vector<std::string> &)
const;
111 void InferColTypes(std::vector<std::string> &);
112 void InferType(
const std::string &,
unsigned int);
113 std::vector<std::string> ParseColumns(
const std::string &);
114 size_t ParseValue(
const std::string &, std::vector<std::string> &,
size_t);
115 ColType_t GetType(std::string_view colName)
const;
119 std::string AsString() final;
123 RCsvDS(std::string_view fileName,
bool readHeaders = true,
char delimiter = ',',
Long64_t linesChunkSize = -1LL,
124 std::unordered_map<std::
string,
char> &&colTypes = {});
132 void Finalize() final;
133 std::
size_t GetNFiles() const final {
return 1; }
134 const std::vector<std::string> &GetColumnNames() const final;
136 std::
string GetTypeName(std::string_view colName) const final;
137 bool HasColumn(std::string_view colName) const final;
138 bool SetEntry(
unsigned int slot,
ULong64_t entry) final;
139 void SetNSlots(
unsigned int nSlots) final;
140 std::
string GetLabel() final;
143 GetColumnReaders(
unsigned int slot, std::string_view colName, const std::type_info &tid) final;