1
2
3
4
5
6
7
8
9 package org.lcsim.cal.calib;
10
11 import java.util.HashMap;
12 import java.util.List;
13 import java.util.Map;
14 import org.lcsim.event.CalorimeterHit;
15
16
17
18
19
20 public class CollectionManager
21 {
22 private Map<String, List<CalorimeterHit>> _listMap = new HashMap<String, List<CalorimeterHit>>();
23 private boolean _debug = false;
24
25 private static CollectionManager _theCollectionManager;
26
27 protected CollectionManager()
28 {
29 }
30
31 public static CollectionManager defaultInstance()
32 {
33 if(_theCollectionManager == null) _theCollectionManager = new CollectionManager();
34 return _theCollectionManager;
35 }
36
37 public void addList(String name, List<CalorimeterHit> hits)
38 {
39 if(_debug) System.out.println("Adding "+name+ " to manager");
40 _listMap.put(name, hits);
41 }
42
43 public List<CalorimeterHit> getList( String name)
44 {
45 return _listMap.get(name);
46 }
47
48 }