emcClusterContainerv4.h

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