Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackSeedContainer_v1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackSeedContainer_v1.h
1 #ifndef TRACKBASEHISTORIC_TRACKSEEDCONTAINERV1_H
2 #define TRACKBASEHISTORIC_TRACKSEEDCONTAINERV1_H
3 
4 #include "TrackSeed.h"
5 #include "TrackSeedContainer.h"
6 
7 #include <iostream>
8 #include <vector>
9 
11 {
12 
13  public:
17  ~TrackSeedContainer_v1() override;
18 
19  void identify(std::ostream& os = std::cout) const override;
20  // cppcheck-suppress virtualCallInConstructor
21  void Reset() override;
22  int isValid() const override { return 1; }
23  PHObject* CloneMe() const override { return new TrackSeedContainer_v1(*this); }
24 
25  bool empty() const override { return m_seeds.empty(); }
26  std::size_t size() const override { return m_seeds.size(); }
27  void clear() override { Reset(); }
28 
29  const TrackSeed* get(const std::size_t key) const override;
30  TrackSeed* get(const std::size_t key) override;
31  TrackSeed* insert(const TrackSeed* seed) override;
32  void erase(const std::size_t key) override
33  {
34  delete m_seeds.at(key);
35  m_seeds.at(key) = nullptr;
36  }
37 
38  std::size_t index(ConstIter it) const override { return it - m_seeds.begin(); }
39  std::size_t index(Iter it) const override { return it - m_seeds.begin(); }
40 
41  ConstIter begin() const override { return m_seeds.begin(); }
42  ConstIter find(const std::size_t key) const override { return m_seeds.begin() + key; }
43  std::size_t find(const TrackSeed*) const override;
44  ConstIter end() const override { return m_seeds.end(); }
45 
46  Iter begin() override { return m_seeds.begin(); }
47  Iter find(const std::size_t key) override { return m_seeds.begin() + key; }
48  std::size_t find(const TrackSeed*) override;
49  Iter end() override { return m_seeds.end(); }
50 
51  private:
53 
55 
56 };
57 
58 #endif