3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
6 * See cxx source for full Copyright notice
13 //____________________________________________________________________
15 @brief Base class for caches of per-strip information.
17 This is used to index a strip. Data stored depends on derived
19 class AliFMDMap : public TObject
23 /** Default maximum detector number */
25 /** Default maximum number of rings */
27 /** Default maximum number of sectors */
29 /** Default maximum number of strips */
33 @param maxDet Maximum allowed detector number
34 @param maxRing Maximum number of rings
35 @param maxSec Maximum number of sectors
36 @param maxStr Maximum number of strips
38 AliFMDMap(UShort_t maxDet = kMaxDetectors,
39 UShort_t maxRing= kMaxRings,
40 UShort_t maxSec = kMaxSectors,
41 UShort_t maxStr = kMaxStrips);
43 virtual ~AliFMDMap() {}
44 /** @return Maximum detector number */
45 UShort_t MaxDetectors() const { return fMaxDetectors; }
46 /** @return Maximum number of rings */
47 UShort_t MaxRings() const { return fMaxRings; }
48 /** @return Maximum number of sectors */
49 UShort_t MaxSectors() const { return fMaxSectors; }
50 /** @return Maximum number of strip */
51 UShort_t MaxStrips() const { return fMaxStrips; }
52 /** Calculate, check, and return index for strip. If the index is
53 invalid, -1 is returned
54 @param det Detector number
55 @param ring Ring identifier
56 @param sec Sector number
57 @param str Strip number
58 @return Unique index, or -1 in case of errors */
59 Int_t CheckIndex(UShort_t det, Char_t ring,
60 UShort_t sec, UShort_t str) const;
61 /** Check if we need UShort_t hack
62 @param file File this object was read from */
63 void CheckNeedUShort(TFile* file);
65 /** In case of version 2 of this class, this bit should be set. */
69 /** Calculate index and return
70 @param det Detector number
71 @param ring Ring identifier
72 @param sec Sector number
73 @param str Strip number
74 @return Index (not checked) */
75 Int_t CalcIndex(UShort_t det, Char_t ring,
76 UShort_t sec, UShort_t str) const;
77 UShort_t fMaxDetectors; // Maximum # of detectors
78 UShort_t fMaxRings; // Maximum # of rings
79 UShort_t fMaxSectors; // Maximum # of sectors
80 UShort_t fMaxStrips; // Maximum # of strips
82 ClassDef(AliFMDMap, 3) // Cache of per strip information
86 //____________________________________________________________________