-
Notifications
You must be signed in to change notification settings - Fork 184
/
RawClusterContainer.h
50 lines (36 loc) · 1.22 KB
/
RawClusterContainer.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
#ifndef CALOBASE_RAWCLUSTERCONTAINER_H
#define CALOBASE_RAWCLUSTERCONTAINER_H
#include "RawClusterDefs.h"
#include <phool/PHObject.h>
#include <iostream>
#include <map>
#include <utility>
class RawCluster;
class RawClusterContainer : public PHObject
{
public:
typedef std::map<RawClusterDefs::keytype, RawCluster *> Map;
typedef Map::iterator Iterator;
typedef Map::const_iterator ConstIterator;
typedef std::pair<Iterator, Iterator> Range;
typedef std::pair<ConstIterator, ConstIterator> ConstRange;
RawClusterContainer() {}
~RawClusterContainer() override {}
void Reset() override;
int isValid() const override;
void identify(std::ostream &os = std::cout) const override;
ConstIterator AddCluster(RawCluster *clus);
RawCluster *getCluster(const RawClusterDefs::keytype id);
const RawCluster *getCluster(const RawClusterDefs::keytype id) const;
//! return all clusters
ConstRange getClusters(void) const;
Range getClusters(void);
const Map &getClustersMap() const { return _clusters; }
Map &getClustersMap() { return _clusters; }
unsigned int size() const { return _clusters.size(); }
double getTotalEdep() const;
protected:
Map _clusters;
ClassDefOverride(RawClusterContainer, 1)
};
#endif