library: libGeom
#include "TGeoCache.h"


class description - header file - source file
viewCVS header - viewCVS source

class TGeoNodeCache

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
TGeoNodeCache(Bool_t nodeid)
TGeoNodeCache(Int_t size, Bool_t nodeid = kFALSE)
Int_tAddNode(TGeoNode* node)
Int_tCacheId(Int_t nindex) const
virtual Bool_tCdDown(Int_t index, Bool_t make = kTRUE)
voidCdNode(Int_t nodeid)
virtual voidCdTop()
virtual voidCdUp()
static TClass*Class()
virtual voidCleanCache()
virtual voidClearDaughter(Int_t index)
virtual voidClearNode(Int_t nindex)
virtual voidCompact()
virtual voidDeleteCaches()
virtual Bool_tDumpNodes()
voidFillIdBranch(const Int_t* br, Int_t startlevel = 0)
virtual void*GetBranch() const
virtual voidGetBranchNames(Int_t*) const
virtual voidGetBranchNumbers(Int_t*, Int_t*) const
virtual voidGetBranchOnlys(Int_t*) const
virtual TGeoHMatrix*GetCurrentMatrix() const
Int_tGetCurrentNode() const
Int_tGetCurrentNodeId() const
virtual Int_tGetFreeSpace() const
const Int_t*GetIdBranch() const
Int_tGetLevel() const
virtual void*GetMatrices() const
TGeoMatrixCache*GetMatrixPool() const
virtual TGeoNode*GetMother(Int_t up = 1) const
virtual TGeoHMatrix*GetMotherMatrix(Int_t) const
virtual Int_tGetNfree() const
virtual TGeoNode*GetNode() const
virtual Int_tGetNodeId() const
virtual Int_tGetNused() const
virtual const char*GetPath()
Int_tGetSize() const
Int_tGetStackLevel() const
Int_tGetTopNode() const
virtual Int_tGetUsageCount() const
Bool_tHasIdArray() const
virtual voidIncreasePool(Int_t size)
virtual voidIncrementUsageCount()
Int_tIndex(Int_t nindex) const
virtual TClass*IsA() const
virtual Bool_tIsDummy() const
virtual voidLocalToMaster(const Double_t* local, Double_t* master) const
virtual voidLocalToMasterBomb(const Double_t* local, Double_t* master) const
virtual voidLocalToMasterVect(const Double_t* local, Double_t* master) const
virtual voidMasterToLocal(const Double_t* master, Double_t* local) const
virtual voidMasterToLocalBomb(const Double_t* master, Double_t* local) const
virtual voidMasterToLocalVect(const Double_t* master, Double_t* local) const
virtual voidPopDummy(Int_t ipop = 9999)
virtual Bool_tPopState(Int_t& nmany, Double_t* point = 0)
virtual Bool_tPopState(Int_t& nmany, Int_t level, Double_t* point = 0)
virtual voidPrintNode() const
virtual Int_tPushState(Bool_t ovlp, Int_t ntmany = 0, Int_t startlevel = 0, Double_t* point = 0)
virtual voidRefresh()
voidSetDefaultLevel(Int_t level)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
voidStatus() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
TGeoNodeCache(const TGeoNodeCache&)
TGeoNodeCache&operator=(const TGeoNodeCache&)

Data Members

Double_tfGeoCacheUsageRatiopercentage of total usage count that triggers persistency
Int_tfGeoCacheMaxDaughtersmax ndaugters for TGeoNodeArray
Int_tfGeoCacheMaxSizemaximum initial cache size
Int_tfGeoCacheDefaultLeveldefault level down to store nodes
Int_tfGeoCacheMaxLevelsmaximum supported number of levels
Int_tfGeoCacheObjArrayIndmaximum number of daughters stored as node arrays
Int_tfGeoCacheStackSizemaximum size of the stack
Int_tfLevellevel in the current branch
Int_tfCurrentIDunique ID of current node
TStringfPathpath for current branch
TObjArray*fStackstack of cache states
Int_t*fNodeIdArray! array of node id's
Int_tfIndexindex in array of ID's
TGeoMatrixCache*fMatrixPoolpool of compressed global matrices
Int_tfIdBranch[30]current branch of indices
Int_tfSizecurrent size of the cache
Int_tfNusednumber of used nodes
Int_tfDefaultLevellevel down to which nodes will be persistent
Int_tfTopNodetop level physical node
Int_tfCounttotal usage count
Int_tfCountLimitcount limit for which nodes become persistent
Int_tfCurrentNodecurrent physical node
Int_tfCurrentCachecurrent cache number
Int_tfCurrentIndexindex of current node in current cache
Int_t*fBranchnodes from current branch
Int_t*fMatricesmatrix indices from current branch
Int_tfStackLevellevel in the stack of states
TGeoHMatrix*fGlobalMatrixcurrent global matrix
TGeoNodeArray**fCache[128] cache of node arrays

Class Description

 Physical tree description.

/* */
 dummy constructor
TGeoNodeCache(Bool_t nodeid)
 dummy constructor
TGeoNodeCache(Int_t size, Bool_t nodeid)
TGeoNodeCache(const TGeoNodeCache& gnc)
copy constructor
TGeoNodeCache& operator=(const TGeoNodeCache& gnc)
assignment operator
void BuildIdArray()
 Builds node id array.
