TRefArrayProxy.cxx

Go to the documentation of this file.
00001 // @(#)root/meta:$Id: TRefArrayProxy.cxx 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Markus Frank  10/02/2006
00003 
00004 /*************************************************************************
00005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006 * All rights reserved.                                                  *
00007 *                                                                       *
00008 * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010 *************************************************************************/
00011 
00012 #include "TRefArray.h"
00013 #include "TRefArrayProxy.h"
00014 #include "TFormLeafInfoReference.h"
00015 
00016 //______________________________________________________________________________
00017 //
00018 // TRefArrayProxy is a container proxy, which allows to access references stored
00019 // in a TRefArray from TTree::Draw
00020 
00021 //______________________________________________________________________________
00022 void* TRefArrayProxy::GetObject(TFormLeafInfoReference* /*info*/, void* data, Int_t instance)  {
00023    // Access referenced object(-data)
00024 
00025    TRefArray* ref = (TRefArray*)data;//((char*)data + info->GetOffset());
00026    return ref->At(instance);
00027 }
00028 
00029 //______________________________________________________________________________
00030 Int_t  TRefArrayProxy::GetCounterValue(TFormLeafInfoReference* /*info*/, void* data)   {
00031    // TVirtualRefProxy overload: Access to container size (if container reference (ie TRefArray) etc)
00032 
00033    TRefArray* ref = (TRefArray*)data;
00034    return ref->GetEntriesFast();
00035 }

Generated on Tue Jul 5 15:43:00 2011 for ROOT_528-00b_version by  doxygen 1.5.1