emcClusterContainerv2.h

Go to the documentation of this file.
00001 #ifndef __emcClusterContainerv2_h__
00002 #define __emcClusterContainerv2_h__
00003 
00004 #include "emcClusterContentv2.h"
00005 #include "emcClusterContainer.h"
00006 
00007 class TClonesArray;
00008 
00012 class emcClusterContainerv2 : public emcClusterContainer
00013 {
00014 public:
00015 
00016   emcClusterContainerv2();
00017   emcClusterContainerv2(const emcClusterContainerv2&);
00018   emcClusterContainerv2& operator=(const emcClusterContainerv2&);
00019 
00020   unsigned int capacity(void) const;
00021 
00022   emcClusterContainerv2* clone(void) const;
00023 
00024   emcClusterContainerv2* create(void) const;
00025 
00026   virtual ~emcClusterContainerv2();
00027 
00028   emcClusterContentv2* addCluster(unsigned int i);
00029   
00030   emcClusterContentv2* addCluster(unsigned int i, 
00031                                   const emcClusterContent& c);
00032 
00033   emcClusterContentv2* findCluster(int clusterid) const;
00034 
00035   emcClusterContentv2* 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(emcClusterContainerv2& dest) const;
00056 
00057   static const unsigned int fgDefaultSize;
00058   static const unsigned int fgMaxSize;
00059 
00060   ClassDef(emcClusterContainerv2,1) // Array of emcClusterContentv2
00061 };
00062 #endif