Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sPHElectronPairContainerv1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file sPHElectronPairContainerv1.h
1 #ifndef SPHELECTRONPAIRCONTAINER_V1_H
2 #define SPHELECTRONPAIRCONTAINER_V1_H
3 
4 #include "sPHElectronPair.h"
5 #include "sPHElectronPairv1.h"
7 
8 #include <cstddef> // for size_t
9 #include <iostream> // for cout, ostream
10 
12 {
13 public:
14 
15  typedef std::map<unsigned int, sPHElectronPairv1*> PairMap;
16  typedef std::map<unsigned int, sPHElectronPairv1*>::const_iterator ConstIter;
17  typedef std::map<unsigned int, sPHElectronPairv1*>::iterator Iter;
18 
22 
24 
25  void identify(std::ostream& os = std::cout) const;
26  void Reset();
27  void clear() { Reset(); }
28  int isValid() const { return 1; }
29  size_t size() const { return _map.size(); }
30  bool empty() const { return _map.empty(); }
31  PHObject* CloneMe() const { return new sPHElectronPairContainerv1(*this); }
32 
33  const sPHElectronPairv1* get(unsigned int idkey) const;
34  sPHElectronPairv1* get(unsigned int idkey);
35  void insert(const sPHElectronPairv1* pair);
36  size_t erase(unsigned int idkey)
37  {
38  delete _map[idkey];
39  return _map.erase(idkey);
40  }
41 
42  ConstIter begin() const { return _map.begin(); }
43  ConstIter find(unsigned int idkey) const { return _map.find(idkey); }
44  ConstIter end() const { return _map.end(); }
45 
46  Iter begin() { return _map.begin(); }
47  Iter find(unsigned int idkey) { return _map.find(idkey); }
48  Iter end() { return _map.end(); }
49 
50 protected:
53 
54 };
55 
56 #endif
57