Author: [log in to unmask]
Date: Fri Oct 9 11:31:16 2015
New Revision: 3832
Log:
Remove debug print outs from test.
Modified:
java/trunk/detector-model/src/test/java/org/hps/detector/ecal/HPSEcalAPITest.java
Modified: java/trunk/detector-model/src/test/java/org/hps/detector/ecal/HPSEcalAPITest.java
=============================================================================
--- java/trunk/detector-model/src/test/java/org/hps/detector/ecal/HPSEcalAPITest.java (original)
+++ java/trunk/detector-model/src/test/java/org/hps/detector/ecal/HPSEcalAPITest.java Fri Oct 9 11:31:16 2015
@@ -47,60 +47,37 @@
IDetectorElementStore deStore = DetectorElementStore.getInstance();
if (deStore.find(crystal.getIdentifier()).size() == 0) {
throw new RuntimeException("Failed to find crystal ID in store.");
- } else {
- System.out.println("found " + crystal.getIdentifier() + " in store");
- }
+ }
if (deStore.find(id).size() == 0) {
throw new RuntimeException("Failed to find repacked ID in store.");
- } else {
- System.out.println("found repacked ID " + id + " in store");
- }
- System.out.println();
+ }
}
}
public void testNeighborMap() {
- System.out.println();
NeighborMap neighborMap = ecal.getNeighborMap();
for (EcalCrystal crystal : api.getCrystals()) {
- System.out.println("crystal: " + crystal.getName());
- System.out.println("crystal ID: " + crystal.getIdentifier().getValue());
List<EcalCrystal> neighborCrystals = api.getNeighbors(crystal);
- System.out.println("neighbors: " + neighborCrystals.size());
if (neighborCrystals.size() == 0) {
throw new RuntimeException("Crystal has 0 neighbors.");
}
- for (EcalCrystal neighborCrystal : neighborCrystals) {
- System.out.print(neighborCrystal.getIdentifier().getValue() + " ");
- }
- System.out.println();
if (!neighborMap.containsKey(crystal.getIdentifier().getValue())) {
throw new RuntimeException("Neighbor map does not contain ID.");
}
Set<Long> neighborIds = neighborMap.get(crystal.getIdentifier().getValue());
- System.out.println("neighbor IDs: " + neighborIds.size());
for (long id : neighborIds) {
- System.out.print(id + " ");
- }
- System.out.println();
- for (long id : neighborIds) {
- System.out.println("checking neighbor ID: " + id);
boolean foundId = false;
for (EcalCrystal neighborCrystal : neighborCrystals) {
if (neighborCrystal.getIdentifier().getValue() == id) {
foundId = true;
- System.out.println("found match in neighbor crystals");
break;
- } else {
- System.out.println("crystal ID " + neighborCrystal.getIdentifier().getValue() + " does not match " + id);
- }
+ }
}
if (!foundId) {
throw new RuntimeException("Failed to find neighbor ID in map for " + crystal.getName());
}
}
- System.out.println();
}
}
@@ -114,17 +91,13 @@
for (final Integer yIndex : api.getYIndices()) {
if (yIndex == 0) {
- System.out.println("skipping yIndex = 0");
continue;
}
for (final Integer xIndex : api.getXIndices()) {
- System.out.println("checking crystal " + xIndex + ", " + yIndex);
if (xIndex == 0) {
- System.out.println("skipping xIndex = 0");
continue;
}
if ((yIndex == 1 || yIndex == -1) && xIndex <= -2 && xIndex >= -10) {
- System.out.println("crystal " + xIndex + ", " + yIndex + " should be in the gap");
assertTrue("Indices should be in gap: " + xIndex + ", " + yIndex, api.isInBeamGap(xIndex, yIndex));
// Crystal is in the beam gap.
continue;
@@ -136,7 +109,6 @@
for (final Integer yIndex : api.getYIndices()) {
final List<EcalCrystal> row = api.getRow(yIndex);
- System.out.println("found " + row.size() + " crystals in row " + yIndex);
if (Math.abs(yIndex) != 1) {
assertEquals("Wrong number of crystals in row.", 46, row.size());
} else {
@@ -146,7 +118,6 @@
for (final Integer xIndex : api.getXIndices()) {
final List<EcalCrystal> column = api.getColumn(xIndex);
- System.out.println("found " + column.size() + " crystals in column " + xIndex);
if (xIndex > -2 || xIndex < -10) {
assertEquals("Wrong number of crystals in column.", 10, column.size());
} else {
|