1 package org.lcsim.recon.tracking.trflayer;
2 import java.util.*;
3 import org.lcsim.recon.tracking.trfbase.Surface;
4 import org.lcsim.recon.tracking.trfbase.ETrack;
5 import org.lcsim.recon.tracking.trfbase.Cluster;
6
7
8
9
10
11
12
13
14
15
16 public class ClusterFindAll extends ClusterFindManager
17 {
18
19
20
21
22
23
24
25
26
27
28
29 public static String typeName()
30 { return "ClusterFindAll"; }
31
32
33
34
35
36
37
38
39
40 public static String staticType()
41 { return typeName(); }
42
43
44
45
46 private Surface _srf;
47
48
49 private List _clusters;
50
51
52
53
54
55
56
57
58
59
60
61 public ClusterFindAll( Surface srf)
62 {
63 _srf = srf;
64 _clusters = new ArrayList();
65 }
66
67
68
69
70
71
72
73
74
75 public String type()
76 { return staticType(); }
77
78
79
80
81
82
83
84
85
86
87 public int addCluster( Cluster clu)
88 {
89 _clusters.add(clu);
90 return 0;
91 }
92
93
94
95
96
97
98
99 public void dropClusters()
100 {
101 _clusters.clear();
102 }
103
104
105
106
107
108
109
110
111 public Surface surface()
112 { return _srf; }
113
114
115
116
117
118
119
120
121 public List clusters()
122 {
123 return _clusters;
124 }
125
126
127
128
129
130
131
132
133
134
135 public List clusters( ETrack tre)
136 {
137 return _clusters;
138 }
139
140
141
142
143
144
145
146 public String toString()
147 {
148 StringBuffer sb = new StringBuffer(getClass().getName()+" Finder for all clusters. \n Finder surface: " + _srf
149 +"\n");
150 int size = _clusters.size();
151 if ( size == 1 ) sb.append("There is " + size + " cluster");
152 else sb.append("Finder has " + size + " clusters");
153 if ( size == 0 ) sb.append(".");
154 else
155 {
156 sb.append(":");
157 for ( Iterator iclu=_clusters.iterator(); iclu.hasNext(); )
158 sb.append("\n "+iclu.next());
159 }
160 return sb.toString();
161 }
162
163 }