20 |
|
{ |
21 |
|
public: |
22 |
|
Collection() {} |
23 |
– |
~Collection() {} |
23 |
|
|
24 |
< |
virtual ArrayElement *At(UInt_t idx) = 0; |
25 |
< |
virtual const ArrayElement *At(UInt_t idx) const = 0; |
26 |
< |
virtual UInt_t GetEntries() const = 0; |
27 |
< |
virtual UInt_t GetSize() const = 0; |
28 |
< |
virtual Bool_t IsOwner() const = 0; |
29 |
< |
void Print(Option_t *opt="") const; |
30 |
< |
virtual void Reset() = 0; |
31 |
< |
virtual void Trim() = 0; |
32 |
< |
virtual ArrayElement *UncheckedAt(UInt_t idx) = 0; |
33 |
< |
virtual const ArrayElement *UncheckedAt(UInt_t idx) const = 0; |
34 |
< |
virtual ArrayElement *operator[](UInt_t idx) = 0; |
35 |
< |
virtual const ArrayElement *operator[](UInt_t idx) const = 0; |
24 |
> |
virtual ArrayElement *At(UInt_t idx) = 0; |
25 |
> |
virtual const ArrayElement *At(UInt_t idx) const = 0; |
26 |
> |
virtual UInt_t GetEntries() const = 0; |
27 |
> |
virtual UInt_t GetSize() const = 0; |
28 |
> |
virtual Bool_t HasObject(const ArrayElement *obj) const = 0; |
29 |
> |
virtual Bool_t IsOwner() const = 0; |
30 |
> |
void Print(Option_t *opt="") const; |
31 |
> |
virtual void Reset() = 0; |
32 |
> |
virtual void Trim() = 0; |
33 |
> |
virtual ArrayElement *UncheckedAt(UInt_t idx) = 0; |
34 |
> |
virtual const ArrayElement *UncheckedAt(UInt_t idx) const = 0; |
35 |
> |
virtual ArrayElement *operator[](UInt_t idx) = 0; |
36 |
> |
virtual const ArrayElement *operator[](UInt_t idx) const = 0; |
37 |
|
|
38 |
< |
ClassDefT(Collection,1) // Generic access to a collection of ArrayElements |
38 |
> |
ClassDef(Collection, 1) // Generic access to a collection of ArrayElements |
39 |
|
}; |
40 |
|
} |
41 |
|
|
42 |
|
//-------------------------------------------------------------------------------------------------- |
43 |
|
template<class ArrayElement> |
44 |
< |
void mithep::Collection<ArrayElement>::Print(Option_t *opt) const |
44 |
> |
void mithep::Collection<ArrayElement>::Print(Option_t */*opt*/) const |
45 |
|
{ |
46 |
+ |
// Print information about this collection. |
47 |
+ |
|
48 |
|
printf("%s: Contains %d (out of %d) objs\n", |
49 |
|
GetName(), GetEntries(), GetSize()); |
50 |
|
} |