Unused variable i removed
[u/mrichter/AliRoot.git] / PMD / AliPMDcluster.cxx
1 /***************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 //-----------------------------------------------------//
16 //                                                     //
17 //  Date   : August 05 2003                            //
18 //                                                     //
19 //  Store cluster information                          //
20 //                                                     //
21 //-----------------------------------------------------//
22 #include "Riostream.h"
23 #include "Rtypes.h"
24 #include "AliPMDcluster.h"
25 #include <stdio.h>
26
27 ClassImp(AliPMDcluster)
28
29 AliPMDcluster::AliPMDcluster():
30   fDet(0),
31   fSMN(0)
32 {
33   // Default constructor
34   for (Int_t i = 0; i < 6; i++)
35     {
36       fClusData[i] = 0.;
37     }
38   for (Int_t i = 0; i < 15; i++)
39     {
40       fClusCellDataX[i] = 0;
41       fClusCellDataY[i] = 0;
42     }
43
44 }
45 // --------------------------------------------------------------------- //
46 AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
47                              Int_t *celldataX, Int_t *celldataY):
48   fDet(idet),
49   fSMN(ismn)
50 {
51   // Constructor
52   for (Int_t i = 0; i < 6; i++)
53     {
54       fClusData[i] = clusdata[i];
55     }
56   for (Int_t i = 0; i < 15; i++)
57     {
58       fClusCellDataX[i] = celldataX[i];
59       fClusCellDataY[i] = celldataY[i];
60     }
61
62 }
63 // --------------------------------------------------------------------- //
64 AliPMDcluster::AliPMDcluster(AliPMDcluster *pmdcluster):
65   fDet(0),
66   fSMN(0)
67 {
68   *this = *pmdcluster;
69 }
70 // --------------------------------------------------------------------- //
71
72 AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):
73   TObject(pmdcluster),
74   fDet(pmdcluster.fDet),
75   fSMN(pmdcluster.fSMN)
76 {
77   //Copy Constructor 
78   for(Int_t i=0; i<6; i++)
79     {
80       this->fClusData[i] = pmdcluster.fClusData[i];
81     }
82   for(Int_t i=0; i<15; i++)
83     {
84       this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
85       this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
86     }
87 }
88 // --------------------------------------------------------------------- //
89
90 AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
91 {
92   // Assignment operator 
93   if(this != &pmdcluster)
94     {
95       this->fDet = pmdcluster.fDet;
96       this->fSMN = pmdcluster.fSMN;
97       for(Int_t i=0; i<6; i++)
98         {
99           this->fClusData[i] = pmdcluster.fClusData[i];
100         }
101       for(Int_t i=0; i<15; i++)
102         {
103           this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
104           this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
105         }
106     }
107   return *this;
108 }
109 // --------------------------------------------------------------------- //
110
111 AliPMDcluster::~AliPMDcluster()
112 {
113   // Destructor
114 }
115 // --------------------------------------------------------------------- //
116
117 Int_t AliPMDcluster::GetDetector() const
118 {
119   return fDet;
120 }
121 // --------------------------------------------------------------------- //
122 Int_t AliPMDcluster::GetSMN() const
123 {
124   return fSMN;
125 }
126 // --------------------------------------------------------------------- //
127 Float_t AliPMDcluster::GetClusX() const
128 {
129   return fClusData[0];
130 }
131 // --------------------------------------------------------------------- //
132 Float_t AliPMDcluster::GetClusY() const
133 {
134   return fClusData[1];
135 }
136 // --------------------------------------------------------------------- //
137 Float_t AliPMDcluster::GetClusADC() const
138 {
139   return fClusData[2];
140 }
141 // --------------------------------------------------------------------- //
142 Float_t AliPMDcluster::GetClusCells() const
143 {
144   return fClusData[3];
145 }
146 // --------------------------------------------------------------------- //
147 Float_t AliPMDcluster::GetClusSigmaX() const
148 {
149   return fClusData[4];
150 }
151 // --------------------------------------------------------------------- //
152 Float_t AliPMDcluster::GetClusSigmaY() const
153 {
154   return fClusData[5];
155 }
156 // --------------------------------------------------------------------- //
157 Int_t AliPMDcluster::GetClusCellX(Int_t i) const
158 {
159   return fClusCellDataX[i];
160 }
161 // --------------------------------------------------------------------- //
162 Int_t AliPMDcluster::GetClusCellY(Int_t i) const
163 {
164   return fClusCellDataY[i];
165 }
166 // --------------------------------------------------------------------- //