]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - STEER/AliFMDMap.h
Setter method added
[u/mrichter/AliRoot.git] / STEER / AliFMDMap.h
... / ...
CommitLineData
1#ifndef ALIFMDMAP_H
2#define ALIFMDMAP_H
3/* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
6 * See cxx source for full Copyright notice
7 */
8#ifndef ROOT_TObject
9# include <TObject.h>
10#endif
11class TFile;
12
13//____________________________________________________________________
14/** @class AliFMDMap
15 @brief Base class for caches of per-strip information.
16 @ingroup FMD_data
17 This is used to index a strip. Data stored depends on derived
18 class. */
19class AliFMDMap : public TObject
20{
21public:
22 enum {
23 /** Default maximum detector number */
24 kMaxDetectors = 3,
25 /** Default maximum number of rings */
26 kMaxRings = 2,
27 /** Default maximum number of sectors */
28 kMaxSectors = 40,
29 /** Default maximum number of strips */
30 kMaxStrips = 512
31 };
32 /** Constructor
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
37 @return */
38 AliFMDMap(UShort_t maxDet = kMaxDetectors,
39 UShort_t maxRing= kMaxRings,
40 UShort_t maxSec = kMaxSectors,
41 UShort_t maxStr = kMaxStrips);
42 /** Destructor */
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);
64 enum {
65 /** In case of version 2 of this class, this bit should be set. */
66 kNeedUShort = 14
67 };
68protected:
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
81
82 ClassDef(AliFMDMap, 3) // Cache of per strip information
83};
84
85#endif
86//____________________________________________________________________
87//
88// Local Variables:
89// mode: C++
90// End:
91//
92// EOF
93//
94
95