ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SvtxTrackMap_v1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SvtxTrackMap_v1.h
1 #ifndef TRACKBASEHISTORIC_SVTXTRACKMAPV1_H
2 #define TRACKBASEHISTORIC_SVTXTRACKMAPV1_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_v1(const SvtxTrackMap_v1& trackmap);
17  SvtxTrackMap_v1& operator=(const SvtxTrackMap_v1& trackmap);
18  ~SvtxTrackMap_v1() override;
19 
20  void identify(std::ostream& os = std::cout) const override;
21  void Reset() override;
22  int isValid() const override { return 1; }
23  PHObject* CloneMe() const override { return new SvtxTrackMap_v1(*this); }
24 
25  bool empty() const override{ return _map.empty(); }
26  size_t size() const override { return _map.size(); }
27  size_t count(unsigned int idkey) const override{ return _map.count(idkey); }
28  void clear() override { Reset(); }
29 
30  const SvtxTrack* get(unsigned int idkey) const override;
31  SvtxTrack* get(unsigned int idkey) override;
32  SvtxTrack* insert(const SvtxTrack* track) override;
33  size_t erase(unsigned int idkey) override
34  {
35  delete _map[idkey];
36  return _map.erase(idkey);
37  }
38 
39  ConstIter begin() const override { return _map.begin(); }
40  ConstIter find(unsigned int idkey) const override { return _map.find(idkey); }
41  ConstIter end() const override { return _map.end(); }
42 
43  Iter begin() override { return _map.begin(); }
44  Iter find(unsigned int idkey) override { return _map.find(idkey); }
45  Iter end() override { return _map.end(); }
46 
47  private:
49 
51 };
52 
53 #endif