AliPhysics  vAN-20151014 (f894c76)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliEmcalTriggerDataGrid< T > Class Template Reference

Container for ADC / Amplitudes from the EMCAL triggers. More...

#include <AliEmcalTriggerDataGrid.h>

Inheritance diagram for AliEmcalTriggerDataGrid< T >:

Classes

class  OutOfBoundsException
 Exception class handling access to non-existing container element. More...
 
class  UninitException
 Error handling for uninitialized grid. More...
 

Public Member Functions

 AliEmcalTriggerDataGrid ()
 
 AliEmcalTriggerDataGrid (Int_t cols, Int_t rows)
 
 AliEmcalTriggerDataGrid (const AliEmcalTriggerDataGrid< T > &ref)
 
AliEmcalTriggerDataGrid< T > & operator= (const AliEmcalTriggerDataGrid< T > &ref)
 
const T & operator() (Int_t col, Int_t row) const
 
T & operator() (Int_t col, Int_t row)
 
virtual ~AliEmcalTriggerDataGrid ()
 
void Reset ()
 
Bool_t IsAllocated () const
 
void Allocate (Int_t ncols, Int_t nrows)
 
void SetADC (Int_t col, Int_t row, const T &adc)
 
const T & GetADC (Int_t col, Int_t row) const
 
Int_t GetNumberOfCols () const
 
Int_t GetNumberOfRows () const
 

Protected Member Functions

Int_t GetIndex (Int_t col, Int_t row) const
 

Protected Attributes

Int_t fNCols
 Number of columns. More...
 
Int_t fNRows
 Number of rows. More...
 
T * fValues
 Array of Trigger ADC values. More...
 

Detailed Description

template<typename T>
class AliEmcalTriggerDataGrid< T >

Container for ADC / Amplitudes from the EMCAL triggers.

Dynamical-size container for ADC values from the FASTOR

Definition at line 18 of file AliEmcalTriggerDataGrid.h.

Constructor & Destructor Documentation

template<typename T >
AliEmcalTriggerDataGrid< T >::AliEmcalTriggerDataGrid ( )

Dummy constructor, does not allocate anything

Definition at line 22 of file AliEmcalTriggerDataGrid.cxx.

template<typename T >
AliEmcalTriggerDataGrid< T >::AliEmcalTriggerDataGrid ( Int_t  cols,
Int_t  rows 
)

Constructror Allocates also for storage for the ADC values / amplitudes

Parameters
colsNumber of cols
rowsNumber of rows

Definition at line 30 of file AliEmcalTriggerDataGrid.cxx.

template<typename T>
AliEmcalTriggerDataGrid< T >::AliEmcalTriggerDataGrid ( const AliEmcalTriggerDataGrid< T > &  ref)

Copy constructor New channel map will get its own storage. The content of the ref storage will be copied into this storage

Parameters
refReference for the copy

Definition at line 40 of file AliEmcalTriggerDataGrid.cxx.

template<typename T >
AliEmcalTriggerDataGrid< T >::~AliEmcalTriggerDataGrid ( )
virtual

Destructor

Definition at line 79 of file AliEmcalTriggerDataGrid.cxx.

Member Function Documentation

template<typename T >
void AliEmcalTriggerDataGrid< T >::Allocate ( Int_t  ncols,
Int_t  nrows 
)

Definition at line 84 of file AliEmcalTriggerDataGrid.cxx.

Referenced by AliEmcalTriggerMaker::ExecOnce().

template<typename T >
const T & AliEmcalTriggerDataGrid< T >::GetADC ( Int_t  col,
Int_t  row 
) const

Get ADC value at position (col, row). Checks for boundary.

Parameters
col
row
Returns
Exceptions
OutOfBoundsExceptionin case the index in any direction is out of bounds
UninitExceptionin case the grid is not initialized (allocated)

Definition at line 123 of file AliEmcalTriggerDataGrid.cxx.

template<typename T >
Int_t AliEmcalTriggerDataGrid< T >::GetIndex ( Int_t  col,
Int_t  row 
) const
protected

Get grid index in the ADC value list

Parameters
colColumn of the grid
rowRow of the grid
Returns
Grid index

Definition at line 134 of file AliEmcalTriggerDataGrid.cxx.

template<typename T>
Int_t AliEmcalTriggerDataGrid< T >::GetNumberOfCols ( ) const
inline

Get the number of columns in the map

Returns
The number of colums

Definition at line 207 of file AliEmcalTriggerDataGrid.h.

template<typename T>
Int_t AliEmcalTriggerDataGrid< T >::GetNumberOfRows ( ) const
inline

Get the number of rows in the map

Returns

Definition at line 213 of file AliEmcalTriggerDataGrid.h.

template<typename T>
Bool_t AliEmcalTriggerDataGrid< T >::IsAllocated ( ) const
inline

Definition at line 179 of file AliEmcalTriggerDataGrid.h.

template<typename T >
const T & AliEmcalTriggerDataGrid< T >::operator() ( Int_t  col,
Int_t  row 
) const

Constant acces operator at position (col, row)

Parameters
colColumn
rowRow
Returns
Constant reference to entry at that position (can not modify the entry)

Definition at line 63 of file AliEmcalTriggerDataGrid.cxx.

template<typename T >
T & AliEmcalTriggerDataGrid< T >::operator() ( Int_t  col,
Int_t  row 
)

Access operator at position (col, row)

Parameters
colColumn
rowRow
Returns
Reference to entry at that position (can modify the entry)

Definition at line 71 of file AliEmcalTriggerDataGrid.cxx.

template<typename T>
AliEmcalTriggerDataGrid< T > & AliEmcalTriggerDataGrid< T >::operator= ( const AliEmcalTriggerDataGrid< T > &  ref)

Assignment operator New channel map will get its own storage. The content of the ref storage will be copied into this storage

Parameters
refReference for the copy
Returns
This channel map

Definition at line 50 of file AliEmcalTriggerDataGrid.cxx.

template<typename T >
void AliEmcalTriggerDataGrid< T >::Reset ( )

Set the ADC values stored in the 2D map again to 0

Definition at line 118 of file AliEmcalTriggerDataGrid.cxx.

Referenced by AliEmcalTriggerMaker::Run().

template<typename T>
void AliEmcalTriggerDataGrid< T >::SetADC ( Int_t  col,
Int_t  row,
const T &  adc 
)

Set ADC value for position (col, row). Checks for boundary.

Parameters
colColumn of the position
rowRow of the position
ADCThe value to set
Exceptions
OutOfBoundsExceptionin case the index in any direction is out of bounds
UninitExceptionin case the grid is not initialized (allocated)

Definition at line 107 of file AliEmcalTriggerDataGrid.cxx.

Member Data Documentation

template<typename T>
T* AliEmcalTriggerDataGrid< T >::fValues
protected

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