1 #ifndef ALIFMDALTROMAPPING_H
2 #define ALIFMDALTROMAPPING_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
8 * See cxx source for full Copyright notice
10 /** @file AliFMDAltroMapping.h
11 @author Christian Holm Christensen <cholm@nbi.dk>
12 @date Sun Mar 26 18:28:11 2006
13 @brief Map HW address to detector coordinates and back again.
15 #ifndef ALIALTROMAPPING_H
16 # include <AliAltroMapping.h>
18 #ifndef ALIFMDUSHORTMAP_H
19 # include "AliFMDUShortMap.h"
25 //____________________________________________________________________
26 /** @class AliFMDAltroMapping
27 @brief Class that encodes a map to/from ALTRO hardware address to
28 FMD detector coordinates.
30 The hardware address consist of a DDL number and 12bits of ALTRO
31 addresses. The ALTRO address are formatted as follows.
34 |---------------|---------|------------|
35 | Board # | ALTRO # | Channel # |
36 +---------------+---------+------------+
41 class AliFMDAltroMapping : public AliAltroMapping
46 /** Map a hardware address into a detector index.
47 @param ddl Hardware DDL number
48 @param hwaddr Hardware address.
49 @param det On return, the detector #
50 @param ring On return, the ring ID
51 @param sec On return, the sector #
52 @param str On return, the strip #
53 @return @c true on success, false otherwise */
54 Bool_t Hardware2Detector(UInt_t ddl, UInt_t hwaddr,
55 UShort_t& det, Char_t& ring,
56 UShort_t& sec, UShort_t& str) const;
57 /** Map a detector index into a hardware address.
58 @param det The detector #
59 @param ring The ring ID
60 @param sec The sector #
61 @param str The strip #
62 @param ddl On return, hardware DDL number
63 @param hwaddr On return, hardware address.
64 @return @c true on success, false otherwise */
65 Bool_t Detector2Hardware(UShort_t det, Char_t ring,
66 UShort_t sec, UShort_t str,
67 UInt_t& ddl, UInt_t& hwaddr) const;
68 /** Here to take care of a a misspelling in base class
69 @param sector Sector number
70 @param str Strip number
71 @param ring Ring ID as an integer
72 @return Hardware address */
73 Int_t GetHWAdress(Int_t sector, Int_t str, Int_t ring) const
75 return GetHWAddress(sector, str, ring);
77 /** convert a partial detector index into a hardware address
78 @param sector Sector number
79 @param str Strip number
80 @param ring Ring ID as an integer
81 @return Hardware address */
82 Int_t GetHWAddress(Int_t sector, Int_t str, Int_t ring) const;
83 /** Get the pad-row (or sector) corresponding to hardware address
84 @param hwaddr hardware address
85 @return Sector number */
86 Int_t GetPadRow(Int_t hwaddr) const;
87 /** Get the pad (or strip) corresponding to hardware address
88 @param hwaddr hardware address
89 @return Strip number */
90 Int_t GetPad(Int_t hwaddr) const;
91 /** Get the sector (or ring) corresponding to hardware address
92 @param hwaddr hardware address
93 @return Ring ID as an integer */
94 Int_t GetSector(Int_t hwaddr) const;
96 /** Read map from file - not used
97 @return @c true on success */
98 virtual Bool_t ReadMapping();
99 /** Clear map in memory */
100 virtual void DeleteMappingArrays();
102 ClassDef(AliFMDAltroMapping, 1) // Read raw FMD Altro data
106 //____________________________________________________________________