File indexing completed on 2026-08-31 08:21:22
0001
0002
0003 #ifndef TPCTRACKRECO_TPCPOLYCLUSTERCONTAINERV1_H
0004 #define TPCTRACKRECO_TPCPOLYCLUSTERCONTAINERV1_H
0005
0006 #include "Tpc_PolyClusterContainer.h"
0007
0008 #include <iostream>
0009 #include <vector>
0010
0011 class Tpc_PolyCluster;
0012
0013 class Tpc_PolyClusterContainerv1 : public Tpc_PolyClusterContainer
0014 {
0015 public:
0016 Tpc_PolyClusterContainerv1();
0017 ~Tpc_PolyClusterContainerv1() override;
0018
0019 void identify(std::ostream& os = std::cout) const override;
0020 void Reset() override;
0021 int isValid() const override;
0022 PHObject* CloneMe() const override;
0023
0024 unsigned int size() const override { return static_cast<unsigned int>(m_clusters.size()); }
0025 void add_cluster(Tpc_PolyCluster* cluster) override { m_clusters.push_back(cluster); }
0026 const Tpc_PolyCluster* get_cluster(unsigned int i) const override
0027 {
0028 if (i >= m_clusters.size()) return nullptr;
0029 return m_clusters[i];
0030 }
0031 Tpc_PolyCluster* get_cluster(unsigned int i) override
0032 {
0033 if (i >= m_clusters.size()) return nullptr;
0034 return m_clusters[i];
0035 }
0036
0037 private:
0038 std::vector<Tpc_PolyCluster*> m_clusters;
0039
0040 ClassDefOverride(Tpc_PolyClusterContainerv1, 1)
0041 };
0042 #endif