AliRoot Core  edcc906 (edcc906)
AliFMDUShortMap.h
Go to the documentation of this file.
1 #ifndef ALIFMDUSHORTMAP_H
2 #define ALIFMDUSHORTMAP_H
3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
4  * reserved.
5  *
6  * See cxx source for full Copyright notice
7  */
13 // Map of an integer per strip
14 // This class stores one short unsigned integer (16 bits) per strip in
15 // the FMD detectors.
16 #ifndef ALIFMDMAP_H
17 # include "AliFMDMap.h"
18 #endif
19 //____________________________________________________________________
24 class AliFMDUShortMap : public AliFMDMap
25 {
26 public:
29  AliFMDUShortMap(const AliFMDUShortMap& other);
37  AliFMDUShortMap(UShort_t maxDet,
38  UShort_t maxRing= kMaxRings,
39  UShort_t maxSec = kMaxSectors,
40  UShort_t maxStr = kMaxStrips);
42  virtual ~AliFMDUShortMap() { delete [] fData; }
49  virtual void Reset(const UShort_t& val=UShort_t());
56  virtual UShort_t& operator()(UShort_t detector,
57  Char_t ring,
58  UShort_t sector,
59  UShort_t strip);
66  virtual const UShort_t& operator()(UShort_t detector,
67  Char_t ring,
68  UShort_t sector,
69  UShort_t strip) const;
75  UShort_t* Data() const { return fData; }
81  Int_t Total() const { return fTotal; }
82  void* Ptr() const { return reinterpret_cast<void*>(fData); }
83  Int_t MaxIndex() const { return fTotal; }
84  protected:
85  UShort_t AtAsUShort(Int_t idx) const { return fData[idx]; }
86  UShort_t& AtAsUShort(Int_t idx) { return fData[idx]; }
87  Int_t AtAsInt(Int_t idx) const { return fData[idx]; }
88  Float_t AtAsFloat(Int_t idx) const { return fData[idx]; }
89  Bool_t AtAsBool(Int_t idx) const { return fData[idx]!=0?kTRUE:kFALSE; }
90  Int_t& AtAsInt(Int_t idx) { return AliFMDMap::AtAsInt(idx); }
91  Float_t& AtAsFloat(Int_t idx) { return AliFMDMap::AtAsFloat(idx); }
92  Bool_t& AtAsBool(Int_t idx) { return AliFMDMap::AtAsBool(idx); }
93  Bool_t IsUShort() const { return kTRUE; }
94  Int_t fTotal; // Total number of entries
95  UShort_t* fData; // [fTotal] The data
96  ClassDef(AliFMDUShortMap, 3) // Cache of edep,hit information per strip
97 };
98 
99 #endif
100 //____________________________________________________________________
101 //
102 // Local Variables:
103 // mode: C++
104 // End:
105 //
106 // EOF
107 //
108 
109 
Map of an integer per strip.
Int_t & AtAsInt(Int_t idx)
virtual Bool_t AtAsBool(Int_t idx) const
Definition: AliFMDMap.h:580
Bool_t IsUShort() const
virtual Int_t AtAsInt(Int_t idx) const
Definition: AliFMDMap.h:558
AliFMDUShortMap & operator=(const AliFMDUShortMap &other)
Float_t & AtAsFloat(Int_t idx)
virtual Float_t AtAsFloat(Int_t idx) const
Definition: AliFMDMap.h:547
Bool_t & AtAsBool(Int_t idx)
virtual void Reset(const UShort_t &val=UShort_t())
Float_t AtAsFloat(Int_t idx) const
Base class for caches of per-strip information.This is used to index a strip. Data stored depends on ...
Definition: AliFMDMap.h:19
Bool_t AtAsBool(Int_t idx) const
virtual UShort_t & operator()(UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip)
void * Ptr() const
UShort_t & AtAsUShort(Int_t idx)
Int_t MaxIndex() const
Int_t Total() const
Int_t AtAsInt(Int_t idx) const
UShort_t AtAsUShort(Int_t idx) const
UShort_t * Data() const
UShort_t * fData
virtual ~AliFMDUShortMap()