CMS 3D CMS Logo

CaloRecHitMetaCollection.h

Go to the documentation of this file.
00001 #ifndef RECOCALOTOOLS_METACOLLECTIONS_CALORECHITMETACOLLECTION_H
00002 #define RECOCALOTOOLS_METACOLLECTIONS_CALORECHITMETACOLLECTION_H 1
00003 
00004 #include "RecoCaloTools/MetaCollections/interface/CaloRecHitMetaCollectionV.h"
00005 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
00006 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00007 #include <map>
00008 
00009 class CaloRecHitMetaCollectionItem;
00010 
00017 class CaloRecHitMetaCollection : public CaloRecHitMetaCollectionV {
00018 public:
00019   typedef CaloRecHitMetaCollectionV::Iterator const_iterator;
00020 
00021   void add(const HBHERecHitCollection* hbhe);
00022   void add(const HORecHitCollection* ho);
00023   void add(const HFRecHitCollection* hf);
00024   void add(const EcalRecHitCollection* ecal);
00025 
00026   virtual ~CaloRecHitMetaCollection();
00027   virtual const_iterator find(const DetId& id) const;
00028   virtual const CaloRecHit* at(const_iterator::offset_type i) const;
00029 private:
00030   // This map is used for "at", and the key is the global index of the largest item in the list.
00031   std::map<int,CaloRecHitMetaCollectionItem*> m_items;
00032   std::multimap<int, CaloRecHitMetaCollectionItem*> m_findTool;
00033   int findIndex(const DetId& id) const;
00034 };
00035 
00036 #endif

Generated on Tue Jun 9 17:43:10 2009 for CMSSW by  doxygen 1.5.4