Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:08

0001 /**
0002  * @file trackbase/CMFlashDifferenceContainerv1.h
0003  * @author Tony Frawley
0004  * @date January 2022
0005  * @brief Implementation of central membrane flash difference container object
0006  */
0007 #ifndef TRACKBASE_CMFLASHDIFFERENCECONTAINERV1_H
0008 #define TRACKBASE_CMFLASHDIFFERENCECONTAINERV1_H
0009 
0010 #include "CMFlashDifferenceContainer.h"
0011 
0012 #include <phool/PHObject.h>
0013 
0014 #include <iostream>  // for cout, ostream
0015 #include <map>
0016 #include <utility>  // for pair
0017 
0018 class CMFlashDifference;
0019 
0020 /**
0021  * @brief CM flash difference container object
0022  *
0023  * Container for CMFlashDifference objects
0024  */
0025 class CMFlashDifferenceContainerv1 : public CMFlashDifferenceContainer
0026 {
0027  public:
0028   typedef std::map<unsigned int, CMFlashDifference *> Map;
0029   typedef Map::iterator Iterator;
0030   typedef Map::const_iterator ConstIterator;
0031   typedef std::pair<Iterator, Iterator> Range;
0032   typedef std::pair<ConstIterator, ConstIterator> ConstRange;
0033 
0034   CMFlashDifferenceContainerv1() = default;
0035 
0036   void Reset() override;
0037 
0038   void identify(std::ostream &os = std::cout) const override;
0039 
0040   void addDifferenceSpecifyKey(const unsigned int, CMFlashDifference *newClus) override;
0041 
0042   void removeDifference(unsigned int) override;
0043 
0044   ConstRange getDifferences() const override;
0045 
0046   CMFlashDifference *findDifference(unsigned int key) const override;
0047 
0048   unsigned int size() const override;
0049 
0050  private:
0051   Map m_map;
0052   ClassDefOverride(CMFlashDifferenceContainerv1, 1)
0053 };
0054 
0055 #endif  // TRACKBASE_CMFLASHDIFFERENCECONTAINER_H