CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CachingSeedCleanerBySharedInput.h
Go to the documentation of this file.
1 #ifndef CachingSeedCleanerBySharedInput_H
2 #define CachingSeedCleanerBySharedInput_H
4 #include <map>
5 #include <boost/unordered_map.hpp>
6 
9  public:
10 
12  virtual void add(const Trajectory *traj) ;
13 
15  virtual void init(const std::vector<Trajectory> *vect) ;
16 
17  virtual void done() ;
18 
20  virtual bool good(const TrajectorySeed *seed) ;
21 
22  CachingSeedCleanerBySharedInput(unsigned int numHitsForSeedCleaner=4,
23  bool onlyPixelHits=false) :
25  theNumHitsForSeedCleaner(numHitsForSeedCleaner),theOnlyPixelHits(onlyPixelHits){}
26 
27  virtual ~CachingSeedCleanerBySharedInput() { theVault.clear(); theCache.clear(); }
28  private:
29  std::vector<Trajectory::RecHitContainer> theVault;
30  //std::multimap<uint32_t, unsigned int> theCache;
31  boost::unordered_multimap<uint32_t, unsigned int> theCache;
32 
35 
36  //uint64_t comps_, tracks_, calls_;
37 };
38 
39 #endif
CachingSeedCleanerBySharedInput(unsigned int numHitsForSeedCleaner=4, bool onlyPixelHits=false)
virtual void add(const Trajectory *traj)
std::vector< Trajectory::RecHitContainer > theVault
boost::unordered_multimap< uint32_t, unsigned int > theCache
virtual bool good(const TrajectorySeed *seed)
Returns true if the seed is not overlapping with another trajectory.
virtual void init(const std::vector< Trajectory > *vect)
Provides the cleaner a pointer to the vector where trajectories are stored, in case it does not want ...
virtual void done()
Tells the cleaner that the seeds are finished, and so it can clear any cache it has.