Fixes for coverity
[u/mrichter/AliRoot.git] / PMD / AliPMDrecdata.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 //                                                     //
18 //  Date   : May 27 2009                               //
19 //                                                     //
20 //                                                     //
21 //-----------------------------------------------------//
22 #include "Riostream.h"
23 #include "Rtypes.h"
24 #include "AliPMDrecdata.h"
25 #include <stdio.h>
26
27 ClassImp(AliPMDrecdata)
28
29 AliPMDrecdata::AliPMDrecdata():
30   fDet(0),
31   fSMN(0),
32   fTrackNo(0),
33   fTrackPid(0)
34 {
35   // Default constructor
36   for (Int_t i = 0; i < 6; i++)
37     {
38       fClusData[i] = 0.;
39     }
40 }
41 // ------------------------------------------------------------------------- //
42 AliPMDrecdata::AliPMDrecdata(Int_t idet, Int_t ismn, Int_t trno,
43                              Int_t trpid, Float_t *clusdata):
44   fDet(idet),
45   fSMN(ismn),
46   fTrackNo(trno),
47   fTrackPid(trpid)
48 {
49   // Constructor
50   for (Int_t i = 0; i < 6; i++)
51     {
52       fClusData[i] = clusdata[i];
53     }
54 }
55 // ------------------------------------------------------------------------- //
56 AliPMDrecdata::AliPMDrecdata(AliPMDrecdata *pmdrecpoint):
57   fDet(0),
58   fSMN(0),
59   fTrackNo(0),
60   fTrackPid(0)
61 {
62   *this = *pmdrecpoint;
63 }
64
65 // ------------------------------------------------------------------------- //
66 AliPMDrecdata::AliPMDrecdata(const AliPMDrecdata &pmdrecpoint):
67   TObject(pmdrecpoint),
68   fDet(pmdrecpoint.fDet),
69   fSMN(pmdrecpoint.fSMN),
70   fTrackNo(pmdrecpoint.fTrackNo),
71   fTrackPid(pmdrecpoint.fTrackPid)
72 {
73   //Copy Constructor 
74   for(Int_t i=0; i<6; i++)
75     {
76       fClusData[i] = pmdrecpoint.fClusData[i];
77     }
78 }
79 // ------------------------------------------------------------------------- //
80 AliPMDrecdata & AliPMDrecdata::operator=(const AliPMDrecdata &pmdrecpoint)
81 {
82   // Assignment operator 
83   if(this != &pmdrecpoint)
84     {
85       fDet      = pmdrecpoint.fDet;
86       fSMN      = pmdrecpoint.fSMN;
87       fTrackNo  = pmdrecpoint.fTrackNo;
88       fTrackPid = pmdrecpoint.fTrackPid;
89       for(Int_t i=0; i<6; i++)
90         {
91           fClusData[i] = pmdrecpoint.fClusData[i];
92         }
93     }
94   return *this;
95 }
96 // ------------------------------------------------------------------------- //
97 AliPMDrecdata::~AliPMDrecdata()
98 {
99   // Default destructor
100 }
101 // ------------------------------------------------------------------------- //
102 Int_t AliPMDrecdata::GetDetector() const
103 {
104   return fDet;
105 }
106 // ------------------------------------------------------------------------- //
107 Int_t AliPMDrecdata::GetSMNumber() const
108 {
109   return fSMN;
110 }
111 // ------------------------------------------------------------------------- //
112 Int_t AliPMDrecdata::GetClusTrackNo() const
113 {
114   return fTrackNo;
115 }
116 // ------------------------------------------------------------------------- //
117 Int_t AliPMDrecdata::GetClusTrackPid() const
118 {
119   return fTrackPid;
120 }
121 // ------------------------------------------------------------------------- //
122 Float_t AliPMDrecdata::GetClusX() const
123 {
124   return fClusData[0];
125 }
126 // ------------------------------------------------------------------------- //
127 Float_t AliPMDrecdata::GetClusY() const
128 {
129   return fClusData[1];
130 }
131 // ------------------------------------------------------------------------- //
132 Float_t AliPMDrecdata::GetClusADC() const
133 {
134   return fClusData[2];
135 }
136 // ------------------------------------------------------------------------- //
137 Float_t AliPMDrecdata::GetClusCells() const
138 {
139   return fClusData[3];
140 }
141 // ------------------------------------------------------------------------- //
142 Float_t AliPMDrecdata::GetClusSigmaX() const
143 {
144   return fClusData[4];
145 }
146 // ------------------------------------------------------------------------- //
147 Float_t AliPMDrecdata::GetClusSigmaY() const
148 {
149   return fClusData[5];
150 }
151 // ------------------------------------------------------------------------- //
152
153