CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DataFormats/FP420Digi/interface/DigiCollectionFP420.h

Go to the documentation of this file.
00001 #ifndef DataFormats_DigiCollectionFP420_h
00002 #define DataFormats_DigiCollectionFP420_h
00003 
00004 //#include "SimRomanPot/SimFP420/interface/HDigiFP420.h"
00005 //#include "SimRomanPot/DataFormats/interface/HDigiFP420.h"
00006 
00007 #include "DataFormats/FP420Digi/interface/HDigiFP420.h"
00008 
00009 #include <utility>
00010 #include <vector>
00011 #include <map>
00012 #include <iostream>
00013 
00014 class DigiCollectionFP420 {
00015 
00016  public:
00017   
00018   typedef std::vector<HDigiFP420>::const_iterator ContainerIterator;
00019   typedef std::pair<ContainerIterator, ContainerIterator> Range;
00020   typedef std::pair<unsigned int, unsigned int> IndexRange;
00021   typedef std::map<unsigned int, IndexRange> Registry;
00022   typedef std::map<unsigned int, IndexRange>::const_iterator RegistryIterator;
00023   typedef std::map< unsigned int, std::vector<HDigiFP420> > HDigiFP420Container; 
00024 
00025   DigiCollectionFP420() {}
00026   
00027   void put(Range input, unsigned int detID);
00028   const Range get(unsigned int detID) const;
00029   const Range get1(unsigned int detID) const;
00030   const std::vector<unsigned int> detIDs() const;
00031 
00032   void add( unsigned int& det_id, std::vector<HDigiFP420>& digis ); 
00033   void digis( unsigned int& det_id, std::vector<HDigiFP420>& digis ) const; 
00034   void detIDs( std::vector<unsigned int>& det_ids ) const; 
00035 
00036   void putclear(Range input, unsigned int detID);
00037   void clear();
00038  private:
00039 
00040   mutable std::vector<HDigiFP420> container_;
00041   mutable Registry map_;
00042 
00043   mutable HDigiFP420Container digiMap_; 
00044 
00045 
00046 };
00047 
00048 #endif 
00049 
00050