ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataCont/interface/Collection.h
Revision: 1.1
Committed: Tue Jul 29 10:36:20 2008 UTC (16 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: MITHEP_2_0_x
Log Message:
Added submodule for containers only

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id: Collection.h,v 1.10 2008/07/28 23:13:41 paus Exp $
3     //
4     // Collection
5     //
6     // Unification of read access to a collection of objects (ArrayElements).
7     //
8     // Authors: C.Loizides
9     //--------------------------------------------------------------------------------------------------
10    
11     #ifndef mithep_COLLECTION_H
12     #define mithep_COLLECTION_H
13    
14     #include "MitAna/DataCont/interface/BaseCollection.h"
15    
16     namespace mithep
17     {
18     template<class ArrayElement>
19     class Collection : public BaseCollection
20     {
21     public:
22     Collection() {}
23     ~Collection() {}
24    
25     virtual ArrayElement *At(UInt_t idx) = 0;
26     virtual const ArrayElement *At(UInt_t idx) const = 0;
27     virtual UInt_t GetEntries() const = 0;
28     virtual Bool_t IsOwner() const = 0;
29     virtual void Reset() = 0;
30     virtual void Trim() = 0;
31     virtual ArrayElement *UncheckedAt(UInt_t idx) = 0;
32     virtual const ArrayElement *UncheckedAt(UInt_t idx) const = 0;
33    
34     virtual ArrayElement *operator[](UInt_t idx) = 0;
35     virtual const ArrayElement *operator[](UInt_t idx) const = 0;
36    
37     ClassDefT(Collection,1) // Generic access to a collection of ArrayElements
38     };
39     }
40     #endif