![]() |
AliRoot Core
edcc906 (edcc906)
|
Base class for caches of per-strip information.This is used to index a strip. Data stored depends on derived class. More...
#include <AliFMDMap.h>
Classes | |
class | ForOne |
class | Printer |
Public Types | |
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 } |
Public Member Functions | |
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) |
AliFMDMap & | operator*= (const AliFMDMap &o) |
AliFMDMap & | operator/= (const AliFMDMap &o) |
AliFMDMap & | operator+= (const AliFMDMap &o) |
AliFMDMap & | operator-= (const AliFMDMap &o) |
virtual Bool_t | ForEach (ForOne &algo) const |
virtual Int_t | MaxIndex () const =0 |
virtual void | Print (Option_t *option="") const |
virtual Float_t | AtAsFloat (Int_t idx) const |
virtual Float_t & | AtAsFloat (Int_t idx) |
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 | IsFloat () const |
virtual Bool_t | IsInt () const |
virtual Bool_t | IsUShort () const |
virtual Bool_t | IsBool () const |
virtual void * | Ptr () const =0 |
Protected Member Functions | |
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 | |
UShort_t | fMaxDetectors |
UShort_t | fMaxRings |
UShort_t | fMaxSectors |
UShort_t | fMaxStrips |
Base class for caches of per-strip information.
This is used to index a strip. Data stored depends on derived class.
Definition at line 19 of file AliFMDMap.h.
anonymous enum |
Enumerator | |
---|---|
kMaxDetectors |
Default maximum detector number |
kMaxRings |
Default maximum number of rings |
kMaxSectors |
Default maximum number of sectors |
kMaxStrips |
Default maximum number of strips |
Definition at line 22 of file AliFMDMap.h.
anonymous enum |
Enumerator | |
---|---|
kInner |
Number used for inner rings |
kOuter |
Number used for outer rings |
Definition at line 32 of file AliFMDMap.h.
anonymous enum |
Enumerator | |
---|---|
kNStripOuter |
Number of strips in outer rings |
kNStripInner |
Number of strips in the inner rings |
Definition at line 38 of file AliFMDMap.h.
anonymous enum |
Enumerator | |
---|---|
kNSectorInner |
Number of sectors in the inner rings |
kNSectorOuter |
Number of sectorts in the outer rings |
Definition at line 44 of file AliFMDMap.h.
anonymous enum |
Enumerator | |
---|---|
kBaseInner |
Base index for inner rings |
kBaseOuter |
Base index for outer rings |
Definition at line 50 of file AliFMDMap.h.
anonymous enum |
Enumerator | |
---|---|
kFMD1Base |
Base for FMD1 index |
kFMD2Base |
Base for FMD2 index |
kFMD3Base |
Base for FMD3 index |
Definition at line 56 of file AliFMDMap.h.
anonymous enum |
Enumerator | |
---|---|
kNeedUShort |
In case of version 2 of this class, this bit should be set. |
Definition at line 468 of file AliFMDMap.h.
AliFMDMap::AliFMDMap | ( | UShort_t | maxDet = 0 , |
UShort_t | maxRing = 0 , |
||
UShort_t | maxSec = 0 , |
||
UShort_t | maxStr = 0 |
||
) |
Constructor
maxDet | Maximum allowed detector number |
maxRing | Maximum number of rings |
maxSec | Maximum number of sectors |
maxStr | Maximum number of strips |
Definition at line 41 of file AliFMDMap.cxx.
AliFMDMap::AliFMDMap | ( | const AliFMDMap & | other | ) |
Copy constructor
other | Object to construct from |
Definition at line 61 of file AliFMDMap.cxx.
|
inlinevirtual |
Destructor
Definition at line 218 of file AliFMDMap.h.
|
inlinevirtual |
Virtal function to get the value at index idx as an unsigned short integer
idx | Index number |
Reimplemented in AliFMDUShortMap, AliFMDEdepMap, and AliFMDBoolMap.
Definition at line 580 of file AliFMDMap.h.
Referenced by AliFMDEdepMap::AtAsBool(), AliFMDUShortMap::AtAsBool(), ForEach(), and MaxStrips().
|
inlinevirtual |
Virtal function to get the value at index idx as an unsigned short integer
idx | Index number |
Reimplemented in AliFMDUShortMap, AliFMDEdepMap, and AliFMDBoolMap.
Definition at line 585 of file AliFMDMap.h.
|
inlinevirtual |
Virtal function to get the value at index idx as a floating point number.
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).
idx | Index number |
Reimplemented in AliFMDUShortMap, AliFMDBoolMap, AliFMDEdepMap, and AliFMDFloatMap.
Definition at line 547 of file AliFMDMap.h.
Referenced by AliFMDFloatMap::AliFMDFloatMap(), AliFMDBoolMap::AtAsFloat(), AliFMDUShortMap::AtAsFloat(), ForEach(), and MaxStrips().
|
inlinevirtual |
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
where a
is non-floating point valued, and b
is floating point valued (only).
idx | Index number |
Reimplemented in AliFMDUShortMap, AliFMDBoolMap, AliFMDEdepMap, and AliFMDFloatMap.
Definition at line 552 of file AliFMDMap.h.
|
inlinevirtual |
Virtal function to get the value at index idx as an integer
idx | Index number |
Reimplemented in AliFMDUShortMap, AliFMDBoolMap, and AliFMDEdepMap.
Definition at line 558 of file AliFMDMap.h.
Referenced by AliFMDEdepMap::AtAsInt(), AliFMDBoolMap::AtAsInt(), AliFMDUShortMap::AtAsInt(), ForEach(), and MaxStrips().
|
inlinevirtual |
Virtal function to get the value at index idx as an integer
idx | Index number |
Reimplemented in AliFMDUShortMap, AliFMDBoolMap, and AliFMDEdepMap.
Definition at line 563 of file AliFMDMap.h.
|
inlinevirtual |
Virtal function to get the value at index idx as an boolean
idx | Index number |
Reimplemented in AliFMDEdepMap, AliFMDBoolMap, and AliFMDUShortMap.
Definition at line 569 of file AliFMDMap.h.
Referenced by AliFMDBoolMap::AtAsUShort(), ForEach(), and MaxStrips().
|
inlinevirtual |
Virtal function to get the value at index idx as an boolean
idx | Index number |
Reimplemented in AliFMDBoolMap, AliFMDEdepMap, and AliFMDUShortMap.
Definition at line 574 of file AliFMDMap.h.
void AliFMDMap::CalcCoords | ( | Int_t | idx, |
UShort_t & | det, | ||
Char_t & | ring, | ||
UShort_t & | sec, | ||
UShort_t & | str | ||
) | const |
Calculate the detector coordinates for a given index number
idx | Index to find cooresponding detector coordinates for |
det | On return, contain the detector number |
ring | On return, contain the ring identifier |
sec | On return, contain the sector number |
str | On return, contain the strip number |
Definition at line 118 of file AliFMDMap.cxx.
Referenced by ForEach(), MaxStrips(), and TestIndex().
Int_t AliFMDMap::CalcIndex | ( | UShort_t | det, |
Char_t | ring, | ||
UShort_t | sec, | ||
UShort_t | str | ||
) | const |
Calculate index and return
Definition at line 192 of file AliFMDMap.cxx.
Referenced by MaxStrips(), AliFMDFloatMap::operator()(), AliFMDUShortMap::operator()(), AliFMDBoolMap::operator()(), AliFMDEdepMap::operator()(), and TestIndex().
Int_t AliFMDMap::CheckIndex | ( | UShort_t | det, |
Char_t | ring, | ||
UShort_t | sec, | ||
UShort_t | str | ||
) | const |
Calculate index and return
Definition at line 178 of file AliFMDMap.cxx.
Referenced by CalcIndex(), MaxStrips(), AliFMDCalibGain::Set(), AliFMDCalibPedestal::Set(), and TestMap().
void AliFMDMap::CheckNeedUShort | ( | TFile * | file | ) |
Check if we need UShort_t hack
file | File this object was read from |
Definition at line 73 of file AliFMDMap.cxx.
Referenced by AliESDFMD::CheckNeedUShort(), and MaxStrips().
|
protected |
Calculate, check, and return index for strip. If the index is invalid, -1 is returned
This is only used when a full map is used, signalled by fMaxDetector = 0
Definition at line 151 of file AliFMDMap.cxx.
Referenced by CheckIndex().
|
protected |
Calculate, check, and return index for strip. If the index is invalid, -1 is returned
This is for back-ward compatibility and for when a map does not cover all of the FMD strips
Definition at line 134 of file AliFMDMap.cxx.
Referenced by CheckIndex().
|
virtual |
For each element of the map, call the user defined overloaded ForOne::operator()
algo | Algorithm to use |
true
on success, false
if for any element, algo(d,r,s,t,v)
returns false. Definition at line 335 of file AliFMDMap.cxx.
Referenced by AccessOneByOne(), FillMap(), FillOne(), AliESDFMD::ForEach(), AliFMDCalibGain::MakeDeadMap(), AliFMDCalibPedestal::MakeDeadMap(), MaxStrips(), Print(), PrintMap(), and TestIndex().
|
protected |
Calculate the detector coordinates from an array index.
This is used for a full map only, signalled by fMaxDetector = 0
idx | Index to convert |
det | Detector number on return |
ring | Ring identifier on return |
sec | Sector number on return |
str | Strip number on return |
Definition at line 99 of file AliFMDMap.cxx.
Referenced by CalcCoords().
|
protected |
Calculate the detector coordinates from an array index.
This is used for backward compatibility and for when a map does not cover all of the FMD strips
idx | Index to convert |
det | Detector number on return |
ring | Ring identifier on return |
sec | Sector number on return |
str | Strip number on return |
Definition at line 83 of file AliFMDMap.cxx.
Referenced by CalcCoords().
|
inlinevirtual |
Whether this map is boolean valued - that is it can be assigned boolean values
true
if the map is boolean valued Reimplemented in AliFMDBoolMap.
Definition at line 461 of file AliFMDMap.h.
Referenced by ForEach().
|
inlinevirtual |
Whether this map is floating point valued - that is, it can be assigned floating point valued values.
true
if the map is floating point valued Reimplemented in AliFMDEdepMap, and AliFMDFloatMap.
Definition at line 440 of file AliFMDMap.h.
Referenced by AliFMDFloatMap::AliFMDFloatMap(), and ForEach().
|
inlinevirtual |
Whether this map is floating point valued or integer valued - that is, it can be assigned integer valued values
true
if the map is integer valued Definition at line 447 of file AliFMDMap.h.
Referenced by ForEach().
|
inlinevirtual |
Whether this map is unsigned short integer valued - that is it can be assigned unsigned short integer values
true
if the map is unsigned short integer valued Reimplemented in AliFMDUShortMap, and AliFMDEdepMap.
Definition at line 454 of file AliFMDMap.h.
Referenced by ForEach().
|
inline |
Definition at line 220 of file AliFMDMap.h.
Referenced by AliESDFMD::MaxDetectors(), and AliESDFMD::Print().
|
pure virtual |
Get the total size of the internal array - that is the maximum index possible plus one.
Implemented in AliFMDUShortMap, AliFMDBoolMap, AliFMDEdepMap, and AliFMDFloatMap.
Referenced by CheckMap(), ForEach(), MaxStrips(), operator*=(), operator+=(), operator-=(), and operator/=().
|
inline |
Definition at line 222 of file AliFMDMap.h.
Referenced by AliESDFMD::MaxRings(), and AliESDFMD::Print().
|
inline |
Definition at line 224 of file AliFMDMap.h.
Referenced by AliESDFMD::MaxSectors(), and AliESDFMD::Print().
|
inline |
Definition at line 226 of file AliFMDMap.h.
Referenced by AliESDFMD::MaxStrips(), and AliESDFMD::Print().
Right multiplication operator
o | Other map to multuiply with |
Definition at line 267 of file AliFMDMap.cxx.
Referenced by MaxStrips().
Right addision operator
o | Other map to add to this |
Definition at line 301 of file AliFMDMap.cxx.
Referenced by MaxStrips().
Right subtraction operator
o | Other map to substract from this |
Definition at line 318 of file AliFMDMap.cxx.
Referenced by MaxStrips().
Right division operator
o | Other map to divide with |
Definition at line 284 of file AliFMDMap.cxx.
Referenced by MaxStrips().
|
virtual |
Print content of the map
option | If not null or empty string, print map |
Reimplemented in AliFMDFloatMap.
Definition at line 362 of file AliFMDMap.cxx.
Referenced by AliFMDCalibFaker::MakeDeadMap(), MaxStrips(), and AliFMDFloatMap::Print().
|
pure virtual |
Get raw data pointer.
Implemented in AliFMDUShortMap, AliFMDBoolMap, AliFMDEdepMap, and AliFMDFloatMap.
Referenced by CheckMap(), and IsBool().
|
protected |
Definition at line 538 of file AliFMDMap.h.
Referenced by AliFMDUShortMap::AliFMDUShortMap(), CalcCoords(), CalcIndex(), CheckIndex(), Coords2IndexOld(), Index2CoordsOld(), MaxDetectors(), operator*=(), operator+=(), operator-=(), operator/=(), AliFMDFloatMap::operator=(), AliFMDUShortMap::operator=(), AliFMDEdepMap::operator=(), and AliFMDBoolMap::operator=().
|
protected |
Definition at line 539 of file AliFMDMap.h.
Referenced by AliFMDUShortMap::AliFMDUShortMap(), CalcIndex(), Coords2IndexOld(), Index2CoordsOld(), MaxRings(), operator*=(), operator+=(), operator-=(), operator/=(), AliFMDFloatMap::operator=(), AliFMDUShortMap::operator=(), AliFMDBoolMap::operator=(), and AliFMDEdepMap::operator=().
|
protected |
Definition at line 540 of file AliFMDMap.h.
Referenced by AliFMDUShortMap::AliFMDUShortMap(), CalcIndex(), Coords2IndexOld(), Index2CoordsOld(), MaxSectors(), operator*=(), operator+=(), operator-=(), operator/=(), AliFMDFloatMap::operator=(), AliFMDUShortMap::operator=(), AliFMDBoolMap::operator=(), and AliFMDEdepMap::operator=().
|
protected |
Definition at line 541 of file AliFMDMap.h.
Referenced by AliFMDUShortMap::AliFMDUShortMap(), Coords2IndexOld(), Index2CoordsOld(), MaxStrips(), operator*=(), operator+=(), operator-=(), operator/=(), AliFMDFloatMap::operator=(), AliFMDUShortMap::operator=(), AliFMDEdepMap::operator=(), and AliFMDBoolMap::operator=().