EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CMFlashClusterContainer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CMFlashClusterContainer.h
1 #ifndef TRACKBASE_CMFLASHCLUSTERCONTAINER_H
2 #define TRACKBASE_CMFLASHCLUSTERCONTAINER_H
3 
11 #include <phool/PHObject.h>
12 
13 #include <map>
14 #include <iostream> // for cout, ostream
15 #include <utility> // for pair
16 
17 class CMFlashCluster;
18 
23 {
24  public:
25 
27 
28  using Map = std::map<unsigned int, CMFlashCluster *>;
29  using Iterator = Map::iterator;
30  using ConstIterator = Map::const_iterator;
31  using Range = std::pair<Iterator, Iterator>;
32  using ConstRange = std::pair<ConstIterator, ConstIterator>;
34 
36  void Reset() override {}
37 
39  void identify(std::ostream &/*os*/ = std::cout) const override {}
40 
43 
45  virtual ConstIterator addClusterSpecifyKey(const unsigned int, CMFlashCluster* ) = 0;
46 
48  virtual void removeCluster(unsigned int) {}
49 
51  virtual void removeCluster(CMFlashCluster* ) {}
52 
54  virtual Iterator findOrAddCluster(unsigned int) = 0;
55 
57  virtual ConstRange getClusters() const = 0;
58 
60  virtual CMFlashCluster* findCluster(unsigned int) const { return nullptr; }
61 
63  virtual unsigned int size() const { return 0; }
64 
65  protected:
67  CMFlashClusterContainer() = default;
68 
69  private:
70 
71  ClassDefOverride(CMFlashClusterContainer, 1)
72 
73 };
74 
75 #endif //TRACKBASE_CMFLASHCLUSTERCONTAINER_H