emcClusterContainerT< T > Class Template Reference

#include <emcClusterContainerT.h>

Inherits emcClusterContainer.

Inheritance diagram for emcClusterContainerT< T >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class T>
class emcClusterContainerT< T >

(TEMPLATE) Implementation of emcClusterContainer based on TClonesArray.

Author:
Laurent Aphecetche

Definition at line 15 of file emcClusterContainerT.h.

Public Member Functions

 emcClusterContainerT ()
 emcClusterContainerT (unsigned int defaultsize)
 emcClusterContainerT (const emcClusterContainerT &)
emcClusterContainerToperator= (const emcClusterContainerT &)
unsigned int capacity (void) const
emcClusterContainerTclone (void) const
emcClusterContainerTcreate (void) const
virtual ~emcClusterContainerT ()
T * addCluster (unsigned int i)
 Add a new cluster (using default emcClusterContentv# ctor).
T * addCluster (unsigned int i, const emcClusterContent &c)
 Add a new cluster (using copy ctor).
T * findCluster (int clusterid) const
T * getCluster (unsigned int i) const
void identify (std::ostream &os=std::cout) const
int isValid () const
bool removeCluster (unsigned int i)
void Reset ()
bool resize (unsigned int newsize)
unsigned int size (void) const

Protected Attributes

TClonesArray * fEmcClusters

Private Member Functions

void allocate (unsigned int thesize)
void copy (emcClusterContainerT< T > &dest) const
void clear (TClonesArray &array)
bool expand (unsigned int)
bool expand_for (unsigned int)

Static Private Attributes

static const unsigned int fgDefaultSize = 1000
static const unsigned int fgMaxSize = 24768


Constructor & Destructor Documentation

template<class T>
emcClusterContainerT< T >::emcClusterContainerT  ) 
 

Definition at line 86 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::allocate().

template<class T>
emcClusterContainerT< T >::emcClusterContainerT unsigned int  defaultsize  ) 
 

Definition at line 93 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::allocate().

template<class T>
emcClusterContainerT< T >::emcClusterContainerT const emcClusterContainerT< T > &   ) 
 

template<class T>
emcClusterContainerT< T >::~emcClusterContainerT  )  [virtual]
 

Definition at line 121 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::clear(), and emcClusterContainerT< T >::fEmcClusters.


Member Function Documentation

template<class T>
T * emcClusterContainerT< T >::addCluster unsigned int  i,
const emcClusterContent c
[virtual]
 

Add a new cluster (using copy ctor).

c must be of compatible type, otherwise this will return 0.

Reimplemented from emcClusterContainer.

Definition at line 148 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::capacity(), emcClusterContainerT< T >::expand_for(), and test().

template<class T>
T * emcClusterContainerT< T >::addCluster unsigned int  i  )  [virtual]
 

Add a new cluster (using default emcClusterContentv# ctor).

Reimplemented from emcClusterContainer.

Definition at line 130 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::capacity(), and emcClusterContainerT< T >::expand_for().

Referenced by emcClusterContainerT< T >::copy().

template<class T>
void emcClusterContainerT< T >::allocate unsigned int  thesize  )  [private]
 

Definition at line 176 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::clear(), and emcClusterContainerT< T >::fEmcClusters.

Referenced by emcClusterContainerT< T >::copy(), and emcClusterContainerT< T >::emcClusterContainerT().

template<class T>
unsigned int emcClusterContainerT< T >::capacity void   )  const [virtual]
 

Reimplemented from emcClusterContainer.

Definition at line 189 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::fEmcClusters.

Referenced by emcClusterContainerT< T >::addCluster(), and emcClusterContainerT< T >::expand_for().

template<class T>
void emcClusterContainerT< T >::clear TClonesArray &  array  )  [private]
 

Definition at line 197 of file emcClusterContainerT.h.

Referenced by emcClusterContainerT< T >::allocate(), emcClusterContainerT< T >::Reset(), and emcClusterContainerT< T >::~emcClusterContainerT().

template<class T>
emcClusterContainerT< T > * emcClusterContainerT< T >::clone void   )  const [virtual]
 

Reimplemented from emcClusterContainer.

Definition at line 210 of file emcClusterContainerT.h.

template<class T>
void emcClusterContainerT< T >::copy emcClusterContainerT< T > &  dest  )  const [private]
 

Definition at line 226 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::addCluster(), emcClusterContainerT< T >::allocate(), emcClusterContainerT< T >::fEmcClusters, emcClusterContainerT< T >::getCluster(), emcClusterContainerT< T >::Reset(), and emcClusterContainerT< T >::size().

