#include "AliMUONTOTCAStoreIterator.h"
#include "AliLog.h"
#include <TClonesArray.h>
#include <TObjArray.h>
ClassImp(AliMUONTOTCAStoreIterator)
AliMUONTOTCAStoreIterator::AliMUONTOTCAStoreIterator(const TObjArray* data,
Int_t firstChamberId,
Int_t lastChamberId)
:
TIterator(),
fkData(data),
fFirstChamberId(firstChamberId),
fLastChamberId(lastChamberId),
fCurrentTCA(0x0),
fCurrentTCAIndex(-1),
fCurrentChamberId(-1)
{
Reset();
}
AliMUONTOTCAStoreIterator&
AliMUONTOTCAStoreIterator::operator=(const TIterator& rhs)
{
if ( this != &rhs )
{
if ( rhs.IsA() != AliMUONTOTCAStoreIterator::Class() )
{
AliErrorGeneral("AliMUONTOTCAStoreIterator::operator=","Wrong type");
}
else
{
const AliMUONTOTCAStoreIterator& rhs1 =
static_cast<const AliMUONTOTCAStoreIterator&>(rhs);
rhs1.CopyTo(*this);
}
}
return *this;
}
AliMUONTOTCAStoreIterator::AliMUONTOTCAStoreIterator(const AliMUONTOTCAStoreIterator& rhs)
:
TIterator(rhs),
fkData(0x0),
fFirstChamberId(-1),
fLastChamberId(-1),
fCurrentTCA(0x0),
fCurrentTCAIndex(-1),
fCurrentChamberId(-1)
{
rhs.CopyTo(*this);
}
AliMUONTOTCAStoreIterator::~AliMUONTOTCAStoreIterator()
{
}
AliMUONTOTCAStoreIterator&
AliMUONTOTCAStoreIterator::operator=(const AliMUONTOTCAStoreIterator& rhs)
{
rhs.CopyTo(*this);
return *this;
}
void
AliMUONTOTCAStoreIterator::CopyTo(AliMUONTOTCAStoreIterator& destination) const
{
destination.fkData=fkData;
destination.fFirstChamberId=fFirstChamberId;
destination.fLastChamberId=fLastChamberId;
destination.fCurrentTCAIndex=fCurrentTCAIndex;
destination.fCurrentChamberId=fCurrentChamberId;
destination.fCurrentTCA=fCurrentTCA;
}
const TCollection*
AliMUONTOTCAStoreIterator::GetCollection() const
{
return fkData;
}
TObject*
AliMUONTOTCAStoreIterator::Next()
{
if ( fCurrentTCA && fCurrentTCAIndex < fCurrentTCA->GetLast() )
{
++fCurrentTCAIndex;
}
else
{
fCurrentTCAIndex = 0;
fCurrentTCA = 0;
while ( ( !fCurrentTCA || fCurrentTCA->GetLast()==-1 ) &&
fCurrentChamberId < fLastChamberId )
{
++fCurrentChamberId;
fCurrentTCA = static_cast<TClonesArray*>(fkData->At(fCurrentChamberId));
}
}
if ( fCurrentTCA )
{
return fCurrentTCA->At(fCurrentTCAIndex);
}
return 0x0;
}
void
AliMUONTOTCAStoreIterator::Reset()
{
fCurrentTCAIndex = -1;
fCurrentChamberId = fFirstChamberId-1;
fCurrentTCA = 0x0;
}
AliMUONTOTCAStoreIterator.cxx:1 AliMUONTOTCAStoreIterator.cxx:2 AliMUONTOTCAStoreIterator.cxx:3 AliMUONTOTCAStoreIterator.cxx:4 AliMUONTOTCAStoreIterator.cxx:5 AliMUONTOTCAStoreIterator.cxx:6 AliMUONTOTCAStoreIterator.cxx:7 AliMUONTOTCAStoreIterator.cxx:8 AliMUONTOTCAStoreIterator.cxx:9 AliMUONTOTCAStoreIterator.cxx:10 AliMUONTOTCAStoreIterator.cxx:11 AliMUONTOTCAStoreIterator.cxx:12 AliMUONTOTCAStoreIterator.cxx:13 AliMUONTOTCAStoreIterator.cxx:14 AliMUONTOTCAStoreIterator.cxx:15 AliMUONTOTCAStoreIterator.cxx:16 AliMUONTOTCAStoreIterator.cxx:17 AliMUONTOTCAStoreIterator.cxx:18 AliMUONTOTCAStoreIterator.cxx:19 AliMUONTOTCAStoreIterator.cxx:20 AliMUONTOTCAStoreIterator.cxx:21 AliMUONTOTCAStoreIterator.cxx:22 AliMUONTOTCAStoreIterator.cxx:23 AliMUONTOTCAStoreIterator.cxx:24 AliMUONTOTCAStoreIterator.cxx:25 AliMUONTOTCAStoreIterator.cxx:26 AliMUONTOTCAStoreIterator.cxx:27 AliMUONTOTCAStoreIterator.cxx:28 AliMUONTOTCAStoreIterator.cxx:29 AliMUONTOTCAStoreIterator.cxx:30 AliMUONTOTCAStoreIterator.cxx:31 AliMUONTOTCAStoreIterator.cxx:32 AliMUONTOTCAStoreIterator.cxx:33 AliMUONTOTCAStoreIterator.cxx:34 AliMUONTOTCAStoreIterator.cxx:35 AliMUONTOTCAStoreIterator.cxx:36 AliMUONTOTCAStoreIterator.cxx:37 AliMUONTOTCAStoreIterator.cxx:38 AliMUONTOTCAStoreIterator.cxx:39 AliMUONTOTCAStoreIterator.cxx:40 AliMUONTOTCAStoreIterator.cxx:41 AliMUONTOTCAStoreIterator.cxx:42 AliMUONTOTCAStoreIterator.cxx:43 AliMUONTOTCAStoreIterator.cxx:44 AliMUONTOTCAStoreIterator.cxx:45 AliMUONTOTCAStoreIterator.cxx:46 AliMUONTOTCAStoreIterator.cxx:47 AliMUONTOTCAStoreIterator.cxx:48 AliMUONTOTCAStoreIterator.cxx:49 AliMUONTOTCAStoreIterator.cxx:50 AliMUONTOTCAStoreIterator.cxx:51 AliMUONTOTCAStoreIterator.cxx:52 AliMUONTOTCAStoreIterator.cxx:53 AliMUONTOTCAStoreIterator.cxx:54 AliMUONTOTCAStoreIterator.cxx:55 AliMUONTOTCAStoreIterator.cxx:56 AliMUONTOTCAStoreIterator.cxx:57 AliMUONTOTCAStoreIterator.cxx:58 AliMUONTOTCAStoreIterator.cxx:59 AliMUONTOTCAStoreIterator.cxx:60 AliMUONTOTCAStoreIterator.cxx:61 AliMUONTOTCAStoreIterator.cxx:62 AliMUONTOTCAStoreIterator.cxx:63 AliMUONTOTCAStoreIterator.cxx:64 AliMUONTOTCAStoreIterator.cxx:65 AliMUONTOTCAStoreIterator.cxx:66 AliMUONTOTCAStoreIterator.cxx:67 AliMUONTOTCAStoreIterator.cxx:68 AliMUONTOTCAStoreIterator.cxx:69 AliMUONTOTCAStoreIterator.cxx:70 AliMUONTOTCAStoreIterator.cxx:71 AliMUONTOTCAStoreIterator.cxx:72 AliMUONTOTCAStoreIterator.cxx:73 AliMUONTOTCAStoreIterator.cxx:74 AliMUONTOTCAStoreIterator.cxx:75 AliMUONTOTCAStoreIterator.cxx:76 AliMUONTOTCAStoreIterator.cxx:77 AliMUONTOTCAStoreIterator.cxx:78 AliMUONTOTCAStoreIterator.cxx:79 AliMUONTOTCAStoreIterator.cxx:80 AliMUONTOTCAStoreIterator.cxx:81 AliMUONTOTCAStoreIterator.cxx:82 AliMUONTOTCAStoreIterator.cxx:83 AliMUONTOTCAStoreIterator.cxx:84 AliMUONTOTCAStoreIterator.cxx:85 AliMUONTOTCAStoreIterator.cxx:86 AliMUONTOTCAStoreIterator.cxx:87 AliMUONTOTCAStoreIterator.cxx:88 AliMUONTOTCAStoreIterator.cxx:89 AliMUONTOTCAStoreIterator.cxx:90 AliMUONTOTCAStoreIterator.cxx:91 AliMUONTOTCAStoreIterator.cxx:92 AliMUONTOTCAStoreIterator.cxx:93 AliMUONTOTCAStoreIterator.cxx:94 AliMUONTOTCAStoreIterator.cxx:95 AliMUONTOTCAStoreIterator.cxx:96 AliMUONTOTCAStoreIterator.cxx:97 AliMUONTOTCAStoreIterator.cxx:98 AliMUONTOTCAStoreIterator.cxx:99 AliMUONTOTCAStoreIterator.cxx:100 AliMUONTOTCAStoreIterator.cxx:101 AliMUONTOTCAStoreIterator.cxx:102 AliMUONTOTCAStoreIterator.cxx:103 AliMUONTOTCAStoreIterator.cxx:104 AliMUONTOTCAStoreIterator.cxx:105 AliMUONTOTCAStoreIterator.cxx:106 AliMUONTOTCAStoreIterator.cxx:107 AliMUONTOTCAStoreIterator.cxx:108 AliMUONTOTCAStoreIterator.cxx:109 AliMUONTOTCAStoreIterator.cxx:110 AliMUONTOTCAStoreIterator.cxx:111 AliMUONTOTCAStoreIterator.cxx:112 AliMUONTOTCAStoreIterator.cxx:113 AliMUONTOTCAStoreIterator.cxx:114 AliMUONTOTCAStoreIterator.cxx:115 AliMUONTOTCAStoreIterator.cxx:116 AliMUONTOTCAStoreIterator.cxx:117 AliMUONTOTCAStoreIterator.cxx:118 AliMUONTOTCAStoreIterator.cxx:119 AliMUONTOTCAStoreIterator.cxx:120 AliMUONTOTCAStoreIterator.cxx:121 AliMUONTOTCAStoreIterator.cxx:122 AliMUONTOTCAStoreIterator.cxx:123 AliMUONTOTCAStoreIterator.cxx:124 AliMUONTOTCAStoreIterator.cxx:125 AliMUONTOTCAStoreIterator.cxx:126 AliMUONTOTCAStoreIterator.cxx:127 AliMUONTOTCAStoreIterator.cxx:128 AliMUONTOTCAStoreIterator.cxx:129 AliMUONTOTCAStoreIterator.cxx:130 AliMUONTOTCAStoreIterator.cxx:131 AliMUONTOTCAStoreIterator.cxx:132 AliMUONTOTCAStoreIterator.cxx:133 AliMUONTOTCAStoreIterator.cxx:134 AliMUONTOTCAStoreIterator.cxx:135 AliMUONTOTCAStoreIterator.cxx:136 AliMUONTOTCAStoreIterator.cxx:137 AliMUONTOTCAStoreIterator.cxx:138 AliMUONTOTCAStoreIterator.cxx:139 AliMUONTOTCAStoreIterator.cxx:140 AliMUONTOTCAStoreIterator.cxx:141 AliMUONTOTCAStoreIterator.cxx:142 AliMUONTOTCAStoreIterator.cxx:143 AliMUONTOTCAStoreIterator.cxx:144 AliMUONTOTCAStoreIterator.cxx:145 AliMUONTOTCAStoreIterator.cxx:146 AliMUONTOTCAStoreIterator.cxx:147 AliMUONTOTCAStoreIterator.cxx:148 AliMUONTOTCAStoreIterator.cxx:149 AliMUONTOTCAStoreIterator.cxx:150 AliMUONTOTCAStoreIterator.cxx:151 AliMUONTOTCAStoreIterator.cxx:152 AliMUONTOTCAStoreIterator.cxx:153 AliMUONTOTCAStoreIterator.cxx:154 AliMUONTOTCAStoreIterator.cxx:155 AliMUONTOTCAStoreIterator.cxx:156 AliMUONTOTCAStoreIterator.cxx:157 AliMUONTOTCAStoreIterator.cxx:158 AliMUONTOTCAStoreIterator.cxx:159 AliMUONTOTCAStoreIterator.cxx:160 AliMUONTOTCAStoreIterator.cxx:161 AliMUONTOTCAStoreIterator.cxx:162 AliMUONTOTCAStoreIterator.cxx:163 AliMUONTOTCAStoreIterator.cxx:164 AliMUONTOTCAStoreIterator.cxx:165 AliMUONTOTCAStoreIterator.cxx:166 AliMUONTOTCAStoreIterator.cxx:167