X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALRawDigit.cxx;h=307489aa1d954efc036ed5238e147e7754701593;hb=faa6d35f4386d5ca29bfb548597052090cb472ec;hp=d076e2d890798eeb49639234860f915c6e9c5ea8;hpb=aa878a7bd3c8c535450cf402b48a606310a0981d;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALRawDigit.cxx b/EMCAL/AliEMCALRawDigit.cxx index d076e2d8907..307489aa1d9 100644 --- a/EMCAL/AliEMCALRawDigit.cxx +++ b/EMCAL/AliEMCALRawDigit.cxx @@ -72,7 +72,8 @@ void AliEMCALRawDigit::Clear(Option_t *) //____________________________________________________________________________ Bool_t AliEMCALRawDigit::GetTimeSample(const Int_t iSample, Int_t& timeBin, Int_t& amp) const { - // + // returns the time and amplitude of a given time sample and if the sample was ok + if (iSample > fNSamples || iSample < 0) return kFALSE; amp = fSamples[iSample] & 0xFFF; @@ -84,7 +85,8 @@ Bool_t AliEMCALRawDigit::GetTimeSample(const Int_t iSample, Int_t& timeBin, Int_ //____________________________________________________________________________ void AliEMCALRawDigit::SetTimeSamples(const Int_t timeSamples[], const Int_t nSamples) { - // + // Sets the time samples + if (fSamples) { AliDebug(1,"Samples already filled: delete first!"); @@ -100,7 +102,8 @@ void AliEMCALRawDigit::SetTimeSamples(const Int_t timeSamples[], const Int_t nSa //____________________________________________________________________________ Bool_t AliEMCALRawDigit::GetMaximum(Int_t& amplitude, Int_t& time) const { - // + // Checks the maximum amplitude in the time sample + if (!fNSamples) { AliDebug(1,"Digit has no time sample"); @@ -149,7 +152,8 @@ Int_t AliEMCALRawDigit::Compare(const TObject * obj) const //____________________________________________________________________________ void AliEMCALRawDigit::Print(const Option_t* /*opt*/) const { - // + // print + printf("===\n| Digit id: %4d / %d Time Samples: \n",fId,fNSamples); for (Int_t i=0; i < fNSamples; i++) {