class TFHeader


  File:      TFHeader.cxx

  Version:   1.0

  Author:    Reiner Rohlfs (GADC)

  History:   1.0   11.07.03  first released version


Function Members (Methods)

public:
TFHeader()
TFHeader(const TFHeader& header)
virtual~TFHeader()
virtual voidAddAttribute(const TFBaseAttr& attr, Bool_t replace = kTRUE)
static TClass*Class()
virtual voidDelAttribute(const char* key, Int_t index = -1)
virtual TFBaseAttr&GetAttribute(const char* key, UInt_t index = 0) const
virtual UInt_tGetNumAttributes(const char* key = NULL) const
virtual TClass*IsA() const
virtual TFAttrIterMakeAttrIterator() const
virtual TFHeader&operator=(const TFHeader& header)
virtual booloperator==(const TFHeader& header) const
virtual voidPrintH(Option_t* option = "") const
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)

Data Members

protected:
list<TFBaseAttr*>fAttra list of attributes

Class Charts

Inheritance Chart:
TFHeader
TFBaseCol
TFArrColumn<char,BoolCharFormat>
TFArrColumn<char,CharFormat>
TFArrColumn<double,DoubleFormat>
TFArrColumn<float,FloatFormat>
TFArrColumn<int,IntFormat>
TFArrColumn<short,ShortFormat>
TFArrColumn<unsigned char,UCharFormat>
TFArrColumn<unsigned int,UIntFormat>
TFArrColumn<unsigned short,UShortFormat>
 [more...]

Function documentation

TFHeader(const TFHeader& header)
~TFHeader()
 deletes also all attributes in the header
void AddAttribute(const TFBaseAttr& attr, Bool_t replace = kTRUE)
 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.
TFBaseAttr & GetAttribute(const char* key, UInt_t index = 0) const
 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).
void DelAttribute(const char* key, Int_t index = -1)
 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.
UInt_t GetNumAttributes(const char* key = NULL) const
 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.
TFAttrIter MakeAttrIterator()
 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)

void PrintH(Option_t* option = "") const
 prints all attributes with name, value, unit and comment of this header
 if "h" or "H" is part of option
return operator==(const TFHeader& header) const
TFHeader(const TFHeader& header)
{}

Author: (GADC)
Last update: Fri Mar 14 13:55:16 2008

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.