![]() |
AliRoot Core
3dc7879 (3dc7879)
|
Class that encodes a map to/from ALTRO hardware address to FMD detector coordinates. More...
#include <AliFMDAltroMapping.h>
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 () |
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.
AliFMDAltroMapping::AliFMDAltroMapping | ( | ) |
Constructor
Definition at line 51 of file AliFMDAltroMapping.cxx.
|
inlinevirtual |
Destructor
Definition at line 56 of file AliFMDAltroMapping.h.
|
inline |
Return the ring identifier corresponding to a board number
board | Board number |
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
board | Board number |
altro | Altro number |
channel | Channel number |
ring | On return, the ring ID |
sec | On return, the sector number |
strip | On return, the strip base offset |
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
board | Board number |
altro | Altro number |
channel | Channel number |
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
hwaddr | Channel address |
board | On return, the Board number |
altro | On return, the Altro number |
channel | On return, the Channel number |
Definition at line 524 of file AliFMDAltroMapping.cxx.
|
protectedvirtual |
Create the inverse mapping arrays
Definition at line 67 of file AliFMDAltroMapping.cxx.
Referenced by Detector2DDL().
|
inline |
Return detector number corresponding to given DDL number
ddl | DDL number |
Definition at line 63 of file AliFMDAltroMapping.h.
Referenced by FullMapping(), Hardware2Detector(), AliFMDParameters::Hardware2Detector(), AliFMDRawReader::NewDDL(), Print(), and AliFMDRawReader::ReadSODevent().
|
inline |
Return DDL number corresponding to given detector number
det | Detector 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.
det | The detector # |
ring | The ring ID |
sec | The sector # |
str | The strip # |
sam | The sample number |
preSamples | Number of pre-samples |
sampleRate | The oversampling rate |
ddl | On return, hardware DDL number |
board | On return, the FEC board address (local to DDL) |
altro | On return, the ALTRO number (local to FEC) |
channel | On return, the channel number (local to ALTRO) |
timebin | On return, the timebin number (local to ALTRO) |
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.
det | The detector # |
ring | The ring ID |
sec | The sector # |
str | The strip # |
sam | The sample number |
preSamples | Number of pre-samples |
sampleRate | The oversampling rate |
ddl | On return, hardware DDL number |
hwaddr | On return, hardware address. |
timebin | On return, the timebin number (local to ALTRO) |
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
sector | Sector number |
str | Strip number |
ring | Ring ID as an integer |
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
hwaddr | hardware address |
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
hwaddr | hardware address |
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
hwaddr | hardware address |
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.
ddl | Hardware DDL number |
hwaddr | Hardware address. |
timebin | Timebin |
preSamples | # of pre samples |
sampleRate | Over sampling rate |
det | On return, the detector # |
ring | On return, the ring ID |
sec | On return, the sector # |
str | On return, the base of strip # |
sam | On return, the sample number for this strip |
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.
ddl | Hardware DDL number |
board | FEC number |
altro | ALTRO number |
channel | Channel number |
timebin | Timebin |
preSamples | # of pre samples |
sampleRate | Over sampling rate |
det | On return, the detector # |
ring | On return, the ring ID |
sec | On return, the sector # |
str | On return, the base of strip # |
sam | On return, the sample number for this strip |
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
option | Option string (hw, or det) |
Definition at line 628 of file AliFMDAltroMapping.cxx.
Referenced by Detector2DDL().
|
protectedvirtual |
Read map from file - not used
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
ring | Ring identifier |
sec | Sector number |
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.
ring | Ring identifier |
sec | Sector number |
str | Strip number |
board | On return, contains the board number |
altro | On return, contains the altro number |
chan | On return, contains the channel number |
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
sec | Sector number |
str | Strip number |
sam | Sample number |
preSamples | Number of pre-samples. |
sampleRate | The over-sampling rate |
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
sec | Sector |
timebin | Time bin |
preSamples | Number of pre-samples |
sampleRate | Oversampling rate |
strip | On return, the strip number in this channel |
sam | On return, the sample number |
Definition at line 173 of file AliFMDAltroMapping.cxx.
Referenced by Board2Ring(), Hardware2Detector(), AliFMDParameters::Hardware2Detector(), and AliFMDRawReader::NewSample().