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

JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow > Class Template Reference

#include <H1Funs.h>

Inheritance diagram for JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >:

Inheritance graph
[legend]
Collaboration diagram for JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class H1SomeArrayPtr = H1ClonesArrayPtr, class ArrayRow = H1Part>
class JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >

A FillIterator for an H1ClonesArray.

H1 uses many H1ClonesArrayPtr objects to store data on mODS, such as H1PartSelTrackPtr, H1PartCandArrayPtr etc. An JBLH1SomeArrayIterator is a convenient way to define an iterator for such an array.

Changelog:

Definition at line 297 of file H1Funs.h.

Public Member Functions

 JBLH1SomeArrayIterator ()
 Default constructor.

 JBLH1SomeArrayIterator (const char *branchname_)
 Constructor from a branch name.

 JBLH1SomeArrayIterator (const H1SomeArrayPtr &ptr_, const char *pointername_=0)
 Constructor from an existing pointer.

virtual int operator() () const
 Returns iterator value, starting at 0.

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.

virtual FloatFunGetP () const
 Returns a FloatFun object that gives the momentum P.

virtual FloatFunGetPt () const
 Returns a FloatFun object that gives the transverse momentum Pt.

virtual FloatFunGetPz () const
 Returns a FloatFun object that gives the longitudinal momentum Pz.

virtual FloatFunGetE () const
 Returns a FloatFun object that gives the energy E.

virtual FloatFunGetPhi () const
 Returns a FloatFun object that gives the azimuthal angle Phi.

virtual FloatFunGetTheta () const
 Returns a FloatFun object that gives the polar angle Theta.

virtual FloatFunGetMass () const
 Returns a FloatFun object that gives the Mass.

virtual FloatFunGetCharge () const
 Returns a FloatFun object that gives the Charge.

const char * getBranchName () const
template<class H1PartSome, class TM> FloatFunFloat (TM(H1PartSome::*p_mem)() const, const char *attribname="?") const
 Returns a FloatFun object.

template<class H1PartSome, class TM> FloatFunGetFloatFun (TM(H1PartSome::*p_mem)() const, const char *attribname="?") const
 Returns a FloatFun object.

template<class H1PartSome, class TM> IntFunInt (TM(H1PartSome::*p_mem)() const, const char *attribname="?") const
 Returns an IntFun object.

template<class H1PartSome, class TM> IntFunGetIntFun (TM(H1PartSome::*p_mem)() const, const char *attribname="?") const
 Returns an IntFun object.

template<class H1PartSome, class TM> BaseCutBool (TM(H1PartSome::*p_mem)() const, const char *attribname="?") const
 Returns a BaseCut object.

template<class H1PartSome, class TM> BaseCutGetBaseCut (TM(H1PartSome::*p_mem)() const, const char *attribname="?") const
 Returns a BaseCut object.

const H1SomeArrayPtr & getBranchPointer () const
 Returns the branch pointer.


Protected Member Functions

virtual ~JBLH1SomeArrayIterator ()
 Protected destructor to ensure creation on the heap.


Private Attributes

const H1SomeArrayPtr & ptr
 The pointer to the H1ClonesArray.

int index
 The index.


Constructor & Destructor Documentation

template<class H1SomeArrayPtr = H1ClonesArrayPtr, class ArrayRow = H1Part>
JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::JBLH1SomeArrayIterator const char *  branchname_  )  [inline, explicit]
 

Constructor from a branch name.

Parameters:
branchname_  The branch name

Definition at line 311 of file H1Funs.h.

References NamedO::getName(), JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::index, and JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::ptr.

template<class H1SomeArrayPtr = H1ClonesArrayPtr, class ArrayRow = H1Part>
JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::JBLH1SomeArrayIterator const H1SomeArrayPtr &  ptr_,
const char *  pointername_ = 0
[inline, explicit]
 

Constructor from an existing pointer.

Parameters:
ptr_  The branch pointer
pointername_  An optional pointer branch name

Definition at line 322 of file H1Funs.h.

References NamedO::getName(), JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::index, and JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::ptr.


Member Function Documentation

template<class H1SomeArrayPtr, class ArrayRow>
template<class H1PartSome, class TM>
FloatFun & JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::Float TM(H1PartSome::*  p_mem)() const,
const char *  attribname = "?"
const [inline]
 

Returns a FloatFun object.

Parameters:
p_mem  The access method
attribname  An optional attribute name

Definition at line 698 of file H1Funs.h.

template<class H1SomeArrayPtr, class ArrayRow>
template<class H1PartSome, class TM>
FloatFun & JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::GetFloatFun TM(H1PartSome::*  p_mem)() const,
const char *  attribname = "?"
const [inline]
 

Returns a FloatFun object.

Parameters:
p_mem  The access method
attribname  An optional attribute name

Definition at line 703 of file H1Funs.h.

template<class H1SomeArrayPtr, class ArrayRow>
template<class H1PartSome, class TM>
IntFun & JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::Int TM(H1PartSome::*  p_mem)() const,
const char *  attribname = "?"
const [inline]
 

Returns an IntFun object.

Parameters:
p_mem  The access method
attribname  An optional attribute name

Definition at line 709 of file H1Funs.h.

template<class H1SomeArrayPtr, class ArrayRow>
template<class H1PartSome, class TM>
IntFun & JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::GetIntFun TM(H1PartSome::*  p_mem)() const,
const char *  attribname = "?"
const [inline]
 

Returns an IntFun object.

Parameters:
p_mem  The access method
attribname  An optional attribute name

Definition at line 714 of file H1Funs.h.

template<class H1SomeArrayPtr, class ArrayRow>
template<class H1PartSome, class TM>
BaseCut & JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::Bool TM(H1PartSome::*  p_mem)() const,
const char *  attribname = "?"
const [inline]
 

Returns a BaseCut object.

Parameters:
p_mem  The access method
attribname  An optional attribute name

Definition at line 720 of file H1Funs.h.

template<class H1SomeArrayPtr, class ArrayRow>
template<class H1PartSome, class TM>
BaseCut & JBLH1SomeArrayIterator< H1SomeArrayPtr, ArrayRow >::GetBaseCut TM(H1PartSome::*  p_mem)() const,
const char *  attribname = "?"
const [inline]
 

Returns a BaseCut object.

Parameters:
p_mem  The access method
attribname  An optional attribute name

Definition at line 725 of file H1Funs.h.


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