//____________________________________________________________________________
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;
- timeBin = (fSamples[iSample] >> 12) & 0xFF;
+ amp = (Short_t)(fSamples[iSample] & 0xFFFF);
+ timeBin = (Short_t)(fSamples[iSample] >> 16 );
return kTRUE;
}
//____________________________________________________________________________
void AliEMCALRawDigit::SetTimeSamples(const Int_t timeSamples[], const Int_t nSamples)
{
- //
+ // Sets the time samples
+
if (fSamples)
{
AliDebug(1,"Samples already filled: delete first!");
//____________________________________________________________________________
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");
//____________________________________________________________________________
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++)
{