memory leak fixed
[u/mrichter/AliRoot.git] / PMD / AliPMDsdigit.cxx
CommitLineData
b9746a9e 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 **************************************************************************/
ec3caada 15//-----------------------------------------------------//
16// //
17// Date : August 05 2003 //
18// used to store the info into TreeS //
19// //
20//-----------------------------------------------------//
b9746a9e 21#include "Riostream.h"
22#include "Rtypes.h"
ec3caada 23#include "AliPMDsdigit.h"
24#include <stdio.h>
25
26ClassImp(AliPMDsdigit)
27
a48edddd 28AliPMDsdigit::AliPMDsdigit():
29 fTrNumber(0),
920e13db 30 fTrPid(0),
a48edddd 31 fDet(0),
32 fSMN(0),
33 fRow(0),
34 fColumn(0),
35 fEdep(0.)
ec3caada 36{
b9746a9e 37 // Default Constructor
ec3caada 38}
39
920e13db 40AliPMDsdigit::AliPMDsdigit(Int_t trnumber, Int_t trpid, Int_t det, Int_t smn,
a48edddd 41 Int_t irow, Int_t icol, Float_t edep):
42 fTrNumber(trnumber),
920e13db 43 fTrPid(trpid),
a48edddd 44 fDet(det),
45 fSMN(smn),
46 fRow(irow),
47 fColumn(icol),
48 fEdep(edep)
ec3caada 49{
b9746a9e 50 // Constructor
ec3caada 51}
a48edddd 52
53AliPMDsdigit::AliPMDsdigit(AliPMDsdigit *pmdsdigit):
54 fTrNumber(0),
920e13db 55 fTrPid(0),
a48edddd 56 fDet(0),
57 fSMN(0),
58 fRow(0),
59 fColumn(0),
60 fEdep(0.)
61{
62 *this = *pmdsdigit;
63}
64
65AliPMDsdigit::AliPMDsdigit(const AliPMDsdigit& pmdsdigit):
66 TObject(pmdsdigit),
67 fTrNumber(pmdsdigit.fTrNumber),
920e13db 68 fTrPid(pmdsdigit.fTrPid),
a48edddd 69 fDet(pmdsdigit.fDet),
70 fSMN(pmdsdigit.fSMN),
71 fRow(pmdsdigit.fRow),
72 fColumn(pmdsdigit.fColumn),
73 fEdep(pmdsdigit.fEdep)
74{
b9746a9e 75 //Copy Constructor
b9746a9e 76}
a48edddd 77AliPMDsdigit & AliPMDsdigit::operator=(const AliPMDsdigit& pmdsdigit)
78{
b9746a9e 79 //Assignment operator
a48edddd 80 if(this != &pmdsdigit)
81 {
82 fTrNumber = pmdsdigit.fTrNumber;
920e13db 83 fTrPid = pmdsdigit.fTrPid;
a48edddd 84 fDet = pmdsdigit.fDet;
85 fSMN = pmdsdigit.fSMN;
86 fRow = pmdsdigit.fRow;
87 fColumn = pmdsdigit.fColumn;
88 fEdep = pmdsdigit.fEdep;
89 }
b9746a9e 90 return *this;
91}
92
93
ec3caada 94AliPMDsdigit::~AliPMDsdigit()
95{
b9746a9e 96 // Default Destructor
ec3caada 97}
98Int_t AliPMDsdigit::GetTrackNumber() const
99{
100 return fTrNumber;
101}
920e13db 102Int_t AliPMDsdigit::GetTrackPid() const
103{
104 return fTrPid;
105}
ec3caada 106Int_t AliPMDsdigit::GetDetector() const
107{
108 return fDet;
109}
110Int_t AliPMDsdigit::GetSMNumber() const
111{
112 return fSMN;
113}
5e6a9312 114Int_t AliPMDsdigit::GetRow() const
ec3caada 115{
5e6a9312 116 return fRow;
117}
118Int_t AliPMDsdigit::GetColumn() const
119{
120 return fColumn;
ec3caada 121}
ec3caada 122Float_t AliPMDsdigit::GetCellEdep() const
123{
124 return fEdep;
125}