forked from sPHENIX-Collaboration/coresoftware
/
CMFlashClusterContainerv1.h
61 lines (43 loc) · 1.56 KB
/
CMFlashClusterContainerv1.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
* @file trackbase/CMFlashClusterContainerv1.h
* @author Tony Frawley
* @date January 2022
* @brief Implementation of central membrane flash cluster container object
*/
#ifndef TRACKBASE_CMFLASHCLUSTERCONTAINERV1_H
#define TRACKBASE_CMFLASHCLUSTERCONTAINERV1_H
#include "CMFlashClusterContainer.h"
#include <phool/PHObject.h>
#include <map>
#include <iostream> // for cout, ostream
#include <utility> // for pair
class CMFlashCluster;
/**
* @brief CM flash cluster container object
*
* Container for CMFlashCluster objects
*/
class CMFlashClusterContainerv1 : public CMFlashClusterContainer
{
public:
typedef std::map<unsigned int, CMFlashCluster *> Map;
typedef Map::iterator Iterator;
typedef Map::const_iterator ConstIterator;
typedef std::pair<Iterator, Iterator> Range;
typedef std::pair<ConstIterator, ConstIterator> ConstRange;
CMFlashClusterContainerv1() = default;
void Reset() override;
void identify(std::ostream &os = std::cout) const override;
ConstIterator addCluster(CMFlashCluster *newClus) override;
ConstIterator addClusterSpecifyKey(const unsigned int, CMFlashCluster *newClus) override;
void removeCluster(unsigned int) override;
void removeCluster(CMFlashCluster*) override;
Iterator findOrAddCluster(unsigned int key) override;
ConstRange getClusters() const override;
CMFlashCluster *findCluster(unsigned int key) const override;
unsigned int size() const override;
private:
Map m_clusmap;
ClassDefOverride(CMFlashClusterContainerv1, 1)
};
#endif //TRACKBASE_CMFLASHCLUSTERCONTAINER_H