AliRoot Core  edcc906 (edcc906)
AliFMDEdepMap.h
Go to the documentation of this file.
1 #ifndef ALIFMDEDEPMAP_H
2 #define ALIFMDEDEPMAP_H
3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
4  * reserved.
5  *
6  * See cxx source for full Copyright notice
7  */
14 //
15 // Contains a pair of energy deposited @c fEdep and number of hits @c
16 // fN, @c fEdep is the summed energy deposition, and @c fN is the
17 // number of hits
18 #ifndef ALIFMDMAP_H
19 # include "AliFMDMap.h"
20 #endif
21 #ifndef ALIFMDEDEPHITPAIR_H
22 # include <AliFMDEdepHitPair.h>
23 #endif
24 
25 
26 //____________________________________________________________________
33 class AliFMDEdepMap : public AliFMDMap
34 {
35 public:
39  AliFMDEdepMap(const AliFMDEdepMap& other);
41  AliFMDEdepMap();
47  AliFMDEdepMap(UShort_t maxDet,
48  UShort_t maxRing= 0,
49  UShort_t maxSec = 0,
50  UShort_t maxStr = 0);
52  virtual ~AliFMDEdepMap() { delete [] fData; }
53  AliFMDEdepMap& operator=(const AliFMDEdepMap& other);
55  virtual void Reset();
58  virtual void Reset(const AliFMDEdepHitPair& val);
65  virtual AliFMDEdepHitPair& operator()(UShort_t detector,
66  Char_t ring,
67  UShort_t sector,
68  UShort_t strip);
75  virtual const AliFMDEdepHitPair& operator()(UShort_t detector,
76  Char_t ring,
77  UShort_t sector,
78  UShort_t strip) const;
79  void* Ptr() const { return reinterpret_cast<void*>(fData); }
80 protected:
81  Int_t MaxIndex() const { return fTotal; }
82  Int_t AtAsInt(Int_t idx) const { return fData[idx].fN; }
83  Int_t& AtAsInt(Int_t idx) { return AliFMDMap::AtAsInt(idx); }
84  Bool_t AtAsBool(Int_t idx) const { return fData[idx].fEdep > 0; }
85  Bool_t& AtAsBool(Int_t idx) { return AliFMDMap::AtAsBool(idx); }
86  Float_t AtAsFloat(Int_t idx) const { return fData[idx].fEdep; }
87  Float_t& AtAsFloat(Int_t idx) { return fData[idx].fEdep; }
88  UShort_t AtAsUShort(Int_t idx) const { return fData[idx].fN; }
89  UShort_t& AtAsUShort(Int_t idx) { return fData[idx].fN; }
90  Bool_t IsUShort() const { return kTRUE; }
91  Bool_t IsFloat() const { return kTRUE; }
92  Int_t fTotal; // Total number of entries
93  AliFMDEdepHitPair* fData; //[fTotal] The data
94  ClassDef(AliFMDEdepMap, 3) // Cache of edep,hit information per strip
95 };
96 
97 #endif
98 //____________________________________________________________________
99 //
100 // Local Variables:
101 // mode: C++
102 // End:
103 //
104 // EOF
105 //
106 
107 
Bool_t AtAsBool(Int_t idx) const
Definition: AliFMDEdepMap.h:84
Int_t AtAsInt(Int_t idx) const
Definition: AliFMDEdepMap.h:82
Map of Energy deposited, hit information per strip. Contains a pair of energy deposited fEdep and num...
Definition: AliFMDEdepMap.h:33
virtual Bool_t AtAsBool(Int_t idx) const
Definition: AliFMDMap.h:580
virtual Int_t AtAsInt(Int_t idx) const
Definition: AliFMDMap.h:558
Int_t & AtAsInt(Int_t idx)
Definition: AliFMDEdepMap.h:83
AliFMDEdepMap & operator=(const AliFMDEdepMap &other)
Per strip map of energy deposited and number of hits.
Float_t & AtAsFloat(Int_t idx)
Definition: AliFMDEdepMap.h:87
Base class for caches of per-strip information.This is used to index a strip. Data stored depends on ...
Definition: AliFMDMap.h:19
virtual ~AliFMDEdepMap()
Definition: AliFMDEdepMap.h:52
UShort_t AtAsUShort(Int_t idx) const
Definition: AliFMDEdepMap.h:88
Bool_t IsUShort() const
Definition: AliFMDEdepMap.h:90
UShort_t & AtAsUShort(Int_t idx)
Definition: AliFMDEdepMap.h:89
void * Ptr() const
Definition: AliFMDEdepMap.h:79
Float_t AtAsFloat(Int_t idx) const
Definition: AliFMDEdepMap.h:86
virtual void Reset()
virtual AliFMDEdepHitPair & operator()(UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip)
AliFMDEdepHitPair * fData
Definition: AliFMDEdepMap.h:93
Bool_t IsFloat() const
Definition: AliFMDEdepMap.h:91
Int_t MaxIndex() const
Definition: AliFMDEdepMap.h:81
Bool_t & AtAsBool(Int_t idx)
Definition: AliFMDEdepMap.h:85
Cache of Energy deposited, hit information per strip. Contains a pair of energy deposited fEdep and n...