File: TFHeader.cxx Version: 1.0 Author: Reiner Rohlfs (GADC) History: 1.0 11.07.03 first released version
TFHeader() | |
TFHeader(const TFHeader& header) | |
virtual | ~TFHeader() |
virtual void | AddAttribute(const TFBaseAttr& attr, Bool_t replace = kTRUE) |
static TClass* | Class() |
virtual void | DelAttribute(const char* key, Int_t index = -1) |
virtual TFBaseAttr& | GetAttribute(const char* key, UInt_t index = 0) const |
virtual UInt_t | GetNumAttributes(const char* key = NULL) const |
virtual TClass* | IsA() const |
virtual TFAttrIter | MakeAttrIterator() const |
virtual TFHeader& | operator=(const TFHeader& header) |
virtual bool | operator==(const TFHeader& header) const |
virtual void | PrintH(Option_t* option = "") const |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
list<TFBaseAttr*> | fAttr | a list of attributes |
Adds one attribute to this header. A copy of attr is added not attr itself. More than one attribute with the same name can be in the list of a header. If replace is set to kTRUE, the default value, all existing attributes with the same name as attr are removed. To have more than one attribute with the same name in this header replace has to be set to kFALSE.
Returns one attribute or throws a TFAttrException if the attribute with the specified key and index is not in this header. If key is defined ( not NULL) only attributes with this name are returned. index defines the number of attributes with the name "key" that are skipped before attribute is returned. The default value of index is 0. To return all attributes independent of the name a loop like this can be used: try { UInt_t index = 0; while (1) { TFBaseAttr & attr = header->GetAttribute(NULL, index); // do something index++; } } catch ( TFAttrException ) {} To return all attribute of a given name a similar loop can be used, but GetAttribute(NULL, index) has to be replace by GetAttribute("attr_name", index)) Better and faster to get all attributes is the use of the attribute iterator, see MakeAttrIterator() This functions either throws an exception or returns a dummy attribute if the requested attribute does not exist. For more details see the user manual (Error Handling and Exceptions).
Deletes one attribute or all attributes with the name "key". If index < 0, the default value, all attributes with the name "key" are deleted. If index >= 0 only one attribute is deleted. index defines the number of attributes with name key that are skipped before one attribute is deleted. If key is not defined ( set to NULL ) all attributes ( index < 0 ) or one attribute independent of its name is deleted.
Returns the number of attributes in this header with the name "key"
If key is NULL (the default) the number of all attributes is returned.
Returns an iterator for all attributes. This iterater can be used if the names of the attributes are not known to get all attributes. This method is faster than GetAttributes(). For more information about iterators see user manual (Iterators)
prints all attributes with name, value, unit and comment of this header if "h" or "H" is part of option