HAscii Base class for ASCII operations, opening and closing files, setting active section, reading data and commentaries.
HAscii() | |
HAscii(const HAscii& source) | |
virtual | ~HAscii() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
Bool_t | CheckOpenedFile() |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TObject::Clear(Option_t* = "") |
virtual TObject* | TObject::Clone(const char* newname = "") const |
void | CloseFile(const Char_t* filename = 0) |
virtual Int_t | TObject::Compare(const TObject* obj) const |
virtual void | TObject::Copy(TObject& object) const |
Bool_t | CopySection(const Char_t* sec) |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
HAsciiFile* | GetActiveFile() |
Char_t* | GetActiveKeyword() |
HAsciiSection* | GetActiveSection() |
Char_t* | GetCommentKeyword() |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual const char* | TObject::GetIconName() const |
virtual const char* | TObject::GetName() const |
Int_t | GetNumInLine() |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
Char_t | GetSeparator() |
virtual const char* | TObject::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TObject::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | IsNextKeyword() |
Bool_t | TObject::IsOnHeap() const |
Bool_t | IsReadFile() |
virtual Bool_t | TObject::IsSortable() const |
Bool_t | IsWriteFile() |
Bool_t | TObject::IsZombie() const |
virtual void | TObject::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
fstream& | OpenFile(const Char_t* filename, const Char_t* mode = "read") |
void | OpenFileList(const Char_t* filename) |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
HAscii& | operator=(const HAscii& source) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TObject::Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
Char_t* | ReadRemark() |
Char_t* | ReadString() |
Char_t* | ReadString(const Char_t* key) |
Char_t* | ReadString(const Char_t* sec, const Char_t* key) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
HAsciiSection* | SetActiveSection(const Char_t* name) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
void | SetNumInLine(Int_t num = 16) |
static void | TObject::SetObjectStat(Bool_t stat) |
void | SetSeparator(Char_t character = ' ') |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
void | WriteError() |
Bool_t | WriteLine(const Char_t* text, Int_t linelen = 76, Int_t keylen = 0) |
Bool_t | WriteRemark(const Char_t* text, Char_t sign = ';', Int_t linelen = 76) |
Bool_t | WriteSection(const Char_t* name) |
HAsciiSection* | CheckActiveSection() |
Bool_t | CheckData() |
Bool_t | CheckDataPosition(Int_t pos) |
Bool_t | CheckDataType(Char_t typ) |
Char_t* | CheckFileList(HAsciiFileList& list, Char_t* name) |
Bool_t | CheckSection() |
Bool_t | CheckUnambiguitySection() |
void | CloseOpenedFile() |
Char_t* | ConvertToChar() |
Float_t* | ConvertToFloat() |
Int_t* | ConvertToInt() |
Char_t* | ConvertToString() |
Char_t* | CorrectName(Char_t* name) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
Char_t* | ReadKeywordLine(const Char_t* name = 0) |
void | Reset() |
void | ResetBankData() |
void | ResetKeyData() |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
fstream | fStreamFileWrite | - stream object handling file writing |
Int_t | fDataBank | - data bank id specifying type of data |
Int_t | fDataCounter | - number of data units of given type for keyword just read |
Int_t | fDataLineLength | - length of string containing data |
HAsciiFileList | fFileList | - list of files and every file has its list of sections |
Char_t | fFileWriteName[128] | - file name opened in write mode |
Int_t | fFileWriteState | - writing file status, if file opened it is 1, 2 or 3 |
Char_t | fKeyLine[128] | - keyword name |
Int_t | fNumInLine | - number of units (digits, characters) in line to be written |
Char_t | fSeparator | - character used as separator (space, tab or comma) |
HAsciiFile* | fpActiveFile | - auxiliary pointer to file containing active section |
HAsciiSection* | fpActiveSection | - auxiliary pointer to active section |
Char_t* | fpCommentLine | - string with commentary line |
Char_t* | fpDataChar | |
Float_t* | fpDataFloat | |
Int_t* | fpDataInt | |
Char_t* | fpDataLine | - string with data as dynamically allocated array |
Char_t* | fpDataString | |
Char_t* | fpRemarkLine |
Long_t | fReadAllPosition | - position during reading sequentially all data |
Function called while opening file error happened to correct file name.
It checks if file of given name is not already opened.
Setting separator for data units (only space, tabulation '\t' or comma allowed).
Checking if file in write mode is opened (and closing it if yes) in case you want to open a new file in write mode.
Opening ASCII file with given 'filename' and 'mode'. Modes available: "read" or "in" - read mode (it is default). Unlimited number of files can be opened in read mode. "new" or "out" or "create" or "write" - write mode. A new file is created but only if there is no file with the same 'filename' existing. Only one file can be opened in write mode at the same time. "update" - opens existing file for writing at the end of it (to append data). "recreate" or "overwrite" - creates a new file or replaces existing in write mode.
It opens and reads ASCII file with the list of files and opens all of them. The file with file list must be in the following syntax: section - 'ASCIIFileList' keyword - 'Files', followed by string containing all file names (and optionally mode), separated by commas. Example of file containing list of files to be opened: [ASCII File List] ; you may put commentaries, as well Files = mdcinit.txt, richpads.txt read, \ showercal_data.dat, \ tofcal.txt read , /scratch/tofini.dat
Closing file of given filename or all opened files if no filename specified.
It checks if a new section name is unambiguous with relation to previously stored while initializing next section list.
Additional checking and if necessary reinitialization of section list, now not used.
Function for section selection. Before reading any data active section has to be chosen.
It resets variables holding keyword information like name, length, data string, commentary string.
It checks whether the call for next data unit of keyword just read is of the same type as while keyword reading (this is when calling for data without keyword specified but with type specified and then it is assumed to read data of last keyword read.
Checking if pos is not larger than number of data units; in case of string there is always only 1 unit.
Reading data of given keyword key in section sec as string.
Setting number of digits (characters) in one line to which writing of ASCII line will be formatted. Default is 16.
Number of units (digits, characters) to which written an ASCII line will be formatted.
Writing ASCII line text with given length linelen taking into consideration that the first line may follow keyword of given length keylen.
Writing remark text starting line from sing # or ; (default) with a line of length linelen.
Testing if in given section starting from position fReadAllPosition there is any keyword to be read. It is used in case of sequential data reading to control the loop and to stop if there are no more keywords to be read (i.e. we achieved the end of the section).
Reading keyword name and keyword data as string from ASCII file. If keyword is not specified the sequential reading is done. Reading starts then from position fReadAllPosition and every next call of this function makes reading of next keyword (with data) until the end of section. If you want to read the section sequentially again you nedd to set it again as active section (and then fReadAllPosition is resetted).
Conversion of string of data stored in fpDataLine to units of Float_t type.
Conversion of string of data stored in fpDataLine to units of Char_t type. Char_t unit is a single Char_t separated in string by white space or comma.
Conversion of string of data stored in fpDataLine to string unit. If string begins and ends with quotation marks they are removed. String unit is a set of characters terminated by '\0'.