39 |
|
TIterator *Iterator(Bool_t dir = kIterForward) const; |
40 |
|
Bool_t MustClear() const { return this->TestBit(14); } |
41 |
|
Bool_t MustDelete() const { return this->TestBit(15); } |
42 |
+ |
TObject *ObjAt(UInt_t idx); |
43 |
+ |
const TObject *ObjAt(UInt_t idx) const; |
44 |
|
void Print(Option_t *opt="") const; |
45 |
|
void Reset(); |
46 |
|
void SetMustClearBit() { this->SetBit(14); } |
60 |
|
private: |
61 |
|
Array(const Array &a); |
62 |
|
|
63 |
< |
ClassDefT(Array,1) // Wrapper around TClonesArray class |
63 |
> |
ClassDefT(Array, 1) // Wrapper around TClonesArray class |
64 |
|
}; |
65 |
|
} |
66 |
|
|
111 |
|
if (idx<fNumEntries) |
112 |
|
return static_cast<ArrayElement*>(fArray.UncheckedAt(idx)); |
113 |
|
|
112 |
– |
ArrayElement tmp; |
114 |
|
TObject::Fatal("At","Index too large: (%ud < %ud violated) for %s containing %s", |
115 |
< |
idx, fNumEntries, GetName(), tmp.GetName()); |
115 |
> |
idx, fNumEntries, GetName(), ArrayElement::Class_Name()); |
116 |
|
return 0; |
117 |
|
} |
118 |
|
|
125 |
|
if (idx<fNumEntries) |
126 |
|
return static_cast<const ArrayElement*>(fArray.UncheckedAt(idx)); |
127 |
|
|
127 |
– |
ArrayElement tmp; |
128 |
|
TObject::Fatal("At","Index too large: (%ud < %ud violated) for %s containing %s", |
129 |
< |
idx, fNumEntries, GetName(), tmp.GetName()); |
129 |
> |
idx, fNumEntries, GetName(), ArrayElement::Class_Name()); |
130 |
|
return 0; |
131 |
|
} |
132 |
|
|
167 |
|
} |
168 |
|
|
169 |
|
//-------------------------------------------------------------------------------------------------- |
170 |
+ |
template<class ArrayElement> |
171 |
+ |
inline TObject *mithep::Array<ArrayElement>::ObjAt(UInt_t idx) |
172 |
+ |
{ |
173 |
+ |
// Return object at given index. |
174 |
+ |
|
175 |
+ |
if (idx<fNumEntries) |
176 |
+ |
return fArray.UncheckedAt(idx); |
177 |
+ |
|
178 |
+ |
TObject::Fatal("At","Index too large: (%ud < %ud violated) for %s containing %s", |
179 |
+ |
idx, fNumEntries, GetName(), ArrayElement::Class_Name()); |
180 |
+ |
return 0; |
181 |
+ |
} |
182 |
+ |
|
183 |
+ |
//-------------------------------------------------------------------------------------------------- |
184 |
+ |
template<class ArrayElement> |
185 |
+ |
const TObject *mithep::Array<ArrayElement>::ObjAt(UInt_t idx) const |
186 |
+ |
{ |
187 |
+ |
// Return object at given index. |
188 |
+ |
|
189 |
+ |
if (idx<fNumEntries) |
190 |
+ |
return static_cast<const TObject*>(fArray.UncheckedAt(idx)); |
191 |
+ |
|
192 |
+ |
TObject::Fatal("At","Index too large: (%ud < %ud violated) for %s containing %s", |
193 |
+ |
idx, fNumEntries, GetName(), ArrayElement::Class_Name()); |
194 |
+ |
return 0; |
195 |
+ |
} |
196 |
+ |
|
197 |
+ |
//-------------------------------------------------------------------------------------------------- |
198 |
|
template<class ArrayElement> |
199 |
|
inline void mithep::Array<ArrayElement>::Reset() |
200 |
|
{ |