AliRoot Core  edcc906 (edcc906)
AliFMDFloatMap Class Reference

#include <AliFMDFloatMap.h>

Inheritance diagram for AliFMDFloatMap:

Public Member Functions

 AliFMDFloatMap ()
 
 AliFMDFloatMap (Int_t maxDet, Int_t maxRing=0, Int_t maxSec=0, Int_t maxStr=0)
 
 AliFMDFloatMap (const AliFMDMap &o)
 
 AliFMDFloatMap (const AliFMDFloatMap &o)
 
virtual ~AliFMDFloatMap ()
 
AliFMDFloatMapoperator= (const AliFMDFloatMap &o)
 
virtual void Reset (const Float_t &v=Float_t())
 
virtual Float_t & operator() (UShort_t det, Char_t ring, UShort_t sec, UShort_t str)
 
virtual const Float_t & operator() (UShort_t det, Char_t ring, UShort_t sec, UShort_t str) const
 
Float_t * Data () const
 
void Print (Option_t *option="%8.4f") const
 
void * Ptr () const
 
- Public Member Functions inherited from AliFMDMap
 AliFMDMap (UShort_t maxDet=0, UShort_t maxRing=0, UShort_t maxSec=0, UShort_t maxStr=0)
 
 AliFMDMap (const AliFMDMap &other)
 
virtual ~AliFMDMap ()
 
UShort_t MaxDetectors () const
 
UShort_t MaxRings () const
 
UShort_t MaxSectors () const
 
UShort_t MaxStrips () const
 
void CalcCoords (Int_t idx, UShort_t &det, Char_t &ring, UShort_t &sec, UShort_t &str) const
 
Int_t CalcIndex (UShort_t det, Char_t ring, UShort_t sec, UShort_t str) const
 
Int_t CheckIndex (UShort_t det, Char_t ring, UShort_t sec, UShort_t str) const
 
void CheckNeedUShort (TFile *file)
 
AliFMDMapoperator*= (const AliFMDMap &o)
 
AliFMDMapoperator/= (const AliFMDMap &o)
 
AliFMDMapoperator+= (const AliFMDMap &o)
 
AliFMDMapoperator-= (const AliFMDMap &o)
 
virtual Bool_t ForEach (ForOne &algo) const
 
virtual Int_t AtAsInt (Int_t idx) const
 
virtual Int_t & AtAsInt (Int_t idx)
 
virtual UShort_t AtAsUShort (Int_t idx) const
 
virtual UShort_t & AtAsUShort (Int_t idx)
 
virtual Bool_t AtAsBool (Int_t idx) const
 
virtual Bool_t & AtAsBool (Int_t idx)
 
virtual Bool_t IsInt () const
 
virtual Bool_t IsUShort () const
 
virtual Bool_t IsBool () const
 

Protected Member Functions

Int_t MaxIndex () const
 
Float_t AtAsFloat (Int_t i) const
 
Float_t & AtAsFloat (Int_t i)
 
Bool_t IsFloat () const
 
- Protected Member Functions inherited from AliFMDMap
Int_t Coords2Index (UShort_t det, Char_t ring, UShort_t sec, UShort_t str) const
 
Int_t Coords2IndexOld (UShort_t det, Char_t ring, UShort_t sec, UShort_t str) const
 
void Index2CoordsOld (Int_t idx, UShort_t &det, Char_t &ring, UShort_t &sec, UShort_t &str) const
 
void Index2Coords (Int_t idx, UShort_t &det, Char_t &ring, UShort_t &sec, UShort_t &str) const
 

Protected Attributes

Int_t fTotal
 
Float_t * fData
 
- Protected Attributes inherited from AliFMDMap
UShort_t fMaxDetectors
 
UShort_t fMaxRings
 
UShort_t fMaxSectors
 
UShort_t fMaxStrips
 

Additional Inherited Members

- Public Types inherited from AliFMDMap
enum  { kMaxDetectors = 3, kMaxRings = 2, kMaxSectors = 40, kMaxStrips = 512 }
 
enum  { kInner = 0, kOuter }
 
enum  { kNStripOuter = 256, kNStripInner = 512 }
 
enum  { kNSectorInner = 20, kNSectorOuter = 40 }
 
enum  { kBaseInner = 0, kBaseOuter = kNSectorInner * kNStripInner }
 
enum  { kFMD1Base = 0, kFMD2Base = kNSectorInner * kNStripInner, kFMD3Base = (kBaseOuter + kNSectorOuter * kNStripOuter + kFMD2Base) }
 
enum  { kNeedUShort = 14 }
 

