AliRoot Core  edcc906 (edcc906)
AliFMDUShortMap Class Reference

Map of an integer per strip. More...

#include <AliFMDUShortMap.h>

Inheritance diagram for AliFMDUShortMap:

Public Member Functions

 AliFMDUShortMap (const AliFMDUShortMap &other)
 
 AliFMDUShortMap ()
 
 AliFMDUShortMap (UShort_t maxDet, UShort_t maxRing=kMaxRings, UShort_t maxSec=kMaxSectors, UShort_t maxStr=kMaxStrips)
 
virtual ~AliFMDUShortMap ()
 
AliFMDUShortMapoperator= (const AliFMDUShortMap &other)
 
virtual void Reset (const UShort_t &val=UShort_t())
 
virtual UShort_t & operator() (UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip)
 
virtual const UShort_t & operator() (UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip) const
 
UShort_t * Data () const
 
Int_t Total () const
 
void * Ptr () const
 
Int_t MaxIndex () 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 void Print (Option_t *option="") const
 
virtual Bool_t IsFloat () const
 
virtual Bool_t IsInt () const
 
virtual Bool_t IsBool () const
 

Protected Member Functions

UShort_t AtAsUShort (Int_t idx) const
 
UShort_t & AtAsUShort (Int_t idx)
 
Int_t AtAsInt (Int_t idx) const
 
Float_t AtAsFloat (Int_t idx) const
 
Bool_t AtAsBool (Int_t idx) const
 
Int_t & AtAsInt (Int_t idx)
 
Float_t & AtAsFloat (Int_t idx)
 
Bool_t & AtAsBool (Int_t idx)
 
Bool_t IsUShort () 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
 
UShort_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

Map of an integer per strip.

Definition at line 24 of file AliFMDUShortMap.h.

Constructor & Destructor Documentation

AliFMDUShortMap::AliFMDUShortMap ( const AliFMDUShortMap other)

Copy constructor

Parameters
otherObject to copy from.

Definition at line 38 of file AliFMDUShortMap.cxx.

AliFMDUShortMap::AliFMDUShortMap ( )

Constructor

Definition at line 73 of file AliFMDUShortMap.cxx.

AliFMDUShortMap::AliFMDUShortMap ( UShort_t  maxDet,
UShort_t  maxRing = kMaxRings,
UShort_t  maxSec = kMaxSectors,
UShort_t  maxStr = kMaxStrips 
)

Constructor

Parameters
maxDetNumber of detectors (3)
maxRingNumber of rings (2)
maxSecNumber of sectors (40)
maxStrNumber of strips (20)

Definition at line 53 of file AliFMDUShortMap.cxx.

virtual AliFMDUShortMap::~AliFMDUShortMap ( )
inlinevirtual

Destructor

Definition at line 42 of file AliFMDUShortMap.h.

Member Function Documentation

Bool_t AliFMDUShortMap::AtAsBool ( Int_t  idx) const
inlineprotectedvirtual

Virtal function to get the value at index idx as an unsigned short integer

See also
Float_t AliFMDMap::AtAsFloat(Int_t) const
Parameters
idxIndex number
Returns
Value at index as an unsigned short integer

Reimplemented from AliFMDMap.

Definition at line 89 of file AliFMDUShortMap.h.

Bool_t& AliFMDUShortMap::AtAsBool ( Int_t  idx)
inlineprotectedvirtual

Virtal function to get the value at index idx as an unsigned short integer

See also
Float_t& AliFMDMap::AtAsFloat(Int_t)
Parameters
idxIndex number
Returns
Value at index as an unsigned short integer

Reimplemented from AliFMDMap.

Definition at line 92 of file AliFMDUShortMap.h.

Float_t AliFMDUShortMap::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 88 of file AliFMDUShortMap.h.

Float_t& AliFMDUShortMap::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 91 of file AliFMDUShortMap.h.

Int_t AliFMDUShortMap::AtAsInt ( Int_t  idx) const
inlineprotectedvirtual

Virtal function to get the value at index idx as an integer

See also
Float_t AliFMDMap::AtAsFloat(Int_t) const
Parameters
idxIndex number
Returns
Value at index as an integer

