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