TMBCellContainer Class Reference
[Calorimeter]

#include <TMBCellContainer.hpp>

List of all members.


Detailed Description

A container class to store calorimeter cells.

This class contains a unique instance of each calorimeter cell that is stored in a CAF root file. Other objects can reference the cells via a 16 bit index. The index is returned when a new cell is added.

Branch: CaloCells

See also:
: TMBCaloCell

Definition at line 21 of file TMBCellContainer.hpp.

Public Types

typedef UShort_t Index_t
 The index to address calorimeter cells in the container.


Public Member Functions

 TMBCellContainer ()
 ~TMBCellContainer ()
UInt_t NumCells () const
 Number of cells stored in the container.

const TMBCaloCellGetCell (Index_t index) const
 Get a Calo cell based on index.

const TMBCaloCellGetCell (Char_t ieta, UChar_t iphi, UChar_t ilayer) const
 Get a Calo cell based on eta, phi, layer.

Index_t GetIndex (Char_t ieta, UChar_t iphi, UChar_t ilayer) const
 Get the index of a cell based on eta,phi,layer.

Index_t AddCell (Char_t ieta, UChar_t iphi, UChar_t ilayer, Float_t energy, UChar_t flags=0)
 Add a new cell.

void ClearCells ()
 Clear internal container.

Bool_t IsFolder () const
 Inherited from TObject. Allow contents of this object to be browsed.

 ClassDef (TMBCellContainer, 1)

Private Attributes

std::vector< TMBCaloCell_cells


Member Typedef Documentation

typedef UShort_t TMBCellContainer::Index_t
 

The index to address calorimeter cells in the container.

Definition at line 28 of file TMBCellContainer.hpp.

Referenced by AddCell(), GetCell(), and GetIndex().


Constructor & Destructor Documentation

TMBCellContainer::TMBCellContainer  ) 
 

Definition at line 26 of file TMBCellContainer.cpp.

TMBCellContainer::~TMBCellContainer  ) 
 

Definition at line 30 of file TMBCellContainer.cpp.


Member Function Documentation

TMBCellContainer::Index_t TMBCellContainer::AddCell Char_t  ieta,
UChar_t  iphi,
UChar_t  ilayer,
Float_t  energy,
UChar_t  flags = 0
 

Add a new cell.

If the cell already exists in the container, just return the existing index.

Definition at line 66 of file TMBCellContainer.cpp.

References _cells, GetIndex(), Index_t, and INVALID_CELL.

TMBCellContainer::ClassDef TMBCellContainer  ,
 

void TMBCellContainer::ClearCells  ) 
 

Clear internal container.

Definition at line 87 of file TMBCellContainer.cpp.

References _cells.

const TMBCaloCell * TMBCellContainer::GetCell Char_t  ieta,
UChar_t  iphi,
UChar_t  ilayer
const
 

Get a Calo cell based on eta, phi, layer.

Returns NULL pointer if the cell does not exist in the container.

Definition at line 46 of file TMBCellContainer.cpp.

const TMBCaloCell * TMBCellContainer::GetCell Index_t  index  )  const
 

Get a Calo cell based on index.

Returns NULL pointer if index is too large (i.e. greater or equal than NumCells()).

Definition at line 40 of file TMBCellContainer.cpp.

References _cells, and Index_t.

Referenced by TMBJet::GetCaloCell(), TMBEMCluster::GetCaloCell(), TMBCalT42::GetCell(), and TMBCalNada::GetCell().

TMBCellContainer::Index_t TMBCellContainer::GetIndex Char_t  ieta,
UChar_t  iphi,
UChar_t  ilayer
const
 

Get the index of a cell based on eta,phi,layer.

Returns INVALID_CELL if the cell does not exist in the container.

Definition at line 52 of file TMBCellContainer.cpp.

References _cells, Index_t, and INVALID_CELL.

Referenced by AddCell().

Bool_t TMBCellContainer::IsFolder  )  const
 

Inherited from TObject. Allow contents of this object to be browsed.

Definition at line 92 of file TMBCellContainer.cpp.

UInt_t TMBCellContainer::NumCells  )  const
 

Number of cells stored in the container.

Definition at line 34 of file TMBCellContainer.cpp.

References _cells.

Referenced by TMBJet::GetCaloCell(), and TMBEMCluster::GetCaloCell().


Member Data Documentation

std::vector<TMBCaloCell> TMBCellContainer::_cells [private]
 

Definition at line 23 of file TMBCellContainer.hpp.

Referenced by AddCell(), ClearCells(), GetCell(), GetIndex(), and NumCells().


The documentation for this class was generated from the following files:
Generated on Thu Apr 3 04:14:25 2008 for CAF by doxygen 1.3.4