emcClusterContainerv1.h

Go to the documentation of this file.
00001 #ifndef __emcClusterContainerv1_h__
00002 #define __emcClusterContainerv1_h__
00003 
00004 #include "emcClusterContentv1.h"
00005 #include "emcClusterContainer.h"
00006 
00007 class TClonesArray;
00008 
00012 class emcClusterContainerv1 : public emcClusterContainer
00013 {
00014 public:
00015 
00016   emcClusterContainerv1();
00017   emcClusterContainerv1(const emcClusterContainerv1&);
00018   emcClusterContainerv1& operator=(const emcClusterContainerv1&);
00019 
00020   unsigned int capacity(void) const;
00021 
00022   emcClusterContainerv1* clone(void) const;
00023 
00024   emcClusterContainerv1* create(void) const;
00025 
00026   virtual ~emcClusterContainerv1();
00027 
00028   emcClusterContentv1* addCluster(unsigned int i);
00029   
00030   emcClusterContentv1* addCluster(unsigned int i, 
00031                                   const emcClusterContent& c);
00032 
00033   emcClusterContentv1* findCluster(int clusterid) const;
00034 
00035   emcClusterContentv1* getCluster(unsigned int i) const;
00036 
00037   void identify(std::ostream& os=std::cout) const;
00038 
00039   int isValid() const;
00040 
00041   bool removeCluster(unsigned int i) ;
00042 
00043   void Reset();
00044 
00045   bool resize(unsigned int newsize);
00046 
00047   unsigned int size(void) const;
00048 
00049 protected:
00050 
00051   TClonesArray* fEmcClusters;
00052 
00053 private:
00054   void allocate(unsigned int thesize);
00055   void copy(emcClusterContainerv1& dest) const;
00056 
00057   static const unsigned int fgDefaultSize;
00058   static const unsigned int fgMaxSize;
00059 
00060   ClassDef(emcClusterContainerv1,1) // Array of emcClusterContentv1
00061 };
00062 #endif