template<class T>
emcClusterContainerT< T > * emcClusterContainerT< T >::create void   )  const [virtual]
 

Reimplemented from emcClusterContainer.

Definition at line 218 of file emcClusterContainerT.h.

template<class T>
bool emcClusterContainerT< T >::expand unsigned  int  )  [private]
 

Definition at line 251 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::fEmcClusters, and emcClusterContainerT< T >::fgMaxSize.

Referenced by emcClusterContainerT< T >::expand_for(), and emcClusterContainerT< T >::resize().

template<class T>
bool emcClusterContainerT< T >::expand_for unsigned  int  )  [private]
 

Definition at line 273 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::capacity(), emcClusterContainerT< T >::expand(), emcClusterContainerT< T >::fgMaxSize, and min.

Referenced by emcClusterContainerT< T >::addCluster().

template<class T>
T * emcClusterContainerT< T >::findCluster int  clusterid  )  const [virtual]
 

Reimplemented from emcClusterContainer.

Definition at line 295 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::getCluster(), and emcClusterContainerT< T >::size().

template<class T>
T * emcClusterContainerT< T >::getCluster unsigned int  i  )  const [virtual]
 

Reimplemented from emcClusterContainer.

Definition at line 310 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::fEmcClusters.

Referenced by emcClusterContainerT< T >::copy(), and emcClusterContainerT< T >::findCluster().

template<class T>
void emcClusterContainerT< T >::identify std::ostream &  os = std::cout  )  const [virtual]
 

Reimplemented from emcClusterContainer.

template<class T>
int emcClusterContainerT< T >::isValid  )  const [virtual]
 

Reimplemented from emcClusterContainer.

Definition at line 328 of file emcClusterContainerT.h.

template<class T>
emcClusterContainerT& emcClusterContainerT< T >::operator= const emcClusterContainerT< T > &   ) 
 

template<class T>
bool emcClusterContainerT< T >::removeCluster unsigned int  i  )  [virtual]
 

Reimplemented from emcClusterContainer.

Definition at line 344 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::fEmcClusters, and emcClusterContainerT< T >::size().

template<class T>
void emcClusterContainerT< T >::Reset  )  [virtual]
 

Reimplemented from emcClusterContainer.

Definition at line 336 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::clear(), and emcClusterContainerT< T >::fEmcClusters.

Referenced by emcClusterContainerT< T >::copy(), and emcClusterContainerT< T >::resize().

template<class T>
bool emcClusterContainerT< T >::resize unsigned int  newsize  )  [virtual]
 

Reimplemented from emcClusterContainer.

Definition at line 361 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::expand(), emcClusterContainerT< T >::fEmcClusters, emcClusterContainerT< T >::Reset(), and emcClusterContainerT< T >::size().

template<class T>
unsigned int emcClusterContainerT< T >::size void   )  const [virtual]
 

Reimplemented from emcClusterContainer.

Definition at line 378 of file emcClusterContainerT.h.

References emcClusterContainerT< T >::fEmcClusters.

Referenced by emcClusterContainerT< T >::copy(), emcClusterContainerT< T >::findCluster(), emcClusterContainerT< T >::removeCluster(), and emcClusterContainerT< T >::resize().


Member Data Documentation

template<class T>
TClonesArray* emcClusterContainerT< T >::fEmcClusters [protected]
 

Definition at line 53 of file emcClusterContainerT.h.

Referenced by emcClusterContainerT< T >::allocate(), emcClusterContainerT< T >::capacity(), emcClusterContainerT< T >::copy(), emcClusterContainerT< T >::expand(), emcClusterContainerT< T >::getCluster(), emcClusterContainerT< T >::removeCluster(), emcClusterContainerT< T >::Reset(), emcClusterContainerT< T >::resize(), emcClusterContainerT< T >::size(), and emcClusterContainerT< T >::~emcClusterContainerT().

template<class T>
const unsigned int emcClusterContainerT< T >::fgDefaultSize = 1000 [static, private]
 

Definition at line 62 of file emcClusterContainerT.h.

template<class T>
const unsigned int emcClusterContainerT< T >::fgMaxSize = 24768 [static, private]
 

Definition at line 63 of file emcClusterContainerT.h.

Referenced by emcClusterContainerT< T >::expand(), and emcClusterContainerT< T >::expand_for().


The documentation for this class was generated from the following file: