CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/DataFormats/FP420Cluster/interface/ClusterCollectionFP420.h

Go to the documentation of this file.
00001 #ifndef ClusterCollectionFP420_h
00002 #define ClusterCollectionFP420_h
00003 
00004 #include "DataFormats/FP420Cluster/interface/ClusterFP420.h"
00005 #include <vector>
00006 #include <map>
00007 #include <utility>
00008 
00009 class ClusterCollectionFP420 {
00010 
00011  public:
00012 
00013   typedef std::vector<ClusterFP420>::const_iterator ContainerIterator;
00014   typedef std::pair<ContainerIterator, ContainerIterator> Range;
00015   typedef std::pair<unsigned int, unsigned int> IndexRange;
00016   typedef std::map<unsigned int, IndexRange> Registry;
00017   typedef std::map<unsigned int, IndexRange>::const_iterator RegistryIterator;
00018   typedef std::map< unsigned int, std::vector<ClusterFP420> > ClusterFP420Container; 
00019 
00020     ClusterCollectionFP420() {}
00021     //  ClusterCollectionFP420() {
00022     //    container_.clear();
00023     //}
00024 
00025 //        virtual ~ClusterCollectionFP420(){
00026     //    delete ClusterCollectionFP420
00027     //   cout << " ClusterCollectionFP420h:     delete ClusterCollectionFP420  " << endl;
00028 //        }
00029 
00030   
00031   void put(Range input, unsigned int detID);
00032   const Range get(unsigned int detID) const;
00033   const std::vector<unsigned int> detIDs() const;
00034   void putclear(Range input, unsigned int detID);
00035   void clear();
00036   
00037  private:
00038   mutable std::vector<ClusterFP420> container_;
00039   mutable Registry map_;
00040 
00041   mutable ClusterFP420Container clusterMap_; 
00042 };
00043 
00044 #endif // 
00045 
00046