Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:02

0001 #ifndef TRACKBASE_TRKRCLUSTERITERATIONV1_H
0002 #define TRACKBASE_TRKRCLUSTERITERATIONV1_H
0003 /**
0004 
0005  * @file trackbase/TrkrClusterHitAssocv3.h
0006  * @author D. McGlinchey
0007  * @date June 2018
0008  * @brief Version 3 of class for associating clusters to the hits that went into them
0009  */
0010 
0011 #include "TrkrClusterIterationMap.h"
0012 #include "TrkrDefs.h"
0013 
0014 #include <phool/PHObject.h>
0015 
0016 #include <iostream>  // for cout, ostream
0017 #include <map>
0018 #include <utility>  // for pair
0019 
0020 /**
0021  * @brief Class for associating clusters to the hits that went into them
0022  *
0023  * Store the associations between clusters and the hits that went into them.
0024  */
0025 class TrkrClusterIterationMapv1 : public TrkrClusterIterationMap
0026 {
0027  public:
0028   TrkrClusterIterationMapv1() = default;
0029 
0030   void Reset() override;
0031 
0032   void identify(std::ostream &os = std::cout) const override;
0033 
0034   void addIteration(TrkrDefs::cluskey, short int) override;
0035 
0036   short int getIteration(TrkrDefs::cluskey ckey) override;
0037 
0038   unsigned int size(void) const override;
0039 
0040   ConstIter begin() const override { return m_map.begin(); }
0041   ConstIter end() const override { return m_map.end(); }
0042 
0043  private:
0044   Map m_map;
0045 
0046   ClassDefOverride(TrkrClusterIterationMapv1, 1);
0047 };
0048 
0049 #endif  // TRACKBASE_TRKRCLUSTERITERATIONV1_H