Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:20:44

0001 #ifndef TRACKBASEHISTORIC_PHG4PARTICLESVTXMAP_V1_H
0002 #define TRACKBASEHISTORIC_PHG4PARTICLESVTXMAP_V1_H
0003 
0004 #include "PHG4ParticleSvtxMap.h"
0005 
0006 #include <iostream>
0007 
0008 class PHG4ParticleSvtxMap_v1 : public PHG4ParticleSvtxMap
0009 {
0010  public:
0011   PHG4ParticleSvtxMap_v1();
0012   PHG4ParticleSvtxMap_v1(const PHG4ParticleSvtxMap_v1& map);
0013   PHG4ParticleSvtxMap_v1& operator=(const PHG4ParticleSvtxMap_v1& map);
0014   ~PHG4ParticleSvtxMap_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 PHG4ParticleSvtxMap_v1(*this); }
0019   // cppcheck-suppress virtualCallInConstructor
0020   void Reset() override
0021   {
0022     clear();
0023     m_processed = false;
0024   }
0025   bool empty() const override { return m_map.empty(); }
0026   std::size_t size() const override { return m_map.size(); }
0027   std::size_t count(const int key) const override { return m_map.count(key); }
0028   void clear() override { m_map.clear(); }
0029 
0030   bool processed() const override { return m_processed; }
0031   void setProcessed(const bool process) override { m_processed = process; }
0032 
0033   const WeightedRecoTrackMap& get(const int key) const override;
0034   WeightedRecoTrackMap& get(const int key) override
0035   {
0036     return m_map[key];
0037   }
0038   WeightedRecoTrackMap insert(const int key, const WeightedRecoTrackMap map) override;
0039   std::size_t erase(const int key) override
0040   {
0041     return m_map.erase(key);
0042   }
0043 
0044   ConstIter begin() const override { return m_map.begin(); }
0045   ConstIter find(const int key) const override
0046   {
0047     return m_map.find(key);
0048   }
0049   ConstIter end() const override { return m_map.end(); }
0050 
0051   Iter begin() override { return m_map.begin(); }
0052   Iter find(const int key) override { return m_map.find(key); }
0053   Iter end() override { return m_map.end(); }
0054 
0055  private:
0056   PHG4ParticleSvtxMap::Map m_map;
0057   bool m_processed = false;
0058 
0059   ClassDefOverride(PHG4ParticleSvtxMap_v1, 1);
0060 };
0061 
0062 #endif