QA ref defaut storage setter in sim and rec
[u/mrichter/AliRoot.git] / PMD / AliPMDcludata.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 #include "Riostream.h"
16 #include "Rtypes.h"
17 #include "AliPMDcludata.h"
18 #include <stdio.h>
19
20 ClassImp(AliPMDcludata)
21
22 AliPMDcludata::AliPMDcludata()
23 {
24   // Default constructor
25   for (Int_t i = 0; i < 19; i++)
26     {
27       if(i < 6) fClusData[i] = 0.;
28       fClXY[i] = 0;
29
30     }
31 }
32 // --------------------------------------------------------------------- //
33 AliPMDcludata::AliPMDcludata(Float_t *clusdata, Int_t *clxy)
34 {
35   // Constructor
36   for (Int_t i = 0; i < 19; i++)
37     {
38       if (i < 6) fClusData[i] = clusdata[i];
39       fClXY[i] = clxy[i];
40     }
41   
42 }
43 // --------------------------------------------------------------------- //
44 AliPMDcludata::AliPMDcludata(const AliPMDcludata &pmdcludata):
45   TObject(pmdcludata)
46 {
47   //Copy Constructor 
48   for(Int_t i=0; i<19; i++)
49     {
50       if (i < 6) this->fClusData[i] = pmdcludata.fClusData[i];
51       this->fClXY[i] = pmdcludata.fClXY[i];
52     }
53 }
54 // --------------------------------------------------------------------- //
55
56 AliPMDcludata & AliPMDcludata::operator=(const AliPMDcludata &pmdcludata)
57 {
58   // Assignment operator 
59   if(this != &pmdcludata)
60     {
61       for(Int_t i=0; i<19; i++)
62         {
63           if (i < 6) this->fClusData[i] = pmdcludata.fClusData[i];
64           this->fClXY[i] = pmdcludata.fClXY[i];
65         }
66     }
67   return *this;
68 }
69 // --------------------------------------------------------------------- //
70
71 AliPMDcludata::~AliPMDcludata()
72 {
73   // Destructor
74 }
75 // --------------------------------------------------------------------- //
76 Float_t AliPMDcludata::GetClusX() const
77 {
78   return fClusData[0];
79 }
80 // --------------------------------------------------------------------- //
81 Float_t AliPMDcludata::GetClusY() const
82 {
83   return fClusData[1];
84 }
85 // --------------------------------------------------------------------- //
86 Float_t AliPMDcludata::GetClusADC() const
87 {
88   return fClusData[2];
89 }
90 // --------------------------------------------------------------------- //
91 Float_t AliPMDcludata::GetClusCells() const
92 {
93   return fClusData[3];
94 }
95 // --------------------------------------------------------------------- //
96 Float_t AliPMDcludata::GetClusSigmaX() const
97 {
98   return fClusData[4];
99 }
100 // --------------------------------------------------------------------- //
101 Float_t AliPMDcludata::GetClusSigmaY() const
102 {
103   return fClusData[5];
104 }
105 // --------------------------------------------------------------------- //
106 Int_t AliPMDcludata::GetCellXY(Int_t i) const
107 {
108   return fClXY[i];
109 }
110 // --------------------------------------------------------------------- //