]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUpgradeClusterList.h
cleanup
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUpgradeClusterList.h
1 #ifndef ITSUPGRADE_CLUSTER_LIST_H
2 #define ITSUPGRADE_CLUSTER_LIST_H
3 /* Copyright(c) 2004-2006, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 //////////////////////////////////////////////////////////////////////
6 // Author: A.Mastroserio, C.Terrevoli                               //
7 //         annalisa.mastroserio@cern.ch                             //  
8 //         cristina.terrevoli@ba.infn.it                            //     
9 //                                                                  //                  
10 //   This is class implements the use of a list of clusters.        //
11 //                                                                  //
12 //////////////////////////////////////////////////////////////////////  
13
14 /* $Id$ */
15 #include <Rtypes.h>
16
17 class AliITSUpgradeClusterListNode;
18
19 class AliITSUpgradeClusterList {
20
21  public:
22   AliITSUpgradeClusterList();
23   AliITSUpgradeClusterList(AliITSUpgradeClusterListNode* first,UInt_t nrEntries);
24   AliITSUpgradeClusterList(const AliITSUpgradeClusterList& ilist);
25   virtual ~AliITSUpgradeClusterList();
26   AliITSUpgradeClusterList& operator=(const AliITSUpgradeClusterList& ilist);
27
28   void                   Clear();
29   AliITSUpgradeClusterList*     Clone() const;
30
31   enum {kMaxLab=12}; // maximum number of MC labels associated to the cluster
32   Bool_t  Insert(Float_t col, Float_t row, UShort_t size, UShort_t widthZ, UShort_t widthPhi, UShort_t type, UShort_t charge, Int_t labels[24*kMaxLab]);
33
34   UInt_t   GetNrEntries() const {return fNrEntries;}
35   Float_t  GetColIndex(UInt_t index);
36   Float_t  GetRowIndex(UInt_t index);
37   UShort_t GetSizeIndex(UInt_t index);
38   UShort_t GetWidthZIndex(UInt_t index);
39   UShort_t GetWidthPhiIndex(UInt_t index);
40   UShort_t GetTypeIndex(UInt_t index);
41   UShort_t GetCharge(UInt_t index);
42   Int_t *  GetLabels(UInt_t index);
43
44  private:
45   UInt_t                 fNrEntries;
46   AliITSUpgradeClusterListNode* fFirst;
47   AliITSUpgradeClusterListNode* fLast;
48
49   Bool_t                  fFastAccess;
50   AliITSUpgradeClusterListNode** fFastAccessArray;
51   UInt_t                  fDummyIndex;
52
53
54   void                   ClearNode(AliITSUpgradeClusterListNode* &node); // delete this node and all after
55   AliITSUpgradeClusterListNode* CloneNode(AliITSUpgradeClusterListNode* node) const;
56
57   void                   ClearFastAccess();
58   void                   InitFastAccess();
59   void                   InitFastAccessNode(AliITSUpgradeClusterListNode* node);
60   void                   SetLastNode();
61
62 };
63
64 #endif