X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PMD%2FAliPMDsdigit.cxx;h=fda342989e91049765fe6195d5a4e8538665e43e;hb=069fccec969352d2eac577dd6423a7fbdf11552d;hp=27b2de1862206e38bfe2532c613bdce926f1fa4b;hpb=5e6a93122217e4453f6e6f28b351597572336177;p=u%2Fmrichter%2FAliRoot.git diff --git a/PMD/AliPMDsdigit.cxx b/PMD/AliPMDsdigit.cxx index 27b2de18622..fda342989e9 100644 --- a/PMD/AliPMDsdigit.cxx +++ b/PMD/AliPMDsdigit.cxx @@ -25,48 +25,68 @@ ClassImp(AliPMDsdigit) -AliPMDsdigit::AliPMDsdigit() +AliPMDsdigit::AliPMDsdigit(): + fTrNumber(0), + fTrPid(0), + fDet(0), + fSMN(0), + fRow(0), + fColumn(0), + fEdep(0.) { // Default Constructor - fTrNumber = 0; - fDet = 0; - fSMN = 0; - fRow = 0; - fColumn = 0; - fEdep = 0.; } -AliPMDsdigit::AliPMDsdigit(Int_t trnumber, Int_t det, Int_t smn, - Int_t irow, Int_t icol, Float_t edep) +AliPMDsdigit::AliPMDsdigit(Int_t trnumber, Int_t trpid, Int_t det, Int_t smn, + Int_t irow, Int_t icol, Float_t edep): + fTrNumber(trnumber), + fTrPid(trpid), + fDet(det), + fSMN(smn), + fRow(irow), + fColumn(icol), + fEdep(edep) { // Constructor - fTrNumber = trnumber; - fDet = det; - fSMN = smn; - fRow = irow; - fColumn = icol; - fEdep = edep; } -AliPMDsdigit::AliPMDsdigit(const AliPMDsdigit& pmdsdigit):TObject(pmdsdigit) { + +AliPMDsdigit::AliPMDsdigit(AliPMDsdigit *pmdsdigit): + fTrNumber(0), + fTrPid(0), + fDet(0), + fSMN(0), + fRow(0), + fColumn(0), + fEdep(0.) +{ + *this = *pmdsdigit; +} + +AliPMDsdigit::AliPMDsdigit(const AliPMDsdigit& pmdsdigit): + TObject(pmdsdigit), + fTrNumber(pmdsdigit.fTrNumber), + fTrPid(pmdsdigit.fTrPid), + fDet(pmdsdigit.fDet), + fSMN(pmdsdigit.fSMN), + fRow(pmdsdigit.fRow), + fColumn(pmdsdigit.fColumn), + fEdep(pmdsdigit.fEdep) +{ //Copy Constructor - if(&pmdsdigit == this) return; - this->fTrNumber = pmdsdigit.fTrNumber; - this->fDet = pmdsdigit.fDet; - this->fSMN = pmdsdigit.fSMN; - this->fRow = pmdsdigit.fRow; - this->fColumn = pmdsdigit.fColumn; - this->fEdep = pmdsdigit.fEdep; - return; } -AliPMDsdigit & AliPMDsdigit::operator=(const AliPMDsdigit& pmdsdigit) { +AliPMDsdigit & AliPMDsdigit::operator=(const AliPMDsdigit& pmdsdigit) +{ //Assignment operator - if(&pmdsdigit == this) return *this; - this->fTrNumber = pmdsdigit.fTrNumber; - this->fDet = pmdsdigit.fDet; - this->fSMN = pmdsdigit.fSMN; - this->fRow = pmdsdigit.fRow; - this->fColumn = pmdsdigit.fColumn; - this->fEdep = pmdsdigit.fEdep; + if(this != &pmdsdigit) + { + fTrNumber = pmdsdigit.fTrNumber; + fTrPid = pmdsdigit.fTrPid; + fDet = pmdsdigit.fDet; + fSMN = pmdsdigit.fSMN; + fRow = pmdsdigit.fRow; + fColumn = pmdsdigit.fColumn; + fEdep = pmdsdigit.fEdep; + } return *this; } @@ -79,6 +99,10 @@ Int_t AliPMDsdigit::GetTrackNumber() const { return fTrNumber; } +Int_t AliPMDsdigit::GetTrackPid() const +{ + return fTrPid; +} Int_t AliPMDsdigit::GetDetector() const { return fDet;