X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PMD%2FAliPMDsdigit.cxx;h=c0833aeee82809013ed372fc2a36498dabecface;hb=40389866548fc06fcc5655701a58bb65f61e09a6;hp=e233f925cc24df36594b82e90a9b47def8b141d5;hpb=b9746a9eb09cc13e13bbf80acd563b67f244952b;p=u%2Fmrichter%2FAliRoot.git diff --git a/PMD/AliPMDsdigit.cxx b/PMD/AliPMDsdigit.cxx index e233f925cc2..c0833aeee82 100644 --- a/PMD/AliPMDsdigit.cxx +++ b/PMD/AliPMDsdigit.cxx @@ -25,44 +25,63 @@ ClassImp(AliPMDsdigit) -AliPMDsdigit::AliPMDsdigit() +AliPMDsdigit::AliPMDsdigit(): + fTrNumber(0), + fDet(0), + fSMN(0), + fRow(0), + fColumn(0), + fEdep(0.) { // Default Constructor - fTrNumber = 0; - fDet = 0; - fSMN = 0; - fCellNumber = 0; - fEdep = 0.; } AliPMDsdigit::AliPMDsdigit(Int_t trnumber, Int_t det, Int_t smn, - Int_t cellnumber, Float_t edep) + Int_t irow, Int_t icol, Float_t edep): + fTrNumber(trnumber), + fDet(det), + fSMN(smn), + fRow(irow), + fColumn(icol), + fEdep(edep) { // Constructor - fTrNumber = trnumber; - fDet = det; - fSMN = smn; - fCellNumber = cellnumber; - fEdep = edep; } -AliPMDsdigit::AliPMDsdigit(const AliPMDsdigit& pmdsdigit):TObject(pmdsdigit) { + +AliPMDsdigit::AliPMDsdigit(AliPMDsdigit *pmdsdigit): + fTrNumber(0), + fDet(0), + fSMN(0), + fRow(0), + fColumn(0), + fEdep(0.) +{ + *this = *pmdsdigit; +} + +AliPMDsdigit::AliPMDsdigit(const AliPMDsdigit& pmdsdigit): + TObject(pmdsdigit), + fTrNumber(pmdsdigit.fTrNumber), + 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->fCellNumber = pmdsdigit.fCellNumber; - 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->fCellNumber = pmdsdigit.fCellNumber; - this->fEdep = pmdsdigit.fEdep; + if(this != &pmdsdigit) + { + fTrNumber = pmdsdigit.fTrNumber; + fDet = pmdsdigit.fDet; + fSMN = pmdsdigit.fSMN; + fRow = pmdsdigit.fRow; + fColumn = pmdsdigit.fColumn; + fEdep = pmdsdigit.fEdep; + } return *this; } @@ -83,11 +102,14 @@ Int_t AliPMDsdigit::GetSMNumber() const { return fSMN; } -Int_t AliPMDsdigit::GetCellNumber() const +Int_t AliPMDsdigit::GetRow() const { - return fCellNumber; + return fRow; +} +Int_t AliPMDsdigit::GetColumn() const +{ + return fColumn; } - Float_t AliPMDsdigit::GetCellEdep() const { return fEdep;