]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONDigitMapA1.h
Additional protection in case of negative indexes. More investigation is needed
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitMapA1.h
1 #ifndef ALIMUONDIGITMAPA1_H
2 #define ALIMUONDIGITMAPA1_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8 // Revision of includes 07/05/2004
9
10 /// \ingroup base
11 /// \class AliMUONDigitMapA1
12 /// \brief Implements cluster Map as a 1-dim array
13
14 #include "AliHitMap.h"
15
16 #include <TObject.h>
17
18 class TObjArray;
19
20 class AliMUONDigitMapA1 : public TObject
21 {
22  public:
23     AliMUONDigitMapA1();
24     AliMUONDigitMapA1(Int_t idDE, Int_t npx, Int_t npy);
25     virtual ~AliMUONDigitMapA1();
26
27     // Fill hits from list of digits into hit map
28     virtual  void  FillHits(TObjArray* dig);
29     // Clear the hit map
30     virtual  void  Clear(const char *opt = "");
31     // Set a single hit
32     virtual  void  SetHit(Int_t ix, Int_t iy, Int_t idigit);
33     // Delete a single hit
34     virtual  void  DeleteHit(Int_t ix, Int_t iy);
35     // Get index of hit in the list of digits
36     virtual Int_t  GetHitIndex(Int_t ix, Int_t iy) const;
37     // Get pointer to digit
38     virtual TObject*  GetHit(Int_t ix, Int_t iy) const;
39     // Flag a hit as used
40     virtual  void  FlagHit(Int_t ix, Int_t iy);
41     // Test hit status
42     virtual FlagType TestHit(Int_t ix, Int_t iy);
43
44  protected:
45     AliMUONDigitMapA1(const AliMUONDigitMapA1 & hitMap);
46     // Assignment operator
47     AliMUONDigitMapA1& operator = (const AliMUONDigitMapA1& rhs);
48     
49  private:
50     // Check index
51     Int_t CheckedIndex(Int_t ix, Int_t iy) const;
52  private:
53     Int_t fIdDE;                          // id DE
54     Int_t fNpx;                           // Maximum number of pads in x
55     Int_t fNpy;                           // Maximum number of pads in y
56     TObjArray *fDigits;                   // Pointer to digits
57     Int_t fMaxIndex;                      // maximum index in hit map
58     Int_t *fHitMap;                       // ! [fMaxIndex]         
59
60     ClassDef(AliMUONDigitMapA1,0) // Implements HitMap as a 1-dim array
61 };
62 #endif