File indexing completed on 2025-08-05 08:17:03
0001 #ifndef TRACKBASE_TRKRHITSET_H
0002 #define TRACKBASE_TRKRHITSET_H
0003
0004
0005
0006
0007
0008
0009
0010 #include "TrkrDefs.h"
0011
0012 #include <phool/PHObject.h>
0013
0014 #include <iostream>
0015 #include <map>
0016 #include <utility> // for pair
0017
0018
0019 class TrkrHit;
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 class TrkrHitSet : public PHObject
0030 {
0031 public:
0032
0033 using Map = std::map<TrkrDefs::hitkey, TrkrHit*>;
0034 using ConstIterator = Map::const_iterator;
0035 using ConstRange = std::pair<ConstIterator, ConstIterator>;
0036
0037
0038 void identify(std::ostream& = std::cout) const override
0039 {
0040 }
0041
0042 void Reset() override
0043 {
0044 }
0045
0046
0047
0048
0049
0050 virtual void setHitSetKey(const TrkrDefs::hitsetkey)
0051 {
0052 }
0053
0054
0055
0056
0057
0058 virtual TrkrDefs::hitsetkey getHitSetKey() const
0059 {
0060 return TrkrDefs::HITSETKEYMAX;
0061 }
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071 virtual ConstIterator addHitSpecificKey(const TrkrDefs::hitkey, TrkrHit*);
0072
0073
0074
0075
0076
0077 virtual void removeHit(TrkrDefs::hitkey)
0078 {
0079 }
0080
0081
0082
0083
0084
0085
0086
0087
0088 virtual TrkrHit* getHit(const TrkrDefs::hitkey) const
0089 {
0090 return nullptr;
0091 }
0092
0093
0094
0095
0096
0097 virtual ConstRange getHits() const;
0098
0099
0100
0101
0102
0103
0104 virtual unsigned int size() const
0105 {
0106 return 0;
0107 }
0108
0109 protected:
0110
0111 TrkrHitSet() = default;
0112
0113 private:
0114 ClassDefOverride(TrkrHitSet, 1);
0115 };
0116
0117 #endif