AliRoot Core  edcc906 (edcc906)
AliFMDBoolMap Class Reference

MAp of per strip boolean values. More...

#include <AliFMDBoolMap.h>

Inheritance diagram for AliFMDBoolMap:

Public Member Functions

 AliFMDBoolMap (const AliFMDBoolMap &other)
 
 AliFMDBoolMap ()
 
 AliFMDBoolMap (UShort_t maxDet, UShort_t maxRing=0, UShort_t maxSec=0, UShort_t maxStr=0)
 
virtual ~AliFMDBoolMap ()
 
AliFMDBoolMapoperator= (const AliFMDBoolMap &other)
 
virtual void Reset (const Bool_t &v=Bool_t())
 
virtual Bool_t & operator() (UShort_t det, Char_t ring, UShort_t sec, UShort_t str)
 
virtual const Bool_t & operator() (UShort_t det, Char_t ring, UShort_t sec, UShort_t str) const
 
Bool_t * Data () const
 
Int_t Total () 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 void Print (Option_t *option="") const
 
virtual Bool_t IsFloat () const
 
virtual Bool_t IsInt () const
 
virtual Bool_t IsUShort () const
 

Protected Member Functions

Int_t MaxIndex () const
 
Bool_t AtAsBool (Int_t idx) const
 
Bool_t & AtAsBool (Int_t idx)
 
Bool_t IsBool () const
 
Int_t AtAsInt (Int_t idx) const
 
Float_t AtAsFloat (Int_t idx) const
 
UShort_t AtAsUShort (Int_t idx) const
 
Int_t & AtAsInt (Int_t idx)
 
Float_t & AtAsFloat (Int_t idx)
 
UShort_t & AtAsUShort (Int_t idx)
 
- 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
 
Bool_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 per strip boolean values.

Definition at line 29 of file AliFMDBoolMap.h.

Constructor & Destructor Documentation

AliFMDBoolMap::AliFMDBoolMap ( const AliFMDBoolMap other)

Copy constructor

Parameters
otherObject to copy from.

Definition at line 38 of file AliFMDBoolMap.cxx.

AliFMDBoolMap::AliFMDBoolMap ( )

Constructor

Definition at line 53 of file AliFMDBoolMap.cxx.

AliFMDBoolMap::AliFMDBoolMap ( UShort_t  maxDet,
UShort_t  maxRing = 0,
UShort_t  maxSec = 0,
UShort_t  maxStr = 0 
)

Constructor

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

Definition at line 64 of file AliFMDBoolMap.cxx.

virtual AliFMDBoolMap::~AliFMDBoolMap ( )
inlinevirtual

Destructor

Definition at line 49 of file AliFMDBoolMap.h.

Member Function Documentation

Bool_t AliFMDBoolMap::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 82 of file AliFMDBoolMap.h.

Bool_t& AliFMDBoolMap::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 83 of file AliFMDBoolMap.h.

Float_t AliFMDBoolMap::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 86 of file AliFMDBoolMap.h.

Float_t& AliFMDBoolMap::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 89 of file AliFMDBoolMap.h.

Int_t AliFMDBoolMap::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 85 of file AliFMDBoolMap.h.

Int_t& AliFMDBoolMap::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 88 of file AliFMDBoolMap.h.

UShort_t AliFMDBoolMap::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 87 of file AliFMDBoolMap.h.

UShort_t& AliFMDBoolMap::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 90 of file AliFMDBoolMap.h.

Bool_t* AliFMDBoolMap::Data ( ) const
inline

Definition at line 77 of file AliFMDBoolMap.h.

Bool_t AliFMDBoolMap::IsBool ( ) const
inlineprotectedvirtual

Whether this map is boolean valued - that is it can be assigned boolean values

Returns
true if the map is boolean valued

Reimplemented from AliFMDMap.

Definition at line 84 of file AliFMDBoolMap.h.

Int_t AliFMDBoolMap::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 81 of file AliFMDBoolMap.h.

Bool_t & AliFMDBoolMap::operator() ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
UShort_t  str 
)
virtual

Access operator

Parameters
detDetector
ringRing
secSector
strStrip
Returns
reference value stored for the strip

Definition at line 111 of file AliFMDBoolMap.cxx.

Referenced by ~AliFMDBoolMap().

const Bool_t & AliFMDBoolMap::operator() ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
UShort_t  str 
) const
virtual

Access operator

Parameters
detDetector
ringRing
secSector
strStrip
Returns
value stored for the strip

Definition at line 128 of file AliFMDBoolMap.cxx.

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

Assignment operator

Parameters
otherObject to assign from
Returns
reference to this object.

Definition at line 85 of file AliFMDBoolMap.cxx.

Referenced by ~AliFMDBoolMap().

void* AliFMDBoolMap::Ptr ( ) const
inlinevirtual

Get raw data pointer.

Returns
Raw data pointer

Implements AliFMDMap.

Definition at line 79 of file AliFMDBoolMap.h.

Referenced by AliFMDParameters::InitDeadMap().

void AliFMDBoolMap::Reset ( const Bool_t &  v = Bool_t())
virtual
Int_t AliFMDBoolMap::Total ( ) const
inline

Definition at line 78 of file AliFMDBoolMap.h.

Member Data Documentation

Bool_t* AliFMDBoolMap::fData
protected
Int_t AliFMDBoolMap::fTotal
protected

Definition at line 91 of file AliFMDBoolMap.h.

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


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