#include "hindextable.h"

HIndexTable


class description - source file - inheritance tree (.pdf)

class HIndexTable : public TObject

Inheritance Chart:
TObject
<-
HIndexTable

    public:
HIndexTable() HIndexTable(const HIndexTable&) ~HIndexTable() Bool_t checkLocation(HLocation& aLoc) static TClass* Class() virtual void Clear(Option_t* opt) HPairListI* getCompactTable() TArrayI* getDimensions() Int_t getEntries() Int_t getIndex(HLocation& aLoc) Int_t getIndex(UInt_t linAddr) Int_t gotoBegin() Int_t gotoLocation(HLocation& aLoc) virtual TClass* IsA() const Int_t next() HIndexTable& operator=(const HIndexTable&) void setDimensions(Int_t nDim, Int_t* sizes) void setIndex(HLocation& aLoc, Int_t idx) void setIndex(Int_t linAddr, Int_t idx) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
TArrayI fSizes Sizes of the dimensions of the index matrix HPairListI fCompactTable Table of linear addres -- index pairs TArrayI fIndexArray !Index matrix Int_t fCurrentPos !Current position in the table for iterations.

Class Description

HIndexTable

  This class handles an index table with an entry per
  possible HLocation. In such a way that, given a HLocation,it returns
  an index.

  You can also iterate on the index table (on the locations) using the
 functions gotoBegin(),gotoLocation() and next().

  You can also access the indexes as if they were lineally distributed,



HIndexTable(void)
Default constructor

~HIndexTable(void)
Destructor

void setDimensions(Int_t nDim,Int_t *sizes)
Sets the number of dimensions of the table and its corresponding
sizes.

Input:
 nDim ---> number of indexes to define an entry
 sizes --> max values of those indexes.

void Clear(Option_t *)
Resets all the indexes in the table.
Int_t i;
 for (i=0;i<fIndexArray.fN;i++) fIndexArray.fArray[i]=-1;

Bool_t checkLocation(HLocation &aLoc)
Checks if there is an entry in the index table for this location

Int_t gotoLocation(HLocation &aLoc)
This function along with HIndexTable::next allows iteration on the index
table through all the indexes corresponding to the location aLoc

gotoLocation positions a cursor at the index given by aLoc. It should be called
before any call to HIndexTable::next()

Return value:
  The number of positions corresponding to the given location.

Int_t gotoBegin(void)
This function positions the cursor for iterating on the HIndexTable at its
 very beggining.

Int_t next(void)
This function along with HIndexTable::gotoLocation allows iteration on the index
table.

next advances to the next location by incrementing a cursor. It returns
the index associated to the current location (the location before advancing)

void Streamer(TBuffer &R__b)
 Stream an object of class HIndexTable.



Inline Functions


               Int_t getIndex(HLocation& aLoc)
                void setIndex(HLocation& aLoc, Int_t idx)
            TArrayI* getDimensions()
               Int_t getIndex(UInt_t linAddr)
                void setIndex(Int_t linAddr, Int_t idx)
               Int_t getEntries()
         HPairListI* getCompactTable()
             TClass* Class()
             TClass* IsA() const
                void ShowMembers(TMemberInspector& insp, char* parent)
                void StreamerNVirtual(TBuffer& b)
         HIndexTable HIndexTable(const HIndexTable&)
        HIndexTable& operator=(const HIndexTable&)


Author: Manuel Sanchez Garcia
Last update: 27/05/98
Copyright GENP (Univ. Santiago de Compostela)


ROOT page - Class index - Class Hierarchy - Top of the page

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.