22 #include <TObjArray.h> 23 #include <Riostream.h> 45 if (theSize<=0) theSize=16;
48 fArray->SetOwner(kTRUE);
58 AliDebug(1,Form(
"this=%p copy ctor",
this));
86 if (!
object)
return kFALSE;
88 Int_t i = (Int_t)object->GetUniqueID();
89 if ( i >=
fArray->GetSize() )
91 AliError(Form(
"Index out of bounds %u (max is %u)",i,
fArray->GetSize()));
95 Set(object->GetUniqueID(),object,kFALSE);
116 dest.
fArray->SetOwner(kTRUE);
117 for ( Int_t i = 0; i <
fArray->GetLast(); ++i )
137 if ( (Int_t)(i) <
fArray->GetSize() )
141 AliError(Form(
"Index %d out of bounds (max %d)",i,
fArray->GetSize()));
150 return fArray->MakeIterator();
161 if ( i >= 0 && i < fArray->
GetSize() )
163 if (((Int_t)(object->GetUniqueID()))!=i)
165 AliError(Form(
"object's UniqueID is %d, which is different from the expected %d",
166 object->GetUniqueID(),i));
173 AliError(Form(
"Object %p is already there for i=%d",o,i));
183 AliError(Form(
"Index %d out of bounds (max %d)",i,
fArray->GetSize()));
192 return fArray->GetEntries();
AliMUON1DArray & operator=(const AliMUON1DArray &other)
virtual TIterator * CreateIterator() const
Return an iterator to loop over the whole store.
virtual Bool_t Add(TObject *object)
virtual void Clear(Option_t *opt="")
Clear ourselves (i.e. Reset)
AliMUON1DArray(Int_t theSize=0)
Bool_t Set(Int_t i, TObject *object, Bool_t replace)
virtual Int_t GetSize() const
The number of objects stored.
TObjArray * fArray
Internal array.
virtual AliMUON1DArray * Create() const
Create an empty copy of this.
virtual ~AliMUON1DArray()
virtual TObject * FindObject(UInt_t identifier) const
Return the object stored with id.
Implementation of AliMUONVStore.
#define AliDebug(logLevel, message)
#define AliError(message)
void CopyTo(AliMUON1DArray &to) const
Base class for MUON data stores.