File indexing completed on 2025-12-17 09:20:44
0001 #ifndef TRACKBASEHISTORIC_SVTXPHG4PARTICLEMAP_V1_H
0002 #define TRACKBASEHISTORIC_SVTXPHG4PARTICLEMAP_V1_H
0003
0004 #include "SvtxPHG4ParticleMap.h"
0005
0006 #include <iostream>
0007
0008 class SvtxPHG4ParticleMap_v1 : public SvtxPHG4ParticleMap
0009 {
0010 public:
0011 SvtxPHG4ParticleMap_v1();
0012 SvtxPHG4ParticleMap_v1(const SvtxPHG4ParticleMap_v1& map);
0013 SvtxPHG4ParticleMap_v1& operator=(const SvtxPHG4ParticleMap_v1& map);
0014 ~SvtxPHG4ParticleMap_v1() override;
0015
0016 void identify(std::ostream& os = std::cout) const override;
0017 int isValid() const override { return 1; }
0018 PHObject* CloneMe() const override { return new SvtxPHG4ParticleMap_v1(*this); }
0019
0020 void Reset() override
0021 {
0022 clear();
0023 m_processed = false;
0024 }
0025
0026 bool empty() const override { return m_map.empty(); }
0027 std::size_t size() const override { return m_map.size(); }
0028 std::size_t count(const unsigned int key) const override { return m_map.count(key); }
0029 void clear() override { m_map.clear(); }
0030
0031 bool processed() const override { return m_processed; }
0032 void setProcessed(const bool process) override { m_processed = process; }
0033
0034 const WeightedTruthTrackMap& get(const unsigned int key) const override;
0035 WeightedTruthTrackMap& get(const unsigned int key) override
0036 {
0037 return m_map[key];
0038 }
0039 WeightedTruthTrackMap insert(const unsigned int key, const WeightedTruthTrackMap map) override;
0040 std::size_t erase(const unsigned int key) override
0041 {
0042 return m_map.erase(key);
0043 }
0044
0045 ConstIter begin() const override { return m_map.begin(); }
0046 ConstIter find(const unsigned int key) const override
0047 {
0048 return m_map.find(key);
0049 }
0050 ConstIter end() const override { return m_map.end(); }
0051
0052 Iter begin() override { return m_map.begin(); }
0053 Iter find(const unsigned int key) override { return m_map.find(key); }
0054 Iter end() override { return m_map.end(); }
0055
0056 private:
0057 SvtxPHG4ParticleMap::Map m_map;
0058 bool m_processed = false;
0059
0060 ClassDefOverride(SvtxPHG4ParticleMap_v1, 1);
0061 };
0062
0063 #endif