AliRoot Core  3dc7879 (3dc7879)
AliFMDAltroMapping Class Reference

Class that encodes a map to/from ALTRO hardware address to FMD detector coordinates. More...

#include <AliFMDAltroMapping.h>

Inheritance diagram for AliFMDAltroMapping:

Public Member Functions

 AliFMDAltroMapping ()
 
virtual ~AliFMDAltroMapping ()
 
Short_t DDL2Detector (UInt_t ddl) const
 
Char_t Board2Ring (UShort_t board) const
 
Bool_t Channel2StripBase (UShort_t board, UShort_t altro, UShort_t chan, Char_t &ring, UShort_t &sec, Short_t &str) const
 
void Timebin2Strip (UShort_t sec, UShort_t timebin, UShort_t preSamples, UShort_t sampleRate, Short_t &strip, UShort_t &sample) const
 
Bool_t Hardware2Detector (UShort_t ddl, UShort_t hwaddr, UShort_t timebin, UShort_t preSamples, UShort_t sampleRate, UShort_t &det, Char_t &ring, UShort_t &sec, Short_t &str, UShort_t &sam) const
 
Bool_t Hardware2Detector (UShort_t ddl, UShort_t board, UShort_t altro, UShort_t chan, UShort_t timebin, UShort_t preSamples, UShort_t sampleRate, UShort_t &det, Char_t &ring, UShort_t &sec, Short_t &str, UShort_t &sam) const
 
UShort_t Detector2DDL (UShort_t det) const
 
Short_t Sector2Board (Char_t ring, UShort_t sec) const
 
Bool_t Strip2Channel (Char_t ring, UShort_t sec, UShort_t str, UShort_t &board, UShort_t &altro, UShort_t &chan) const
 
UShort_t Strip2Timebin (UShort_t sec, UShort_t strip, UShort_t sam, UShort_t preSamples, UShort_t sampleRate) const
 
Bool_t Detector2Hardware (UShort_t det, Char_t ring, UShort_t sec, UShort_t str, UShort_t sam, UShort_t preSamples, UShort_t sampleRate, UShort_t &ddl, UShort_t &board, UShort_t &altro, UShort_t &channel, UShort_t &timebin) const
 
Bool_t Detector2Hardware (UShort_t det, Char_t ring, UShort_t sec, UShort_t str, UShort_t sam, UShort_t preSamples, UShort_t sampleRate, UShort_t &ddl, UShort_t &hwaddr, UShort_t &timebin) const
 
UInt_t ChannelAddress (UShort_t board, UShort_t altro, UShort_t channel) const
 
void ChannelAddress (UShort_t hwaddr, UShort_t &board, UShort_t &altro, UShort_t &channel) const
 
Int_t GetHWAddress (Int_t sector, Int_t str, Int_t ring)
 
Int_t GetPadRow (Int_t hwaddr) const
 
Int_t GetPad (Int_t hwaddr) const
 
Int_t GetSector (Int_t hwaddr) const
 
void Print (Option_t *option="hw") const
 

Protected Member Functions

virtual Bool_t ReadMapping ()
 
virtual Bool_t CreateInvMapping ()
 

Detailed Description

Class that encodes a map to/from ALTRO hardware address to FMD detector coordinates.

The hardware address consist of a DDL number and 12bits of ALTRO addresses. The ALTRO address are formatted as follows.

12              7         4            0
|---------------|---------|------------|
| Board #       | ALTRO # | Channel #  |
+---------------+---------+------------+

Definition at line 46 of file AliFMDAltroMapping.h.

Constructor & Destructor Documentation

AliFMDAltroMapping::AliFMDAltroMapping ( )

Constructor

Definition at line 51 of file AliFMDAltroMapping.cxx.

virtual AliFMDAltroMapping::~AliFMDAltroMapping ( )
inlinevirtual

Destructor

Definition at line 56 of file AliFMDAltroMapping.h.

Member Function Documentation

Char_t AliFMDAltroMapping::Board2Ring ( UShort_t  board) const
inline

Return the ring identifier corresponding to a board number

Parameters
boardBoard number
Returns
Ring identifier

Definition at line 73 of file AliFMDAltroMapping.h.

Referenced by Channel2StripBase().

Bool_t AliFMDAltroMapping::Channel2StripBase ( UShort_t  board,
UShort_t  altro,
UShort_t  chan,
Char_t &  ring,
UShort_t &  sec,
Short_t &  str 
) const

Return the strip base number corresponding to a channel address

Parameters
boardBoard number
altroAltro number
channelChannel number
ringOn return, the ring ID
secOn return, the sector number
stripOn return, the strip base offset
Returns
true on success

