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 
19 public:
21 
28 
29 
31  void add(const CaloRecHit* hit);
32 
33  virtual const_iterator find(const DetId& id) const;
34  virtual const CaloRecHit* at(const_iterator::offset_type i) const;
35 
36 private:
37  void sort() const;
38 
39  mutable std::vector<const CaloRecHit*> hits_;
40  mutable bool dirty_;
41 };
42 #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:18
CaloRecHitMetaCollectionV::Iterator const_iterator
virtual const CaloRecHit * at(const_iterator::offset_type i) const
get an item by index