Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SvtxPHG4ParticleMap_v1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SvtxPHG4ParticleMap_v1.h
1 #ifndef TRACKBASEHISTORIC_SVTXPHG4PARTICLEMAP_V1_H
2 #define TRACKBASEHISTORIC_SVTXPHG4PARTICLEMAP_V1_H
3 
4 #include "SvtxPHG4ParticleMap.h"
5 #include <iostream>
6 
8 {
9  public:
13  ~SvtxPHG4ParticleMap_v1() override;
14 
15  void identify(std::ostream& os = std::cout) const override;
16  int isValid() const override { return 1; }
17  PHObject* CloneMe() const override { return new SvtxPHG4ParticleMap_v1(*this); }
18  // cppcheck-suppress virtualCallInConstructor
19  void Reset() override { clear(); m_processed = false; }
20 
21  bool empty() const override { return m_map.empty(); }
22  std::size_t size() const override { return m_map.size(); }
23  std::size_t count(const unsigned int key) const override { return m_map.count(key); }
24  void clear() override { m_map.clear(); }
25 
26  bool processed() const override { return m_processed; }
27  void setProcessed(const bool process) override { m_processed = process; }
28 
29  const WeightedTruthTrackMap & get(const unsigned int key) const override;
30  WeightedTruthTrackMap & get(const unsigned int key) override
31  {
32  return m_map[key];
33  }
34  WeightedTruthTrackMap insert(const unsigned int key, const WeightedTruthTrackMap map) override;
35  std::size_t erase(const unsigned int key) override
36  {
37  return m_map.erase(key);
38  }
39 
40  ConstIter begin() const override { return m_map.begin(); }
41  ConstIter find(const unsigned int key) const override
42  {
43  return m_map.find(key);
44  }
45  ConstIter end() const override { return m_map.end(); }
46 
47  Iter begin() override { return m_map.begin(); }
48  Iter find(const unsigned int key) override { return m_map.find(key); }
49  Iter end() override { return m_map.end(); }
50 
51  private:
53  bool m_processed = false;
54 
56 };
57 
58 #endif