Definition at line 76 of file AliFMDAltroMapping.cxx.

Referenced by Board2Ring(), FullMapping(), GetPad(), GetPadRow(), GetSector(), Hardware2Detector(), AliFMDParameters::Hardware2Detector(), AliFMDRawReader::NewChannel(), Print(), and AliFMDRawReader::ReadSODevent().

UInt_t AliFMDAltroMapping::ChannelAddress ( UShort_t  board,
UShort_t  altro,
UShort_t  channel 
) const

Convert board, chip, channel to a hardware address

Parameters
boardBoard number
altroAltro number
channelChannel number
Returns
hardware address of a channel

Definition at line 506 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL(), Detector2Hardware(), GetHWAddress(), GetPad(), GetPadRow(), GetSector(), Hardware2Detector(), AliFMDParameters::Hardware2Detector(), AliFMDRawReader::NewChannel(), and Print().

void AliFMDAltroMapping::ChannelAddress ( UShort_t  hwaddr,
UShort_t &  board,
UShort_t &  altro,
UShort_t &  channel 
) const

Convert a channel address to board, altro, channel fields

Parameters
hwaddrChannel address
boardOn return, the Board number
altroOn return, the Altro number
channelOn return, the Channel number

Definition at line 524 of file AliFMDAltroMapping.cxx.

Bool_t AliFMDAltroMapping::CreateInvMapping ( )
protectedvirtual

Create the inverse mapping arrays

Definition at line 67 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL().

Short_t AliFMDAltroMapping::DDL2Detector ( UInt_t  ddl) const
inline

Return detector number corresponding to given DDL number

Parameters
ddlDDL number
Returns
Detector number

Definition at line 63 of file AliFMDAltroMapping.h.

Referenced by FullMapping(), Hardware2Detector(), AliFMDParameters::Hardware2Detector(), AliFMDRawReader::NewDDL(), Print(), and AliFMDRawReader::ReadSODevent().

UShort_t AliFMDAltroMapping::Detector2DDL ( UShort_t  det) const
inline

Return DDL number corresponding to given detector number

Parameters
detDetector number
Returns
DDL number

Definition at line 157 of file AliFMDAltroMapping.h.

Referenced by Detector2Hardware(), Print(), and AliFMDReconstructor::ProcessDigits().

Bool_t AliFMDAltroMapping::Detector2Hardware ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
UShort_t  str,
UShort_t  sam,
UShort_t  preSamples,
UShort_t  sampleRate,
UShort_t &  ddl,
UShort_t &  board,
UShort_t &  altro,
UShort_t &  channel,
UShort_t &  timebin 
) const

Map a detector index into a hardware address.

Parameters
detThe detector #
ringThe ring ID
secThe sector #
strThe strip #
samThe sample number
preSamplesNumber of pre-samples
sampleRateThe oversampling rate
ddlOn return, hardware DDL number
boardOn return, the FEC board address (local to DDL)
altroOn return, the ALTRO number (local to FEC)
channelOn return, the channel number (local to ALTRO)
timebinOn return, the timebin number (local to ALTRO)
Returns
true on success, false otherwise

Definition at line 432 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL(), Detector2Hardware(), AliFMDParameters::Detector2Hardware(), MakeFakeHits(), and TestAltroMapping().

Bool_t AliFMDAltroMapping::Detector2Hardware ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
UShort_t  str,
UShort_t  sam,
UShort_t  preSamples,
UShort_t  sampleRate,
UShort_t &  ddl,
UShort_t &  hwaddr,
UShort_t &  timebin 
) const

Map a detector index into a hardware address.

Parameters
detThe detector #
ringThe ring ID
secThe sector #
strThe strip #
samThe sample number
preSamplesNumber of pre-samples
sampleRateThe oversampling rate
ddlOn return, hardware DDL number
hwaddrOn return, hardware address.
timebinOn return, the timebin number (local to ALTRO)
Returns
true on success, false otherwise

Definition at line 469 of file AliFMDAltroMapping.cxx.

Int_t AliFMDAltroMapping::GetHWAddress ( Int_t  sector,
Int_t  str,
Int_t  ring 
)

convert a partial detector index into a hardware address

Parameters
sectorSector number
strStrip number
ringRing ID as an integer
Returns
Hardware address

Definition at line 543 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL().

Int_t AliFMDAltroMapping::GetPad ( Int_t  hwaddr) const

Get the pad (or strip) corresponding to hardware address

Parameters
hwaddrhardware address
Returns
Strip number

Definition at line 584 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL().

Int_t AliFMDAltroMapping::GetPadRow ( Int_t  hwaddr) const

Get the pad-row (or sector) corresponding to hardware address

