Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:36

0001 #ifndef DECAYFINDER_DECAYFINDERCONTAINERV1_H
0002 #define DECAYFINDER_DECAYFINDERCONTAINERV1_H
0003 
0004 #include "DecayFinderContainerBase.h"
0005 
0006 #include <cstddef>   // for size_t
0007 #include <iostream>  // for cout, ostream
0008 
0009 /**
0010  * @brief DecayFinder container object
0011  *
0012  * Container for DecayFinder objects, based off KFParticle_Container
0013  */
0014 
0015 class PHObject;
0016 
0017 class DecayFinderContainer_v1 : public DecayFinderContainerBase
0018 {
0019  public:
0020   DecayFinderContainer_v1();
0021   DecayFinderContainer_v1(const DecayFinderContainer_v1& decayfindermap);
0022   DecayFinderContainer_v1& operator=(const DecayFinderContainer_v1& decayfindermap);
0023   ~DecayFinderContainer_v1() override;
0024 
0025   void identify(std::ostream& os = std::cout) const override;
0026   // cppcheck-suppress virtualCallInConstructor
0027   void Reset() override;
0028   int isValid() const override { return 1; }
0029   PHObject* CloneMe() const override { return new DecayFinderContainerBase(*this); }
0030 
0031   bool empty() const override { return m_decaymap.empty(); }
0032   size_t size() const override { return m_decaymap.size(); }
0033   size_t count(unsigned int key) const override { return m_decaymap.count(key); }
0034   void clear() override { Reset(); }
0035 
0036   const Decay get(unsigned int key) const override;
0037   Decay get(unsigned int key) override;
0038 
0039   ConstIter begin() const override { return m_decaymap.begin(); }
0040   ConstIter find(unsigned int key) const override { return m_decaymap.find(key); }
0041   ConstIter end() const override { return m_decaymap.end(); }
0042 
0043   Iter begin() override { return m_decaymap.begin(); }
0044   Iter find(unsigned int key) override { return m_decaymap.find(key); }
0045   Iter end() override { return m_decaymap.end(); }
0046 
0047   Decay insert(const Decay& decay) override;
0048 
0049   // Use the PDG MC ID to return a subset of the DecayFinder container, if those particle exist in the container
0050   Map returnDecaysByPDGid(int PDGid) override;
0051 
0052   size_t erase(unsigned int key) override;
0053 
0054  private:
0055   Map m_decaymap;
0056 
0057   ClassDefOverride(DecayFinderContainer_v1, 1);
0058 };
0059 
0060 #endif  // DECAYFINDER_DECAYFINDERCONTAINERV1_H