1 #ifndef __KVFILEREADER_H
2 #define __KVFILEREADER_H
172 return "CommentLine";
178 return "ParamMismatch";
225 Error(
"OpenFileToRead",
"Failed to open file %s", _filename.
Data());
254 if (!pattern.IsNull())
272 if (!pattern.IsNull())
343 return items[pos].c_str();
#define ClassDef(name, id)
R__EXTERN TSystem * gSystem
Base class for KaliVeda framework.
Handle reading columns of numeric data in text files.
KVString GetCurrentLine()
ReadStatus
status returned by each method used to read a line in the file
@ ParamMismatch
the number of parameters read from line does not correspond to expectations
@ CommentLine
last line read was a comment line
@ EndOfFile
end of file reached
@ EmptyLine
last line read was empty (only whitespace)
@ OK
successful read and import of parameters from line
ReadStatus ReadLineAndCheck(Int_t nexpect, const KVString &pattern)
Bool_t PreparForReadingAgain()
Int_t GetNlineRead() const
ReadStatus ReadLine(const KVString &pattern="")
KVFileReader(const KVString &comments="")
Double_t GetDoubleReadPar(Int_t pos) const
void Clear(Option_t *="")
Clear object properties : name, type/title, number, label.
ReadStatus ReadLineAndAdd(const KVString &pattern="")
Int_t GetIntReadPar(Int_t pos) const
Int_t GetNparRead() const
void StoreParameters(const KVString &pattern)
KVString GetReadStatus(ReadStatus s)
KVString GetReadPar(Int_t pos) const
void AddParameters(const KVString &pattern)
ReadStatus ReuseLineAndCheck(Int_t nexpect, const KVString &pattern)
std::vector< std::string > items
Bool_t OpenFileToRead(const KVString &filename)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
void RemoveAllExtraWhiteSpace()
KVString Next(Bool_t strip_whitespace=kFALSE) const
virtual void Error(const char *method, const char *msgfmt,...) const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
const char * Data() const
std::istream & ReadLine(std::istream &str, Bool_t skipWhite=kTRUE)
virtual char * ExpandPathName(const char *path)