Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

NTFillIterator< Ntuple, T > Class Template Reference

#include <NTFillIterator.h>

Inheritance diagram for NTFillIterator< Ntuple, T >:

Inheritance graph
[legend]
Collaboration diagram for NTFillIterator< Ntuple, T >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class Ntuple, class T = Int_t>
class NTFillIterator< Ntuple, T >

A FillIterator from an ntuple variable.

An NTFillIterator collaborates with a class Ntuple, which automatically generated by TTree::MakeClass. The branch name given must correspond to an Int_t that represent the number of entries (jets, tracks, whatever) over which one wants to iterate.

The first template argument is the class name of the ntuple class that was automatically generated by TTree::MakeClass. The second (optional) template argument is the type of the branch variable; this is useful if the branch contains not Int_t objects, but short or char values.

Author: Benno List, Jenny Böhme

Date
2005/06/04 16:27:51
Author
blist

Changelog:

Definition at line 43 of file NTFillIterator.h.

Public Member Functions

 NTFillIterator (const Ntuple &nt_, const char *branchname)
 Constructor using a branch name.

 NTFillIterator (const Ntuple &nt_, T Ntuple::*p_mem, const char *objectname="?")
 Constructor using a member pointer.

virtual int operator() () const
 Returns iterator value, starting at 0; "-1" means "invalid".

virtual bool next ()
 Increments iterator; returns false if iterator cannot be incremented.

virtual bool reset ()
 Resets iterator; returns false if iterator value range is empty.

virtual bool isValid () const
 Returns whether current value of iterator is valid.


Protected Member Functions

virtual ~NTFillIterator ()
 Protected destructor ensures creation on the heap.


Protected Attributes

const Ntuple & nt
 The ntuple.

const T * branchAddress
 The branch adress.

int index
 The current index value.


Related Functions

(Note that these are not member functions.)

NTFillIterator< Ntuple, T > & ntfilliterator (const Ntuple &nt, T Ntuple::*p_mem, const char *objectname="?")
 returns a FillIterator from an ntuple data member


Constructor & Destructor Documentation

template<class Ntuple, class T = Int_t>
NTFillIterator< Ntuple, T >::NTFillIterator const Ntuple &  nt_,
const char *  branchname
[inline]
 

Constructor using a branch name.

Parameters:
nt_  The ntuple
branchname  The branch name

Definition at line 46 of file NTFillIterator.h.

References NTFillIterator< Ntuple, T >::branchAddress, NamedO::getName(), NTFillIterator< Ntuple, T >::index, and NTFillIterator< Ntuple, T >::nt.

template<class Ntuple, class T = Int_t>
NTFillIterator< Ntuple, T >::NTFillIterator const Ntuple &  nt_,
T Ntuple::*  p_mem,
const char *  objectname = "?"
[inline]
 

Constructor using a member pointer.

Parameters:
nt_  The ntuple
p_mem  Member pointer
objectname  The object's name

Definition at line 66 of file NTFillIterator.h.

References NTFillIterator< Ntuple, T >::branchAddress, NamedO::getName(), NTFillIterator< Ntuple, T >::index, and NTFillIterator< Ntuple, T >::nt.


Friends And Related Function Documentation

template<class Ntuple, class T = Int_t>
NTFillIterator< Ntuple, T > & ntfilliterator const Ntuple &  nt,
T Ntuple::*  p_mem,
const char *  objectname = "?"
[related]
 

returns a FillIterator from an ntuple data member

Parameters:
nt  The ntuple
p_mem  Member pointer
objectname  The object's name

Definition at line 118 of file NTFillIterator.h.


The documentation for this class was generated from the following file:
Generated on Thu Oct 26 12:54:56 2006 for SFH by doxygen 1.3.2