Logo ROOT   6.18/05
Reference Guide
TRefArrayProxy.cxx
Go to the documentation of this file.
1// @(#)root/meta:$Id$
2// Author: Markus Frank 10/02/2006
3
4/*************************************************************************
5* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6* All rights reserved. *
7* *
8* For the licensing terms see $ROOTSYS/LICENSE. *
9* For the list of contributors see $ROOTSYS/README/CREDITS. *
10*************************************************************************/
11
12#include "TRefArray.h"
13#include "TRefArrayProxy.h"
15
16/** \class TRefArrayProxy
17A container proxy, which allows to access references stored
18in a TRefArray from TTree::Draw
19*/
20
21////////////////////////////////////////////////////////////////////////////////
22/// Access referenced object(-data)
23
24void* TRefArrayProxy::GetObject(TFormLeafInfoReference* /*info*/, void* data, Int_t instance) {
25 TRefArray* ref = (TRefArray*)data;//((char*)data + info->GetOffset());
26 return ref->At(instance);
27}
28
29////////////////////////////////////////////////////////////////////////////////
30/// TVirtualRefProxy overload: Access to container size (if container reference (ie TRefArray) etc)
31
33 TRefArray* ref = (TRefArray*)data;
34 return ref->GetEntriesFast();
35}
int Int_t
Definition: RtypesCore.h:41
A small helper class to implement the following of reference objects stored in a TTree.
virtual void * GetObject(TFormLeafInfoReference *info, void *data, Int_t instance)
Access referenced object(-data)
virtual Int_t GetCounterValue(TFormLeafInfoReference *info, void *data)
TVirtualRefProxy overload: Access to container size (if container reference (ie TRefArray) etc)
An array of references to TObjects.
Definition: TRefArray.h:39
Int_t GetEntriesFast() const
Definition: TRefArray.h:70
TObject * At(Int_t idx) const
Definition: TRefArray.h:180