]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDAltroMapping.h
Added a lot of Doxygen documentation
[u/mrichter/AliRoot.git] / FMD / AliFMDAltroMapping.h
1 #ifndef ALIFMDALTROMAPPING_H
2 #define ALIFMDALTROMAPPING_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
7  *
8  * See cxx source for full Copyright notice                               
9  */
10 #ifndef ALIALTROMAPPING_H
11 # include <AliAltroMapping.h>
12 #endif
13 #ifndef ALIFMDUSHORTMAP_H
14 # include "AliFMDUShortMap.h"
15 #endif
16 #ifndef ROOT_TArrayI
17 # include <TArrayI.h>
18 #endif
19
20 //____________________________________________________________________
21 /** @class AliFMDAltroMapping 
22     @brief Class that encodes a map to/from ALTRO hardware address to
23     FMD detector coordinates.  
24     
25     The hardware address consist of a DDL number and 12bits of ALTRO
26     addresses.  The ALTRO address are formatted as follows. 
27     @verbatim 
28     12              7         4            0
29     |---------------|---------|------------|
30     | Board #       | ALTRO # | Channel #  |
31     +---------------+---------+------------+
32     @endverbatim 
33
34     @ingroup FMD_base
35  */
36 class AliFMDAltroMapping : public AliAltroMapping
37 {
38 public:
39   /** Constructor */
40   AliFMDAltroMapping();
41   /** Map a hardware address into a detector index. 
42       @param ddl    Hardware DDL number 
43       @param hwaddr Hardware address.  
44       @param det    On return, the detector #
45       @param ring   On return, the ring ID
46       @param sec    On return, the sector #
47       @param str    On return, the strip #
48       @return @c true on success, false otherwise */
49   Bool_t Hardware2Detector(UInt_t    ddl, UInt_t    hwaddr, 
50                            UShort_t& det, Char_t&   ring, 
51                            UShort_t& sec, UShort_t& str) const;
52   /** Map a detector index into a hardware address. 
53       @param det    The detector #
54       @param ring   The ring ID
55       @param sec    The sector #
56       @param str    The strip #
57       @param ddl    On return, hardware DDL number 
58       @param hwaddr On return, hardware address.  
59       @return @c true on success, false otherwise */
60   Bool_t Detector2Hardware(UShort_t  det, Char_t    ring, 
61                            UShort_t  sec, UShort_t  str,
62                            UInt_t&   ddl, UInt_t&   hwaddr) const;
63   /** Here to take care of a a misspelling in base class 
64       @param sector Sector number
65       @param str    Strip number
66       @param ring   Ring ID as an integer 
67       @return Hardware address */
68   Int_t  GetHWAdress(Int_t sector, Int_t str, Int_t ring) const
69   {
70     return GetHWAddress(sector, str, ring);
71   }
72   /** convert a partial detector index into a hardware address
73       @param sector Sector number
74       @param str    Strip number
75       @param ring   Ring ID as an integer 
76       @return Hardware address */
77   Int_t  GetHWAddress(Int_t sector, Int_t str, Int_t ring) const;
78   /** Get the pad-row (or sector) corresponding to hardware address
79       @param hwaddr hardware address
80       @return Sector number */
81   Int_t  GetPadRow(Int_t hwaddr) const;
82   /** Get the pad (or strip) corresponding to hardware address
83       @param hwaddr hardware address
84       @return Strip number */
85   Int_t  GetPad(Int_t hwaddr) const;
86   /** Get the sector (or ring) corresponding to hardware address
87       @param hwaddr hardware address
88       @return Ring ID as an integer */
89   Int_t  GetSector(Int_t hwaddr) const;
90 protected:
91   /** Read map from file - not used 
92       @return @c true on success */
93   virtual Bool_t ReadMapping();
94   /** Clear map in memory */
95   virtual void   DeleteMappingArrays();
96   
97   ClassDef(AliFMDAltroMapping, 1) // Read raw FMD Altro data 
98 };
99
100 #endif
101 //____________________________________________________________________
102 //
103 // Local Variables:
104 //   mode: C++
105 // End:
106 //
107 // EOF
108 //