// $Id$
+//-----------------------------------------------------------------------------
/// \class AliMUONDigitStoreVImplIterator
///
/// Implementation of AliMUONVDataIterator for AliMUONDigitStoreVImpl
///
/// \author Laurent Aphecetche, Subatech
///
+//-----------------------------------------------------------------------------
#include "AliMUONDigitStoreVImplIterator.h"
//_____________________________________________________________________________
AliMUONDigitStoreVImplIterator::AliMUONDigitStoreVImplIterator(const AliMUONDigitStoreVImpl* store)
: TIterator(),
-fStore(store),
+fkStore(store),
fFirstDetElemId(100),
fLastDetElemId(1417),
fCathode(2),
//_____________________________________________________________________________
AliMUONDigitStoreVImplIterator::AliMUONDigitStoreVImplIterator(const AliMUONDigitStoreVImpl* store,
- Int_t firstDE,
- Int_t lastDE,
- Int_t cathode)
+ Int_t firstDE,
+ Int_t lastDE,
+ Int_t cathode)
: TIterator(),
-fStore(store),
+fkStore(store),
fFirstDetElemId(firstDE),
fLastDetElemId(lastDE),
fCathode(cathode),
/// ctor for partial iteration
}
-//_____________________________________________________________________________
-AliMUONDigitStoreVImplIterator::AliMUONDigitStoreVImplIterator(const AliMUONDigitStoreVImplIterator& rhs)
-: TIterator(rhs),
-fStore(rhs.fStore),
-fFirstDetElemId(rhs.fFirstDetElemId),
-fLastDetElemId(rhs.fLastDetElemId),
-fCathode(rhs.fCathode),
-fStoreIterator(0x0),
-fCurrentCalibParam(0x0),
-fCurrentCalibParamIndex(-1)
-{
- /// copy ctor
- Fatal("AliMUONDigitStoreVImplIterator::copy tor","Not implementeable"); // because there's no clone in TIterator :-(
-}
-
//_____________________________________________________________________________
AliMUONDigitStoreVImplIterator&
-AliMUONDigitStoreVImplIterator::operator=(const AliMUONDigitStoreVImplIterator&)
-{
- /// assignment operator
- Fatal("AliMUONDigitStoreVImplIterator::operator=","Not implementeable"); // because there's no clone in TIterator :-(
- return *this;
-}
-
-//_____________________________________________________________________________
-TIterator&
AliMUONDigitStoreVImplIterator::operator=(const TIterator&)
{
- /// overriden assignment operator (imposed by Root's declaration of Titerator ?)
+ // overriden assignment operator (imposed by Root's declaration of Titerator ?)
Fatal("TIterator::operator=","Not implementeable"); // because there's no clone in TIterator :-(
return *this;
}
fCurrentCalibParamIndex = 0;
if ( !fCurrentCalibParam ) return 0x0;
}
-
+
Int_t ix(-1);
AliMUONVDigit* d(0x0);
if (ix>=0)
{
- d = static_cast<AliMUONVDigit*>(fStore->fDigits->UncheckedAt(ix));
+ d = static_cast<AliMUONVDigit*>(fkStore->fDigits->UncheckedAt(ix));
}
}
else
{
- while ( fCurrentCalibParamIndex < 64 )
- {
- ix = fCurrentCalibParam->ValueAsInt(fCurrentCalibParamIndex++);
- if (ix>=0)
+ while ( d == 0x0 )
{
- d = static_cast<AliMUONVDigit*>(fStore->fDigits->UncheckedAt(ix));
+ while ( fCurrentCalibParamIndex < 64 && ix < 0 )
+ {
+ ix = fCurrentCalibParam->ValueAsInt(fCurrentCalibParamIndex++);
+ };
- if ( fCathode == 2 || d->Cathode() == fCathode )
+ if (ix>=0)
+ {
+ d = static_cast<AliMUONVDigit*>(fkStore->fDigits->UncheckedAt(ix));
+
+ if ( fCathode == 2 || d->Cathode() == fCathode )
+ {
+ break;
+ }
+ d = 0x0;
+ ix = -1;
+ }
+ else
{
break;
}
- d = 0x0;
}
}
- }
if (ix<0)
{