Int_t GetCurrentNodeId()
 Returns a fixed ID for current physical node
void Compact()
 Compact arrays
void DeleteCaches()
 Delete all node caches.
Int_t AddNode(TGeoNode *node)
 Add a logical node in the cache corresponding to ndaughters.
void CdNode(Int_t nodeid)
 Change current path to point to the node having this id.
 Node id has to be in range : 0 to fNNodes-1 (no check for performance reasons)
Bool_t CdDown(Int_t index, Bool_t make)
 Make daughter 'index' of current node the current one.
 first make sure that current node is also current in its cache
void CdUp()
 Change current path to mother.
void CleanCache()
 Free nodes which are not persistent from cache except the current branch.
 first compute count limit for persistency
Bool_t DumpNodes()
 Dump all non-persistent branches.
void ClearNode(Int_t nindex)
 Clear only the node nindex.
TGeoNode * GetMother(Int_t up)
 Get mother of current logical node, <up> levels up.
Int_t GetNodeId()
 Get unique node id.
const char * GetPath()
 Returns the current path.
void PrintNode()
 Print some info about current node.
Int_t PushState(Bool_t ovlp, Int_t startlevel, Int_t nmany, Double_t *point)
 Push current state into heap.
void Refresh()
 Refresh current state.
Bool_t PopState(Int_t &nmany, Double_t *point)
 Pop next state/point from heap.
Bool_t PopState(Int_t &nmany, Int_t level, Double_t *point)
 Pop next state/point from heap and restore matrices starting from LEVEL.
Bool_t SetPersistency()
 Set matrix cache persistent.
void Status()
 Print status of cache.
void CdCache()
void ClearDaughter(Int_t index)
{CdCache(); fCache[fCurrentCache]->ClearDaughter(index);}
void IncrementUsageCount()
{fCache[fCurrentCache]->IncrementUsageCount(); fCount++;}
Int_t GetUsageCount()
{return fCache[fCurrentCache]->GetUsageCount();}
TGeoNode * GetNode()
{return fCache[fCurrentCache]->GetNode();}
TGeoHMatrix * GetCurrentMatrix()
{fMatrixPool->GetMatrix(fGlobalMatrix); return fGlobalMatrix;}
void LocalToMaster(const Double_t *local, Double_t *master)
{fMatrixPool->LocalToMaster(local, master);}
void LocalToMasterVect(const Double_t *local, Double_t *master)
{fMatrixPool->LocalToMasterVect(local, master);}
void LocalToMasterBomb(const Double_t *local, Double_t *master)
{fMatrixPool->LocalToMasterBomb(local, master);}
void MasterToLocal(const Double_t *master, Double_t *local)
{fMatrixPool->MasterToLocal(master, local);}
void MasterToLocalVect(const Double_t *master, Double_t *local)
{fMatrixPool->MasterToLocalVect(master, local);}
void MasterToLocalBomb(const Double_t *master, Double_t *local)
{fMatrixPool->MasterToLocalBomb(master, local);}
Int_t CacheId(Int_t nindex)
{return (*((UChar_t*)&nindex+3)>fGeoCacheMaxDaughters)?fGeoCacheObjArrayInd:*((UChar_t*)&nindex+3);}
void CdTop()
{fLevel=1; CdUp();}
void FillIdBranch(const Int_t *br, Int_t startlevel=0)
{memcpy(fIdBranch+startlevel,br,(fLevel+1-startlevel)*sizeof(Int_t)); fIndex=fIdBranch[fLevel];}
const Int_t * GetIdBranch()
{return fIdBranch;}
void * GetBranch()
{return fBranch;}
void GetBranchNames(Int_t * /*names*/)
void GetBranchNumbers(Int_t * /*copyNumbers*/, Int_t * /*volumeNumbers*/)
void GetBranchOnlys(Int_t * /*isonly*/)
void * GetMatrices()
{return fMatrices;}
Int_t GetCurrentNode()
{return fCurrentNode;}
TGeoHMatrix * GetMotherMatrix(Int_t /*up*/)
{return 0;}
Int_t GetStackLevel()
{return fStackLevel;}
Int_t GetTopNode()
{return fTopNode;}
Int_t GetLevel()
{return fLevel;}
Int_t GetFreeSpace()
{return (fGeoCacheMaxSize-fSize);}
TGeoMatrixCache * GetMatrixPool()
{return fMatrixPool;}
Int_t GetNfree()
{return (fSize-fNused);}
Int_t GetNused()
{return fNused;}
Int_t GetSize()
{return fSize;}
Bool_t HasIdArray()
{return (fNodeIdArray)?kTRUE:kFALSE;}
void IncreasePool(Int_t size)
Int_t Index(Int_t nindex)
{return (nindex & 0xFFFFFF);}
Bool_t IsDummy()
{return kFALSE;}
void PopDummy(Int_t ipop=9999)
void SetDefaultLevel(Int_t level)
{fDefaultLevel = level;}

Author: Andrei Gheata 18/03/02
Last update: root/geom:$Name: $:$Id: TGeoCache.cxx,v 1.45 2006/07/09 05:27:53 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

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.