Reimplemented from AliFMDMap.

Definition at line 87 of file AliFMDUShortMap.h.

Int_t& AliFMDUShortMap::AtAsInt ( Int_t  idx)
inlineprotectedvirtual

Virtal function to get the value at index idx as an integer

See also
Float_t& AliFMDMap::AtAsFloat(Int_t)
Parameters
idxIndex number
Returns
Value at index as an integer

Reimplemented from AliFMDMap.

Definition at line 90 of file AliFMDUShortMap.h.

UShort_t AliFMDUShortMap::AtAsUShort ( Int_t  idx) const
inlineprotectedvirtual

Virtal function to get the value at index idx as an boolean

See also
Float_t AliFMDMap::AtAsFloat(Int_t) const
Parameters
idxIndex number
Returns
Value at index as a boolean

Reimplemented from AliFMDMap.

Definition at line 85 of file AliFMDUShortMap.h.

UShort_t& AliFMDUShortMap::AtAsUShort ( Int_t  idx)
inlineprotectedvirtual

Virtal function to get the value at index idx as an boolean

See also
Float_t& AliFMDMap::AtAsFloat(Int_t)
Parameters
idxIndex number
Returns
Value at index as a boolean

Reimplemented from AliFMDMap.

Definition at line 86 of file AliFMDUShortMap.h.

UShort_t* AliFMDUShortMap::Data ( ) const
inline

Get the raw data pointer.

Returns
Pointer to the data

Definition at line 75 of file AliFMDUShortMap.h.

Bool_t AliFMDUShortMap::IsUShort ( ) const
inlineprotectedvirtual

Whether this map is unsigned short integer valued - that is it can be assigned unsigned short integer values

Returns
true if the map is unsigned short integer valued

Reimplemented from AliFMDMap.

Definition at line 93 of file AliFMDUShortMap.h.

Int_t AliFMDUShortMap::MaxIndex ( ) const
inlinevirtual

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 83 of file AliFMDUShortMap.h.

Referenced by AliFMDParameters::GetZeroSuppression().

UShort_t & AliFMDUShortMap::operator() ( UShort_t  detector,
Char_t  ring,
UShort_t  sector,
UShort_t  strip 
)
virtual

Access operator

Parameters
detectorDetector
ringRing
sectorSector
stripStrip
Returns
reference value stored for the strip

Definition at line 111 of file AliFMDUShortMap.cxx.

Referenced by ~AliFMDUShortMap().

const UShort_t & AliFMDUShortMap::operator() ( UShort_t  detector,
Char_t  ring,
UShort_t  sector,
UShort_t  strip 
) const
virtual

Access operator

Parameters
detectorDetector
ringRing
sectorSector
stripStrip
Returns
value stored for the strip

Definition at line 128 of file AliFMDUShortMap.cxx.

AliFMDUShortMap & AliFMDUShortMap::operator= ( const AliFMDUShortMap other)

Assignment operator

Parameters
otherObject to assign from
Returns
reference to this object.

Definition at line 86 of file AliFMDUShortMap.cxx.

Referenced by ~AliFMDUShortMap().

void* AliFMDUShortMap::Ptr ( ) const
inlinevirtual

Get raw data pointer.

Returns
Raw data pointer

Implements AliFMDMap.

Definition at line 82 of file AliFMDUShortMap.h.

Referenced by AliFMDParameters::GetZeroSuppression(), AliFMDParameters::InitSampleRate(), AliFMDParameters::InitStripRange(), and AliFMDParameters::InitZeroSuppression().

void AliFMDUShortMap::Reset ( const UShort_t &  val = UShort_t())
virtual
Int_t AliFMDUShortMap::Total ( ) const
inline

The total number of entries in the data array

Returns
Total number of entries in the data array

Definition at line 81 of file AliFMDUShortMap.h.

Member Data Documentation

UShort_t* AliFMDUShortMap::fData
protected
Int_t AliFMDUShortMap::fTotal
protected

Definition at line 94 of file AliFMDUShortMap.h.

Referenced by AliFMDUShortMap(), MaxIndex(), operator=(), Reset(), and Total().


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