Parameters
hwaddrhardware address
Returns
Sector number

Definition at line 562 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL().

Int_t AliFMDAltroMapping::GetSector ( Int_t  hwaddr) const

Get the sector (or ring) corresponding to hardware address

Parameters
hwaddrhardware address
Returns
Ring ID as an integer

Definition at line 606 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL().

Bool_t AliFMDAltroMapping::Hardware2Detector ( UShort_t  ddl,
UShort_t  hwaddr,
UShort_t  timebin,
UShort_t  preSamples,
UShort_t  sampleRate,
UShort_t &  det,
Char_t &  ring,
UShort_t &  sec,
Short_t &  str,
UShort_t &  sam 
) const

Map a hardware address into a detector index.

Parameters
ddlHardware DDL number
hwaddrHardware address.
timebinTimebin
preSamples# of pre samples
sampleRateOver sampling rate
detOn return, the detector #
ringOn return, the ring ID
secOn return, the sector #
strOn return, the base of strip #
samOn return, the sample number for this strip
Returns
true on success, false otherwise

Definition at line 238 of file AliFMDAltroMapping.cxx.

Referenced by Board2Ring(), and TestAltroMapping().

Bool_t AliFMDAltroMapping::Hardware2Detector ( UShort_t  ddl,
UShort_t  board,
UShort_t  altro,
UShort_t  chan,
UShort_t  timebin,
UShort_t  preSamples,
UShort_t  sampleRate,
UShort_t &  det,
Char_t &  ring,
UShort_t &  sec,
Short_t &  str,
UShort_t &  sam 
) const

Map a hardware address into a detector index.

Parameters
ddlHardware DDL number
boardFEC number
altroALTRO number
channelChannel number
timebinTimebin
preSamples# of pre samples
sampleRateOver sampling rate
detOn return, the detector #
ringOn return, the ring ID
secOn return, the sector #
strOn return, the base of strip #
samOn return, the sample number for this strip
Returns
true on success, false otherwise

Definition at line 196 of file AliFMDAltroMapping.cxx.

void AliFMDAltroMapping::Print ( Option_t *  option = "hw") const

Print map to standard out

Parameters
optionOption string (hw, or det)

Definition at line 628 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL().

Bool_t AliFMDAltroMapping::ReadMapping ( )
protectedvirtual

Read map from file - not used

Returns
true on success

Definition at line 59 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL().

Short_t AliFMDAltroMapping::Sector2Board ( Char_t  ring,
UShort_t  sec 
) const

Return board address corresponding to a sector

Parameters
ringRing identifier
secSector number
Returns
The board number, or negative number in case of failure

Definition at line 258 of file AliFMDAltroMapping.cxx.

Referenced by AliFMDGainDA::AddChannelContainer(), Detector2DDL(), AliFMDQADataMakerRec::MakeRaws(), and AliFMDGainDA::UpdatePulseAndADC().

Bool_t AliFMDAltroMapping::Strip2Channel ( Char_t  ring,
UShort_t  sec,
UShort_t  str,
UShort_t &  board,
UShort_t &  altro,
UShort_t &  chan 
) const

Convert strip address to a channel address.

Parameters
ringRing identifier
secSector number
strStrip number
boardOn return, contains the board number
altroOn return, contains the altro number
chanOn return, contains the channel number
Returns
true on success.

Definition at line 282 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL(), Detector2Hardware(), GetHWAddress(), and Print().

UShort_t AliFMDAltroMapping::Strip2Timebin ( UShort_t  sec,
UShort_t  strip,
UShort_t  sam,
UShort_t  preSamples,
UShort_t  sampleRate 
) const

Get the timebin correspoding to a strip and sample

Parameters
secSector number
strStrip number
samSample number
preSamplesNumber of pre-samples.
sampleRateThe over-sampling rate
Returns
the timebin corresponding to the passed strip

Definition at line 391 of file AliFMDAltroMapping.cxx.

Referenced by Detector2DDL(), and Detector2Hardware().

void AliFMDAltroMapping::Timebin2Strip ( UShort_t  sec,
UShort_t  timebin,
UShort_t  preSamples,
UShort_t  sampleRate,
Short_t &  strip,
UShort_t &  sample 
) const

Return the strip, sample corresponding to a timebin

Parameters
secSector
timebinTime bin
preSamplesNumber of pre-samples
sampleRateOversampling rate
stripOn return, the strip number in this channel
samOn return, the sample number

Definition at line 173 of file AliFMDAltroMapping.cxx.

Referenced by Board2Ring(), Hardware2Detector(), AliFMDParameters::Hardware2Detector(), and AliFMDRawReader::NewSample().


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