ROOT » GEOM » GEOM » TGeoBranchArray

class TGeoBranchArray: public TObject

 TGeoBranchArray - An array of daughter indices making a geometry path.
   Can be used to backup/restore a state. To setup an object of this type,
 one should use:
   TGeoBranchArray *array = new TGeoBranchArray(level);
   array->InitFromNavigator(nav); (To initialize from current navigator state)
 The navigator can be updated to reflect this path array:

Function Members (Methods)

voidTObject::AbstractMethod(const char* method) const
voidAddLevel(Int_t dindex)
virtual voidTObject::AppendPad(Option_t* option = "")
static Long64_tBinarySearch(Long64_t n, const TGeoBranchArray** array, TGeoBranchArray* value)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tCompare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
voidCopyTo(TGeoBranchArray* dest)
size_tDataSize() const
void*DataStart() const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
TGeoNode**GetArray() const
TGeoNode*GetCurrentNode() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
size_tGetLevel() const
const TGeoHMatrix*GetMatrix() const
size_tGetMaxLevel() const
virtual const char*TObject::GetName() const
TGeoNode*GetNode(Int_t level) const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
voidGetPath(TString& path) const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
voidInit(TGeoNode** branch, TGeoMatrix* global, Int_t level)
voidInitFromNavigator(TGeoNavigator* nav)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
Bool_tIsOutside() const
virtual Bool_tIsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
static TGeoBranchArray*MakeCopy(const TGeoBranchArray& other)
static TGeoBranchArray*MakeCopyAt(const TGeoBranchArray& other, void* addr)
static TGeoBranchArray*MakeInstance(size_t maxlevel)
static TGeoBranchArray*MakeInstanceAt(size_t maxlevel, void* addr)
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::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)
Bool_toperator!=(const TGeoBranchArray& other) const
Bool_toperator<(const TGeoBranchArray& other) const
Bool_toperator<=(const TGeoBranchArray& other) const
TGeoBranchArray&operator=(const TGeoBranchArray&)
Bool_toperator==(const TGeoBranchArray& other) const
Bool_toperator>(const TGeoBranchArray& other) const
Bool_toperator>=(const TGeoBranchArray& other) const
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
static voidReleaseInstance(TGeoBranchArray* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
size_tSizeOf() const
static size_tSizeOf(size_t maxlevel)
static size_tSizeOfInstance(size_t maxlevel)
static voidSort(Int_t n, TGeoBranchArray** array, Int_t* index, Bool_t down = kTRUE)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
voidUpdateArray(size_t nobj)
voidUpdateNavigator(TGeoNavigator* nav) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const

Data Members

static TGeoBranchArray::EGeoBATypeskBASelfAlloc
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
TGeoNode**fArray![fMaxLevel+1] Array of nodes
Int_tfLevelBranch depth
TGeoHMatrixfMatrixGlobal matrix (owned)
Int_tfMaxLevelArray length
TGeoNode*fRealArray[1]Beginning address of the array of nodes

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGeoBranchArray(Int_t level)
 Constructor. Alocates the array with a size given by level.
TGeoBranchArray * MakeInstance(size_t maxlevel)
 Make an instance of the class which allocates the node array. To be
 released using ReleaseInstance. If addr is non-zero, the user promised that
 addr contains at least that many bytes:  size_t needed = SizeOf(maxlevel);
TGeoBranchArray * MakeInstanceAt(size_t maxlevel, void* addr)
 Make an instance of the class which allocates the node array. To be
 released using ReleaseInstance. If addr is non-zero, the user promised that
 addr contains at least that many bytes:  size_t needed = SizeOf(maxlevel);
TGeoBranchArray * MakeCopy(const TGeoBranchArray& other)
 Make a copy of a branch array at the location (if indicated)
TGeoBranchArray * MakeCopyAt(const TGeoBranchArray& other, void* addr)
 Make a copy of a branch array at the location (if indicated)
void CopyTo(TGeoBranchArray* dest)
 Raw memcpy of the branch array content to an existing destination.
void ReleaseInstance(TGeoBranchArray* obj)
 Releases the space allocated for the object
void UpdateArray(size_t nobj)
 Updates the internal addresses for n contiguous objects which have the same
 Updates the internal addresses for n contiguous objects which have the same fMaxLevel
TGeoBranchArray(const TGeoBranchArray& )
 Copy constructor. Not callable anymore. Use TGeoBranchArray::MakeCopy instead
TGeoBranchArray& operator=(const TGeoBranchArray& )
 Assignment. Not valid anymore. Use TGeoBranchArray::MakeCopy instead
void AddLevel(Int_t dindex)
 Add and extra daughter to the current path array. No validity check performed !
Long64_t BinarySearch(Long64_t n, const TGeoBranchArray** array, TGeoBranchArray* value)
 Binary search in an array of n pointers to branch arrays, to locate value.
 Returns element index or index of nearest element smaller than value
Int_t Compare(const TObject* obj) const
 Compare with other object of same type. Returns -1 if this is smaller (first
 smaller array value prevails), 0 if equal (size and values) and 1 if this is
void CleanMatrix()
 Garbage collect the stored matrix.
void Init(TGeoNode** branch, TGeoMatrix* global, Int_t level)
 Init the branch array from an array of nodes, the global matrix for the path and
 the level.
void InitFromNavigator(TGeoNavigator* nav)
 Init the branch array from current navigator state.
void GetPath(TString& path) const
 Fill path pointed by the array.
void Print(Option_t* option = "") const
 Print branch information
void Sort(Int_t n, TGeoBranchArray** array, Int_t* index, Bool_t down = kTRUE)
 Sorting of an array of branch array pointers.
void UpdateNavigator(TGeoNavigator* nav) const
 Update the navigator to reflect the branch.
TGeoBranchArray(Int_t level)
size_t SizeOf(size_t maxlevel)
 Equivalent of sizeof function
{ return (sizeof(TGeoBranchArray)+sizeof(TGeoBranchArray*)*(maxlevel)); }
size_t SizeOfInstance(size_t maxlevel)
 Equivalent of sizeof function
{ return (sizeof(TGeoBranchArray)+sizeof(TGeoBranchArray*)*(maxlevel)); }
size_t SizeOf() const
{ return (sizeof(TGeoBranchArray)+sizeof(TGeoBranchArray*)*(fMaxLevel)); }
void * DataStart() const
 The data start should point to the address of the first data member,
 after the virtual table
{return (void*)&fLevel;}
size_t DataSize() const
 The actual size of the data for an instance, excluding the virtual table
{return SizeOf()-size_t(&fLevel)+(size_t)this;}
virtual ~TGeoBranchArray()
 Destructor. Release instance to be called instead
TGeoNode ** GetArray() const
{return fArray;}
size_t GetLevel() const
{return fLevel;}
size_t GetMaxLevel() const
{return fMaxLevel;}
* GetMatrix() const
{return &fMatrix;}
TGeoNode * GetNode(Int_t level) const
{return fArray[level];}
TGeoNode * GetCurrentNode() const
{return fArray[fLevel];}
Bool_t IsSortable() const
{return kTRUE;}
Bool_t IsOutside() const
{return (fLevel<0)?kTRUE:kFALSE;}