CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloRecHitMetaCollectionFast.h
Go to the documentation of this file.
1 #ifndef RECOCALOTOOLS_METACOLLECTIONS_CALORECHITMETACOLLECTIONFAST_H
2 #define RECOCALOTOOLS_METACOLLECTIONS_CALORECHITMETACOLLECTIONFAST_H 1
3 
5 #include <vector>
6 
21 public:
23 
30 
31 
33  void add(const CaloRecHit* hit);
34 
35  virtual const_iterator find(const DetId& id) const;
36  virtual const CaloRecHit* at(const_iterator::offset_type i) const;
37 
38 private:
39  void sort() const;
40 
41  mutable std::vector<const CaloRecHit*> hits_;
42  mutable bool dirty_;
43 };
44 #endif
int i
Definition: DBlmapReader.cc:9
std::vector< const CaloRecHit * > hits_
CaloRecHitMetaCollectionFast()
create an empty collection
void add(const CaloRecHit *hit)
add an item to the collection
virtual ~CaloRecHitMetaCollectionFast()
destructor
virtual const_iterator find(const DetId &id) const
find by id (default version is very slow unsorted find)
Definition: DetId.h:20
CaloRecHitMetaCollectionV::Iterator const_iterator
virtual const CaloRecHit * at(const_iterator::offset_type i) const
get an item by index