Detailed Description

Definition at line 20 of file AliFMDFloatMap.h.

Constructor & Destructor Documentation

AliFMDFloatMap::AliFMDFloatMap ( )

Definition at line 67 of file AliFMDFloatMap.cxx.

AliFMDFloatMap::AliFMDFloatMap ( Int_t  maxDet,
Int_t  maxRing = 0,
Int_t  maxSec = 0,
Int_t  maxStr = 0 
)

Definition at line 78 of file AliFMDFloatMap.cxx.

AliFMDFloatMap::AliFMDFloatMap ( const AliFMDMap o)

Definition at line 38 of file AliFMDFloatMap.cxx.

AliFMDFloatMap::AliFMDFloatMap ( const AliFMDFloatMap o)

Definition at line 51 of file AliFMDFloatMap.cxx.

virtual AliFMDFloatMap::~AliFMDFloatMap ( )
inlinevirtual

Definition at line 30 of file AliFMDFloatMap.h.

Member Function Documentation

Float_t AliFMDFloatMap::AtAsFloat ( Int_t  idx) const
inlineprotectedvirtual

Virtal function to get the value at index idx as a floating point number.

Note
Even if the map is not floating point valued the sub-class can define this member function to allow non l-value usage of the data in the map. That is, if a is a floating point valued map, and b is not, then if the class B of b implements this member function, expression like
*   a += b;
* 

multiplies each element of a (floating points) with each element of c according to the definition of B::AtAsFloat (const version).

Parameters
idxIndex number
Returns
Value at index as a floating point number

Reimplemented from AliFMDMap.

Definition at line 46 of file AliFMDFloatMap.h.

Float_t& AliFMDFloatMap::AtAsFloat ( Int_t  idx)
inlineprotectedvirtual

Virtal function to get the value at index idx as a floating point number.

This member function should only be defined if the map is a floating point valued, and can be assigned floating point valued values. That is, if the map's elements are anything but float then this member function should not be defined in the derived class. That will prevent expressions like

a += b;

where a is non-floating point valued, and b is floating point valued (only).

Parameters
idxIndex number
Returns
Value at index as a floating point number

Reimplemented from AliFMDMap.

Definition at line 47 of file AliFMDFloatMap.h.

Float_t* AliFMDFloatMap::Data ( ) const
inline

Definition at line 41 of file AliFMDFloatMap.h.

Referenced by FillRandom().

Bool_t AliFMDFloatMap::IsFloat ( ) const
inlineprotectedvirtual

Whether this map is floating point valued - that is, it can be assigned floating point valued values.

Returns
true if the map is floating point valued

Reimplemented from AliFMDMap.

Definition at line 48 of file AliFMDFloatMap.h.

Int_t AliFMDFloatMap::MaxIndex ( ) const
inlineprotectedvirtual

Get the total size of the internal array - that is the maximum index possible plus one.

Returns
maximum index, plus 1

Implements AliFMDMap.

Definition at line 45 of file AliFMDFloatMap.h.

Float_t & AliFMDFloatMap::operator() ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
UShort_t  str 
)
virtual

Definition at line 133 of file AliFMDFloatMap.cxx.

Referenced by ~AliFMDFloatMap().

const Float_t & AliFMDFloatMap::operator() ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
UShort_t  str 
) const
virtual

Definition at line 150 of file AliFMDFloatMap.cxx.

AliFMDFloatMap & AliFMDFloatMap::operator= ( const AliFMDFloatMap o)

Definition at line 99 of file AliFMDFloatMap.cxx.

Referenced by ~AliFMDFloatMap().

void AliFMDFloatMap::Print ( Option_t *  option = "%8.4f") const
inlinevirtual

Print content of the map

Parameters
optionIf not null or empty string, print map

Reimplemented from AliFMDMap.

Definition at line 42 of file AliFMDFloatMap.h.

Referenced by TestMapAlgebra().

void* AliFMDFloatMap::Ptr ( ) const
inlinevirtual

Get raw data pointer.

Returns
Raw data pointer

Implements AliFMDMap.

Definition at line 43 of file AliFMDFloatMap.h.

Referenced by AliFMDParameters::InitPedestal(), and AliFMDParameters::InitPulseGain().

void AliFMDFloatMap::Reset ( const Float_t &  v = Float_t())
virtual

Member Data Documentation

Float_t* AliFMDFloatMap::fData
protected
Int_t AliFMDFloatMap::fTotal
protected

Definition at line 50 of file AliFMDFloatMap.h.

Referenced by AliFMDFloatMap(), MaxIndex(), operator=(), and Reset().


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