6 added + 3 removed + 28 modified, total 37 files
lcsim/src/org/lcsim/contrib/onoprien/vsegment
diff -u -r1.3 -r1.4
--- ExampleDriverSiD01.java 4 Nov 2008 02:18:03 -0000 1.3
+++ ExampleDriverSiD01.java 5 Nov 2008 03:32:47 -0000 1.4
@@ -23,7 +23,7 @@
import org.lcsim.contrib.onoprien.vsegment.process.Digitizer;
import org.lcsim.contrib.onoprien.vsegment.process.SensorFilter;
import org.lcsim.contrib.onoprien.vsegment.process.HitMaker;
-import org.lcsim.contrib.onoprien.vsegment.process.VSDriver;
+import org.lcsim.contrib.onoprien.util.Driver;
import org.lcsim.contrib.onoprien.vsegment.diagnostics.HitPlotter;
@@ -31,9 +31,9 @@
*
*
* @author D. Onoprienko
- * @version $Id: ExampleDriverSiD01.java,v 1.3 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: ExampleDriverSiD01.java,v 1.4 2008/11/05 03:32:47 onoprien Exp $
*/
-public class ExampleDriverSiD01 extends VSDriver {
+public class ExampleDriverSiD01 extends Driver {
public ExampleDriverSiD01() {
lcsim/src/org/lcsim/contrib/onoprien/vsegment
diff -u -r1.2 -r1.3
--- ExampleDriverSiD02.java 4 Nov 2008 02:18:03 -0000 1.2
+++ ExampleDriverSiD02.java 5 Nov 2008 03:32:47 -0000 1.3
@@ -23,7 +23,7 @@
import org.lcsim.contrib.onoprien.vsegment.process.Digitizer;
import org.lcsim.contrib.onoprien.vsegment.process.SensorFilter;
import org.lcsim.contrib.onoprien.vsegment.process.HitMaker;
-import org.lcsim.contrib.onoprien.vsegment.process.VSDriver;
+import org.lcsim.contrib.onoprien.util.Driver;
import org.lcsim.contrib.onoprien.vsegment.diagnostics.HitPlotter;
@@ -31,9 +31,9 @@
*
*
* @author D. Onoprienko
- * @version $Id: ExampleDriverSiD02.java,v 1.2 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: ExampleDriverSiD02.java,v 1.3 2008/11/05 03:32:47 onoprien Exp $
*/
-public class ExampleDriverSiD02 extends VSDriver {
+public class ExampleDriverSiD02 extends Driver {
public ExampleDriverSiD02() {
lcsim/src/org/lcsim/contrib/onoprien/vsegment
diff -u -r1.1 -r1.2
--- ExampleTrackingDriver.java 24 Oct 2008 04:09:13 -0000 1.1
+++ ExampleTrackingDriver.java 5 Nov 2008 03:32:47 -0000 1.2
@@ -8,15 +8,15 @@
import org.lcsim.recon.tracking.seedtracker.StrategyXMLUtils;
import org.lcsim.contrib.onoprien.vsegment.process.HelicalTrackHitConverter;
-import org.lcsim.contrib.onoprien.vsegment.process.VSDriver;
+import org.lcsim.contrib.onoprien.util.Driver;
/**
*
*
* @author D. Onoprienko
- * @version $Id: ExampleTrackingDriver.java,v 1.1 2008/10/24 04:09:13 onoprien Exp $
+ * @version $Id: ExampleTrackingDriver.java,v 1.2 2008/11/05 03:32:47 onoprien Exp $
*/
-public class ExampleTrackingDriver extends VSDriver {
+public class ExampleTrackingDriver extends Driver {
// -- Constructors : ----------------------------------------------------------
lcsim/src/org/lcsim/contrib/onoprien/vsegment/algorithm
diff -u -r1.2 -r1.3
--- ChargeCollectorDemo.java 15 Sep 2008 15:44:02 -0000 1.2
+++ ChargeCollectorDemo.java 5 Nov 2008 03:32:47 -0000 1.3
@@ -7,11 +7,11 @@
import org.lcsim.recon.cat.util.NoSuchParameterException;
import org.lcsim.contrib.onoprien.vsegment.process.ChargeCollector;
-import org.lcsim.contrib.onoprien.vsegment.process.VSDriver;
+import org.lcsim.contrib.onoprien.util.Driver;
import org.lcsim.contrib.onoprien.vsegment.hit.VSRawTrackerData;
import org.lcsim.contrib.onoprien.vsegment.geom.SegmentationManager;
import org.lcsim.contrib.onoprien.vsegment.geom.Sensor;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
/**
@@ -22,7 +22,7 @@
*
*
* @author D.Onoprienko
- * @version $Id: ChargeCollectorDemo.java,v 1.2 2008/09/15 15:44:02 onoprien Exp $
+ * @version $Id: ChargeCollectorDemo.java,v 1.3 2008/11/05 03:32:47 onoprien Exp $
*/
public class ChargeCollectorDemo implements ChargeCollector {
@@ -65,7 +65,7 @@
} else if (mode.equalsIgnoreCase("ENERGY")) {
_signalMode = SignalMode.ENERGY;
} else {
- throw new IllegalArgumentException(VSDriver.ERR_IV + name);
+ throw new IllegalArgumentException(Driver.ERR_IV + name);
}
} else if (name.equalsIgnoreCase("THRESHOLD")) {
_threshold = ((Double)value).doubleValue();
@@ -73,7 +73,7 @@
throw new NoSuchParameterException(name, this.getClass());
}
} catch (ClassCastException x) {
- throw new IllegalArgumentException(VSDriver.ERR_VIT + name, x);
+ throw new IllegalArgumentException(Driver.ERR_VIT + name, x);
}
}
lcsim/src/org/lcsim/contrib/onoprien/vsegment/algorithm
diff -u -r1.1 -r1.2
--- HitMakerBasic.java 15 Sep 2008 15:44:02 -0000 1.1
+++ HitMakerBasic.java 5 Nov 2008 03:32:47 -0000 1.2
@@ -12,7 +12,7 @@
import org.lcsim.contrib.onoprien.vsegment.hit.VSTrackerHit;
import org.lcsim.contrib.onoprien.vsegment.hit.VSTrackerHitGeneric;
import org.lcsim.contrib.onoprien.vsegment.hit.VSTrackerPulse;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
/**
@@ -25,7 +25,7 @@
* in the org.lcsim.contrib.onoprien.vsegment.geom.sensortype package.</i>
*
* @author D. Onoprienko
- * @version $Id: HitMakerBasic.java,v 1.1 2008/09/15 15:44:02 onoprien Exp $
+ * @version $Id: HitMakerBasic.java,v 1.2 2008/11/05 03:32:47 onoprien Exp $
*/
public class HitMakerBasic extends HitMakerAbstract {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/algorithm
diff -u -r1.3 -r1.4
--- HitMakerSmear.java 4 Nov 2008 02:18:03 -0000 1.3
+++ HitMakerSmear.java 5 Nov 2008 03:32:47 -0000 1.4
@@ -16,7 +16,7 @@
import org.lcsim.contrib.onoprien.vsegment.mctruth.MCTruthDriverVS;
import org.lcsim.contrib.onoprien.vsegment.process.VSEvent;
import org.lcsim.contrib.onoprien.vsegment.process.VSEventListener;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
/**
@@ -34,7 +34,7 @@
* fixed direction is always zero.
*
* @author D. Onoprienko
- * @version $Id: HitMakerSmear.java,v 1.3 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: HitMakerSmear.java,v 1.4 2008/11/05 03:32:47 onoprien Exp $
*/
public class HitMakerSmear extends HitMakerAbstract implements VSEventListener {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/diagnostics
diff -u -r1.1 -r1.2
--- HitPlotter.java 21 Oct 2008 00:53:47 -0000 1.1
+++ HitPlotter.java 5 Nov 2008 03:32:47 -0000 1.2
@@ -20,17 +20,17 @@
import org.lcsim.contrib.onoprien.vsegment.hit.VSChannelID;
import org.lcsim.contrib.onoprien.vsegment.hit.VSRawTrackerData;
import org.lcsim.contrib.onoprien.vsegment.hit.VSTrackerHit;
-import org.lcsim.contrib.onoprien.vsegment.process.VSDriver;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.Driver;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
/**
*
*
* @author D. Onoprienko
- * @version $Id: HitPlotter.java,v 1.1 2008/10/21 00:53:47 onoprien Exp $
+ * @version $Id: HitPlotter.java,v 1.2 2008/11/05 03:32:47 onoprien Exp $
*/
-public class HitPlotter extends VSDriver {
+public class HitPlotter extends Driver {
// -- Constructors : ----------------------------------------------------------
lcsim/src/org/lcsim/contrib/onoprien/vsegment/geom/segmenter
diff -u -r1.5 -r1.6
--- DiskToWedgesSegmenter.java 21 Oct 2008 00:53:50 -0000 1.5
+++ DiskToWedgesSegmenter.java 5 Nov 2008 03:32:47 -0000 1.6
@@ -17,14 +17,14 @@
import org.lcsim.contrib.onoprien.vsegment.geom.Sensor;
import org.lcsim.contrib.onoprien.vsegment.geom.SensorType;
import org.lcsim.contrib.onoprien.vsegment.geom.sensortype.WedgeSideParallel;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.RefFrameCartesian;
/**
* Simplistic <tt>Segmenter</tt> that tiles a single disk with wedges.
*
* @author D. Onoprienko
- * @version $Id: DiskToWedgesSegmenter.java,v 1.5 2008/10/21 00:53:50 onoprien Exp $
+ * @version $Id: DiskToWedgesSegmenter.java,v 1.6 2008/11/05 03:32:47 onoprien Exp $
*/
public class DiskToWedgesSegmenter extends RegionSegmenter {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/geom/segmenter
diff -u -r1.3 -r1.4
--- DiskTrackerToRingsSegmenter.java 21 Oct 2008 00:53:50 -0000 1.3
+++ DiskTrackerToRingsSegmenter.java 5 Nov 2008 03:32:47 -0000 1.4
@@ -23,7 +23,7 @@
import org.lcsim.contrib.onoprien.vsegment.geom.Sensor;
import org.lcsim.contrib.onoprien.vsegment.geom.SensorType;
import org.lcsim.contrib.onoprien.vsegment.geom.sensortype.Ring;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
import org.lcsim.contrib.onoprien.vsegment.transform.RefFrameCartesian;
@@ -37,7 +37,7 @@
* {@link #setStereoAngle(double angle)}.
*
* @author D.Onoprienko
- * @version $Id: DiskTrackerToRingsSegmenter.java,v 1.3 2008/10/21 00:53:50 onoprien Exp $
+ * @version $Id: DiskTrackerToRingsSegmenter.java,v 1.4 2008/11/05 03:32:47 onoprien Exp $
*/
public class DiskTrackerToRingsSegmenter extends RegionSegmenter {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/geom/sensortype
diff -u -r1.5 -r1.6
--- Cylinder.java 30 Sep 2008 04:41:51 -0000 1.5
+++ Cylinder.java 5 Nov 2008 03:32:47 -0000 1.6
@@ -8,7 +8,7 @@
import org.lcsim.contrib.onoprien.vsegment.geom.SensorType;
import org.lcsim.contrib.onoprien.vsegment.hit.ITrackerHit;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
import org.lcsim.contrib.onoprien.vsegment.transform.RefFrameCylinder;
import org.lcsim.contrib.onoprien.vsegment.transform.RefFrameLocalOnCylinder;
@@ -21,7 +21,7 @@
*
*
* @author D.Onoprienko
- * @version $Id: Cylinder.java,v 1.5 2008/09/30 04:41:51 onoprien Exp $
+ * @version $Id: Cylinder.java,v 1.6 2008/11/05 03:32:47 onoprien Exp $
*/
public class Cylinder extends Rectangle {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/geom/sensortype
diff -u -r1.3 -r1.4
--- Hexagon.java 3 Oct 2008 04:17:12 -0000 1.3
+++ Hexagon.java 5 Nov 2008 03:32:47 -0000 1.4
@@ -7,7 +7,7 @@
import org.lcsim.contrib.onoprien.vsegment.geom.SensorType;
import org.lcsim.contrib.onoprien.vsegment.hit.ITrackerHit;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
/**
@@ -19,7 +19,7 @@
* have zero dimension in W direction.
*
* @author D.Onoprienko
- * @version $Id: Hexagon.java,v 1.3 2008/10/03 04:17:12 onoprien Exp $
+ * @version $Id: Hexagon.java,v 1.4 2008/11/05 03:32:47 onoprien Exp $
*/
public class Hexagon implements SensorType {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/geom/sensortype
diff -u -r1.4 -r1.5
--- Rectangle.java 3 Oct 2008 04:17:12 -0000 1.4
+++ Rectangle.java 5 Nov 2008 03:32:47 -0000 1.5
@@ -7,7 +7,7 @@
import org.lcsim.contrib.onoprien.vsegment.geom.SensorType;
import org.lcsim.contrib.onoprien.vsegment.hit.ITrackerHit;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
/**
@@ -18,7 +18,7 @@
* have zero dimension in W direction.
*
* @author D.Onoprienko
- * @version $Id: Rectangle.java,v 1.4 2008/10/03 04:17:12 onoprien Exp $
+ * @version $Id: Rectangle.java,v 1.5 2008/11/05 03:32:47 onoprien Exp $
*/
public class Rectangle implements SensorType {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/geom/sensortype
diff -u -r1.3 -r1.4
--- Ring.java 3 Oct 2008 04:17:12 -0000 1.3
+++ Ring.java 5 Nov 2008 03:32:47 -0000 1.4
@@ -5,7 +5,7 @@
import hep.physics.vec.BasicHep3Vector;
import hep.physics.vec.Hep3Vector;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
/**
* Class to represent a disk sensor divided into rectangular strips or pixels.
@@ -19,7 +19,7 @@
* center of the channel (strip or pixel) to which the point belongs is ouside the ring.
*
* @author D.Onoprienko
- * @version $Id: Ring.java,v 1.3 2008/10/03 04:17:12 onoprien Exp $
+ * @version $Id: Ring.java,v 1.4 2008/11/05 03:32:47 onoprien Exp $
*/
public class Ring extends Rectangle {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/geom/sensortype
diff -u -r1.3 -r1.4
--- WedgeSideParallel.java 3 Oct 2008 04:17:12 -0000 1.3
+++ WedgeSideParallel.java 5 Nov 2008 03:32:47 -0000 1.4
@@ -7,7 +7,7 @@
import org.lcsim.contrib.onoprien.vsegment.geom.SensorType;
import org.lcsim.contrib.onoprien.vsegment.hit.ITrackerHit;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
/**
@@ -18,7 +18,7 @@
* have zero dimension in W direction.
*
* @author D.Onoprienko
- * @version $Id: WedgeSideParallel.java,v 1.3 2008/10/03 04:17:12 onoprien Exp $
+ * @version $Id: WedgeSideParallel.java,v 1.4 2008/11/05 03:32:47 onoprien Exp $
*/
public class WedgeSideParallel implements SensorType {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/hit
diff -u -r1.2 -r1.3
--- VSTrackerHit.java 15 Sep 2008 15:44:02 -0000 1.2
+++ VSTrackerHit.java 5 Nov 2008 03:32:47 -0000 1.3
@@ -10,14 +10,14 @@
import org.lcsim.detector.identifier.IIdentifierHelper;
import org.lcsim.contrib.onoprien.vsegment.geom.Sensor;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
/**
* Base class for all virtual segmentation specific implementations of {@link ITrackerHit} interface.
*
* @author D. Onoprienko
- * @version $Id: VSTrackerHit.java,v 1.2 2008/09/15 15:44:02 onoprien Exp $
+ * @version $Id: VSTrackerHit.java,v 1.3 2008/11/05 03:32:47 onoprien Exp $
*/
abstract public class VSTrackerHit implements ITrackerHit {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/hit
diff -u -r1.1 -r1.2
--- VSTrackerHitGeneric.java 15 Sep 2008 15:44:02 -0000 1.1
+++ VSTrackerHitGeneric.java 5 Nov 2008 03:32:47 -0000 1.2
@@ -6,8 +6,8 @@
import hep.physics.vec.Hep3Vector;
import org.lcsim.contrib.onoprien.vsegment.geom.Sensor;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstSymmetricMatrix;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstSymmetricMatrix;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
/**
@@ -17,7 +17,7 @@
* to improve performance.
*
* @author D. Onoprienko
- * @version $Id: VSTrackerHitGeneric.java,v 1.1 2008/09/15 15:44:02 onoprien Exp $
+ * @version $Id: VSTrackerHitGeneric.java,v 1.2 2008/11/05 03:32:47 onoprien Exp $
*/
public class VSTrackerHitGeneric extends VSTrackerHit {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/mctruth
diff -u -r1.1 -r1.2
--- MCTruthDriverVS.java 4 Nov 2008 02:18:03 -0000 1.1
+++ MCTruthDriverVS.java 5 Nov 2008 03:32:47 -0000 1.2
@@ -3,11 +3,11 @@
import java.util.*;
import org.lcsim.event.EventHeader;
-import org.lcsim.recon.cat.util.NoSuchParameterException;
-import org.lcsim.util.Driver;
+
+import org.lcsim.contrib.onoprien.util.Driver;
+import org.lcsim.contrib.onoprien.util.NoSuchParameterException;
import org.lcsim.contrib.onoprien.vsegment.geom.Sensor;
-import org.lcsim.contrib.onoprien.vsegment.process.VSDriver;
/**
* If this driver is added to the processing chain, an {@link MCTruthVS} object will
@@ -21,9 +21,9 @@
*
*
* @author D. Onoprienko
- * @version $Id: MCTruthDriverVS.java,v 1.1 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: MCTruthDriverVS.java,v 1.2 2008/11/05 03:32:47 onoprien Exp $
*/
-public class MCTruthDriverVS extends VSDriver {
+public class MCTruthDriverVS extends Driver {
// -- Constructors : ----------------------------------------------------------
lcsim/src/org/lcsim/contrib/onoprien/vsegment/process
diff -u -r1.3 -r1.4
--- CalibrationDriver.java 4 Nov 2008 02:18:03 -0000 1.3
+++ CalibrationDriver.java 5 Nov 2008 03:32:47 -0000 1.4
@@ -2,6 +2,7 @@
import java.util.*;
import static java.util.logging.Level.*;
+import org.lcsim.contrib.onoprien.util.Driver;
import org.lcsim.event.EventHeader;
import org.lcsim.recon.cat.util.NoSuchParameterException;
@@ -17,9 +18,9 @@
*
*
* @author D. Onoprienko
- * @version $Id: CalibrationDriver.java,v 1.3 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: CalibrationDriver.java,v 1.4 2008/11/05 03:32:47 onoprien Exp $
*/
-public class CalibrationDriver extends VSDriver implements VSEventListener {
+public class CalibrationDriver extends Driver implements VSEventListener {
// -- Constructors and initialization : ---------------------------------------
lcsim/src/org/lcsim/contrib/onoprien/vsegment/process
diff -u -r1.6 -r1.7
--- ChargeCollectionDriver.java 4 Nov 2008 02:18:03 -0000 1.6
+++ ChargeCollectionDriver.java 5 Nov 2008 03:32:47 -0000 1.7
@@ -2,6 +2,7 @@
import java.util.*;
import static java.util.logging.Level.*;
+import org.lcsim.contrib.onoprien.util.Driver;
import org.lcsim.detector.DetectorElementStore;
import org.lcsim.detector.IDetectorElementContainer;
@@ -29,9 +30,9 @@
*
*
* @author D.Onoprienko
- * @version $Id: ChargeCollectionDriver.java,v 1.6 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: ChargeCollectionDriver.java,v 1.7 2008/11/05 03:32:47 onoprien Exp $
*/
-public class ChargeCollectionDriver extends VSDriver implements VSEventListener {
+public class ChargeCollectionDriver extends Driver implements VSEventListener {
// -- Constructors and initialization : ---------------------------------------
lcsim/src/org/lcsim/contrib/onoprien/vsegment/process
diff -u -r1.5 -r1.6
--- ClusteringDriver.java 4 Nov 2008 02:18:03 -0000 1.5
+++ ClusteringDriver.java 5 Nov 2008 03:32:47 -0000 1.6
@@ -2,6 +2,7 @@
import java.util.*;
import static java.util.logging.Level.*;
+import org.lcsim.contrib.onoprien.util.Driver;
import org.lcsim.event.EventHeader;
import org.lcsim.recon.cat.util.NoSuchParameterException;
@@ -17,9 +18,9 @@
* Driver that handles clustering of tracker pulses.
*
* @author D. Onoprienko
- * @version $Id: ClusteringDriver.java,v 1.5 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: ClusteringDriver.java,v 1.6 2008/11/05 03:32:47 onoprien Exp $
*/
-public class ClusteringDriver extends VSDriver implements VSEventListener {
+public class ClusteringDriver extends Driver implements VSEventListener {
// -- Constructors and initialization : ---------------------------------------
lcsim/src/org/lcsim/contrib/onoprien/vsegment/process
diff -u -r1.4 -r1.5
--- DigitizationDriver.java 4 Nov 2008 02:18:03 -0000 1.4
+++ DigitizationDriver.java 5 Nov 2008 03:32:47 -0000 1.5
@@ -2,6 +2,7 @@
import java.util.*;
import static java.util.logging.Level.*;
+import org.lcsim.contrib.onoprien.util.Driver;
import org.lcsim.event.EventHeader;
import org.lcsim.recon.cat.util.NoSuchParameterException;
@@ -17,9 +18,9 @@
*
*
* @author D. Onoprienko
- * @version $Id: DigitizationDriver.java,v 1.4 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: DigitizationDriver.java,v 1.5 2008/11/05 03:32:47 onoprien Exp $
*/
-public class DigitizationDriver extends VSDriver implements VSEventListener {
+public class DigitizationDriver extends Driver implements VSEventListener {
// -- Constructors and initialization : ---------------------------------------
lcsim/src/org/lcsim/contrib/onoprien/vsegment/process
diff -u -r1.2 -r1.3
--- HelicalTrackHitConverter.java 4 Nov 2008 02:18:03 -0000 1.2
+++ HelicalTrackHitConverter.java 5 Nov 2008 03:32:47 -0000 1.3
@@ -6,6 +6,7 @@
import hep.physics.vec.BasicHep3Vector;
import hep.physics.vec.Hep3Vector;
import hep.physics.vec.VecOp;
+import org.lcsim.contrib.onoprien.util.Driver;
import org.lcsim.detector.DetectorElementStore;
import org.lcsim.detector.IDetectorElement;
import org.lcsim.detector.IDetectorElementContainer;
@@ -36,7 +37,7 @@
import org.lcsim.contrib.onoprien.vsegment.hit.TrackerHitMap;
import org.lcsim.contrib.onoprien.vsegment.hit.VSTrackerHit;
import org.lcsim.contrib.onoprien.vsegment.mctruth.MCTruthVS;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
/**
@@ -44,9 +45,9 @@
* required by <tt>seedtracker</tt> package.
*
* @author D. Onoprienko
- * @version $Id: HelicalTrackHitConverter.java,v 1.2 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: HelicalTrackHitConverter.java,v 1.3 2008/11/05 03:32:47 onoprien Exp $
*/
-public class HelicalTrackHitConverter extends VSDriver {
+public class HelicalTrackHitConverter extends Driver {
// -- Constructor : -----------------------------------------------------------
lcsim/src/org/lcsim/contrib/onoprien/vsegment/process
diff -u -r1.4 -r1.5
--- NoiseGenerationDriver.java 4 Nov 2008 02:18:03 -0000 1.4
+++ NoiseGenerationDriver.java 5 Nov 2008 03:32:47 -0000 1.5
@@ -2,6 +2,7 @@
import java.util.*;
import static java.util.logging.Level.*;
+import org.lcsim.contrib.onoprien.util.Driver;
import org.lcsim.event.EventHeader;
import org.lcsim.recon.cat.util.NoSuchParameterException;
@@ -17,9 +18,9 @@
*
*
* @author D. Onoprienko
- * @version $Id: NoiseGenerationDriver.java,v 1.4 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: NoiseGenerationDriver.java,v 1.5 2008/11/05 03:32:47 onoprien Exp $
*/
-public class NoiseGenerationDriver extends VSDriver implements VSEventListener {
+public class NoiseGenerationDriver extends Driver implements VSEventListener {
// -- Constructors and initialization : ---------------------------------------
lcsim/src/org/lcsim/contrib/onoprien/vsegment/process
diff -u -r1.4 -r1.5
--- ReadoutSimulationDriver.java 4 Nov 2008 02:18:03 -0000 1.4
+++ ReadoutSimulationDriver.java 5 Nov 2008 03:32:47 -0000 1.5
@@ -2,6 +2,7 @@
import java.util.*;
import static java.util.logging.Level.*;
+import org.lcsim.contrib.onoprien.util.Driver;
import org.lcsim.event.EventHeader;
import org.lcsim.event.SimTrackerHit;
@@ -20,9 +21,9 @@
*
*
* @author D.Onoprienko
- * @version $Id: ReadoutSimulationDriver.java,v 1.4 2008/11/04 02:18:03 onoprien Exp $
+ * @version $Id: ReadoutSimulationDriver.java,v 1.5 2008/11/05 03:32:47 onoprien Exp $
*/
-public class ReadoutSimulationDriver extends VSDriver {
+public class ReadoutSimulationDriver extends Driver {
// -- Constructors : ----------------------------------------------------------
lcsim/src/org/lcsim/contrib/onoprien/vsegment/process
diff -N VSDriver.java
--- VSDriver.java 2 Sep 2008 19:29:44 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,175 +0,0 @@
-package org.lcsim.contrib.onoprien.vsegment.process;
-
-import java.util.logging.Level;
-
-import org.lcsim.event.EventHeader;
-import org.lcsim.util.Driver;
-
-import org.lcsim.contrib.onoprien.crux.util.NoSuchParameterException;
-
-/**
- * Base class for drivers of the virtual segmentation and tracker hit processing package.
- * <p>
- * Logging facility included in this class simply prints messages to standard output
- * when the {@link #log log(String, Level)} method is called with the level greater
- * or equal to the logging level set for this driver.
- * <p>
- * Typically, logging levels are set according to the following guidelines:
- * <dl>
- * <dt>SEVERE</dt><dd>Error messages.</dd>
- * <dt>WARNING</dt><dd>Messages about suspected errors.</dd>
- * <dt>INFO (default)</dt><dd>Very little output - things the user would like to see
- * when running interactively but not debugging or testing.</dd>
- * <dt>CONFIG</dt><dd>In addition, print out configuration information.</dd>
- * <dt>FINE</dt><dd>Print most important statistics for each major step in event processing.</dd>
- * <dt>FINER</dt><dd>Output for debugging</dd>
- * <dt>FINEST</dt><dd>Detailed diagnostic output - something only the developer would
- * like to see, and only when debugging a particular class or method.</dd>
- * </dl>
- *
- * @author D. Onoprienko
- * @version $Id: VSDriver.java,v 1.1 2008/09/02 19:29:44 onoprien Exp $
- */
-public class VSDriver extends Driver {
-
-// -- Constructors : ----------------------------------------------------------
-
- public VSDriver() {
- }
-
-// -- Setters : ---------------------------------------------------------------
-
- /**
- * Set any parameter.
- * The following parameters can be set with this method:
- * <p><dl>
- * <dt>"LOG_LEVEL"</dt> <dd>Logging level. See {@link Level} for possible values.
- * <br>Default: INFO.</dd>
- * <dt>"LOG_DEFAULT_LEVEL"</dt> <dd>Default logging level. Calling {@link #log(String)}
- * will log at this level. This is intended to be set only in the driver's
- * own constructor - if a particular driver logs many messages at a particular level,
- * the code can be made more concise by making it the default level.
- * <br>Default: INFO.</dd>
- * <dt>"LOG_LEVEL_GLOBAL"</dt> <dd>Logging level for this driver and all its known sub-drivers.
- * <br>Default: INFO.</dd>
- * <dt>"LOG_PREFIX"</dt> <dd>Logging prefix.
- * <br>Default: <tt>null</tt> (driver name will be used as a prefix).</dd></dl>
- *
- * @param name Name of parameter to be set. Case is ignored.
- * @param values List of values to be used for setting the parameter.
- * @throws NoSuchParameterException Thrown if the supplied parameter name is unknown.
- * @throws IllegalArgumentException Thrown if incorrect nunber of values, or a value
- * of incorrect type is supplied.
- */
- public void set(String name, Object... values) {
- Object value = values.length == 0 ? null : values[0];
- try {
- if (name.equalsIgnoreCase("LOG_LEVEL")) {
- try {
- _logLevel = ((Level)value).intValue();
- } catch (ClassCastException xx) {
- try {
- _logLevel = Level.parse((String)value).intValue();
- } catch (IllegalArgumentException xxx) {
- throw new IllegalArgumentException("Unknown logging level: "+(String)value);
- }
- }
- } else if (name.equalsIgnoreCase("LOG_DEFAULT_LEVEL")) {
- try {
- _defLevel = ((Level)value);
- } catch (ClassCastException xx) {
- try {
- _defLevel = Level.parse((String)value);
- } catch (IllegalArgumentException xxx) {
- throw new IllegalArgumentException("Unknown logging level: "+(String)value);
- }
- }
- } else if (name.equalsIgnoreCase("LOG_LEVEL_GLOBAL")) {
- try {
- _logLevel = ((Level)value).intValue();
- } catch (ClassCastException xx) {
- try {
- _logLevel = Level.parse((String)value).intValue();
- } catch (IllegalArgumentException xxx) {
- throw new IllegalArgumentException("Unknown logging level: "+(String)value);
- }
- }
- for (Driver daughter : drivers()) {
- try {
- ((VSDriver)daughter).set(name, value);
- } catch (ClassCastException xx) {}
- }
- } else if (name.equalsIgnoreCase("LOG_PREFIX")) {
- if (value == null) {
- _logPrefix = getName() + " : ";
- } else {
- _logPrefix = (String) value;
- if (_logPrefix.length() == 0) _logPrefix = null;
- }
- } else {
- throw new NoSuchParameterException(name, this.getClass());
- }
- } catch (ClassCastException x) {
- throw new IllegalArgumentException(ERR_VIT, x);
- }
- }
-
-// -- Logging : ---------------------------------------------------------------
-
- /** Log a message at the given level. */
- public void log(String message, Level level) {
- if (level.intValue() >= _logLevel) {
- if (_logPrefix != null) message = _logPrefix + message;
- System.out.println(message);
- }
- }
-
- /**
- * Log a message at the level set by a call to <tt>set("LOG_DEFAULT_LEVEL", level)</tt>.
- */
- public void log(String message) {
- log(message, _defLevel);
- }
-
- /**
- * Returns <tt>true</tt> if messages at the given level are being printed out.
- * That is, when the current logging level set for this driver is at or below
- * the given <tt>Level</tt>.
- */
- public boolean isLogging(Level level) {
- return level.intValue() >= _logLevel;
- }
-
- /**
- * Add a driver that will log the message at the given level.
- */
- public void addLog(final String message, final Level level) {
- add(new VSDriver() {
- public void process(EventHeader event) {
- VSDriver.this.log(message, level);
- }
- });
- }
-
- /**
- * Add a driver that will log the message at the level set by a call to <tt>set("LOG_DEFAULT_LEVEL", level)</tt>.
- */
- public void addLog(String message) {
- addLog(message, _defLevel);
- }
-
-
-
-// -- Private parts : ---------------------------------------------------------
-
- /** Setter error message: "Value of incompatible type " */
- static public final String ERR_VIT = "Value of incompatible type ";
- /** Setter error message: "Illegal number of values for name " */
- static public final String ERR_INV = "Illegal number of values for name ";
- /** Setter error message: "Illegal value for name " */
- static public final String ERR_IV = "Illegal value for name ";
-
- private int _logLevel = Level.INFO.intValue();
- private Level _defLevel = Level.INFO;
- private String _logPrefix = getName() + " : ";
-}
lcsim/src/org/lcsim/contrib/onoprien/vsegment/transform
diff -u -r1.5 -r1.6
--- IRefFrame.java 21 Oct 2008 00:53:47 -0000 1.5
+++ IRefFrame.java 5 Nov 2008 03:32:47 -0000 1.6
@@ -2,13 +2,14 @@
import hep.physics.matrix.SymmetricMatrix;
import hep.physics.vec.Hep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.detector.ITransform3D;
/**
* Interface to represent a reference frame.
*
* @author D. Onoprienko
- * @version $Id: IRefFrame.java,v 1.5 2008/10/21 00:53:47 onoprien Exp $
+ * @version $Id: IRefFrame.java,v 1.6 2008/11/05 03:32:47 onoprien Exp $
*/
public interface IRefFrame {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/transform
diff -u -r1.1 -r1.2
--- RefFrameAbstract.java 21 Oct 2008 00:53:47 -0000 1.1
+++ RefFrameAbstract.java 5 Nov 2008 03:32:47 -0000 1.2
@@ -2,13 +2,14 @@
import hep.physics.matrix.SymmetricMatrix;
import hep.physics.vec.Hep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
/**
* Abstract class that provides a skeletal implementation of the {@link IRefFrame} interface
* to minimize the effort required to implement this interface.
*
* @author D. Onoprienko
- * @version $Id: RefFrameAbstract.java,v 1.1 2008/10/21 00:53:47 onoprien Exp $
+ * @version $Id: RefFrameAbstract.java,v 1.2 2008/11/05 03:32:47 onoprien Exp $
*/
abstract public class RefFrameAbstract implements IRefFrame {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/transform
diff -u -r1.4 -r1.5
--- RefFrameCartesian.java 21 Oct 2008 00:53:47 -0000 1.4
+++ RefFrameCartesian.java 5 Nov 2008 03:32:47 -0000 1.5
@@ -2,6 +2,7 @@
import hep.physics.matrix.SymmetricMatrix;
import hep.physics.vec.Hep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
import org.lcsim.detector.IRotation3D;
import org.lcsim.detector.ITransform3D;
import org.lcsim.detector.Transform3D;
@@ -11,7 +12,7 @@
* Cartesian reference frame.
*
* @author D. Onoprienko
- * @version $Id: RefFrameCartesian.java,v 1.4 2008/10/21 00:53:47 onoprien Exp $
+ * @version $Id: RefFrameCartesian.java,v 1.5 2008/11/05 03:32:47 onoprien Exp $
*/
public class RefFrameCartesian extends RefFrameCartesianAbstract {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/transform
diff -u -r1.3 -r1.4
--- RefFrameLocalOnCylinder.java 21 Oct 2008 00:53:47 -0000 1.3
+++ RefFrameLocalOnCylinder.java 5 Nov 2008 03:32:47 -0000 1.4
@@ -3,12 +3,13 @@
import hep.physics.matrix.SymmetricMatrix;
import hep.physics.vec.BasicHep3Vector;
import hep.physics.vec.Hep3Vector;
+import org.lcsim.contrib.onoprien.util.ConstHep3Vector;
/**
*
*
* @author D. Onoprienko
- * @version $Id: RefFrameLocalOnCylinder.java,v 1.3 2008/10/21 00:53:47 onoprien Exp $
+ * @version $Id: RefFrameLocalOnCylinder.java,v 1.4 2008/11/05 03:32:47 onoprien Exp $
*/
public class RefFrameLocalOnCylinder extends RefFrameCartesianAbstract {
lcsim/src/org/lcsim/contrib/onoprien/vsegment/transform
diff -N ConstHep3Vector.java
--- ConstHep3Vector.java 2 Sep 2008 19:29:44 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,111 +0,0 @@
-package org.lcsim.contrib.onoprien.vsegment.transform;
-
-import java.io.Serializable;
-
-import hep.physics.vec.Hep3Vector;
-import hep.physics.vec.VecOp;
-
-/**
- * Immutable implementation of <tt>Hep3Vector</tt>.
- * <p>
- * Coordinates supplied to constructors are interpreted as cartesian.
- * The class is identical to <tt>hep.physics.vec.BasicHep3Vector</t> except:
- * <ul><li>No <tt>set</tt> method, making it immutable
- * <li>Constructor that takes <tt>Hep3Vector</tt>
- * <li>No input array length check in constructors.</ul>
- *
- * @author D. Onoprienko
- * @version $Id: ConstHep3Vector.java,v 1.1 2008/09/02 19:29:44 onoprien Exp $
- */
-final public class ConstHep3Vector implements Hep3Vector, Serializable {
-
-// -- Constant vectors : ------------------------------------------------------
-
- /** Constant vector (0.,0.,0.) */
- static public final ConstHep3Vector V000 = new ConstHep3Vector(0.,0.,0.);
-
- /** Constant vector (1.,0.,0.) */
- static public final ConstHep3Vector V100 = new ConstHep3Vector(1.,0.,0.);
-
- /** Constant vector (0.,1.,0.) */
- static public final ConstHep3Vector V010 = new ConstHep3Vector(0.,1.,0.);
-
- /** Constant vector (0.,0.,1.) */
- static public final ConstHep3Vector V001 = new ConstHep3Vector(0.,0.,1.);
-
-// -- Constructors : ----------------------------------------------------------
-
- public ConstHep3Vector() {
- _x = 0.;
- _y = 0.;
- _z = 0.;
- }
-
- public ConstHep3Vector(double x, double y, double z) {
- _x = x;
- _y = y;
- _z = z;
- }
-
- public ConstHep3Vector(double[] d) {
- _x = d[0];
- _y = d[1];
- _z = d[2];
- }
-
- public ConstHep3Vector(float[] f) {
- _x = f[0];
- _y = f[1];
- _z = f[2];
- }
-
- public ConstHep3Vector(Hep3Vector vector) {
- _x = vector.x();
- _y = vector.y();
- _z = vector.z();
- }
-
-// -- Implementing Hep3Vector : -----------------------------------------------
-
- public double x() {
- return _x;
- }
- public double y() {
- return _y;
- }
- public double z() {
- return _z;
- }
- public double magnitude() {
- return Math.sqrt(_x*_x + _y*_y + _z*_z);
- }
- public double magnitudeSquared() {
- return _x*_x + _y*_y + _z*_z;
- }
- public double[] v() {
- return new double[] { _x, _y, _z };
- }
-
-// -- Overriding Object : -----------------------------------------------------
-
- public boolean equals(Object obj) {
- if (obj instanceof Hep3Vector) {
- Hep3Vector that = (Hep3Vector) obj;
- return _x == that.x() && _y == that.y() && _z == that.z();
- } else {
- return false;
- }
- }
-
- public String toString() {
- return VecOp.toString(this);
- }
-
- public int hashCode() {
- return (int) (Double.doubleToLongBits(_x) + Double.doubleToLongBits(_y) + Double.doubleToLongBits(_z));
- }
-
-// -- Private parts : ---------------------------------------------------------
-
- double _x, _y, _z;
-}
lcsim/src/org/lcsim/contrib/onoprien/vsegment/transform
diff -N ConstSymmetricMatrix.java
--- ConstSymmetricMatrix.java 15 Sep 2008 15:44:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
-package org.lcsim.contrib.onoprien.vsegment.transform;
-
-import hep.physics.matrix.Matrix;
-import hep.physics.matrix.MatrixOp;
-import hep.physics.matrix.SymmetricMatrix;
-
-/**
- *
- *
- * @author D. Onoprienko
- * @version $Id: ConstSymmetricMatrix.java,v 1.1 2008/09/15 15:44:03 onoprien Exp $
- */
-public final class ConstSymmetricMatrix extends SymmetricMatrix {
-
-// -- Constructors : ----------------------------------------------------------
-
- public ConstSymmetricMatrix(int size) {
- super(size);
- }
-
- public ConstSymmetricMatrix(int size, double[] initialValues, boolean isLower) {
- super(size, initialValues, isLower);
- }
-
- public ConstSymmetricMatrix(Matrix mIn) {
- super(mIn);
- }
-
-// -- Disable modifying operations : ------------------------------------------
-
- public void transpose() {throw new UnsupportedOperationException();}
-
- public void invert() throws MatrixOp.IndeterminateMatrixException {throw new UnsupportedOperationException();}
-
- public void setElement(int x, int y, double value) {throw new UnsupportedOperationException();}
-
- public void incrementElement(int x, int y, double value) {throw new UnsupportedOperationException();}
-
-}
lcsim/src/org/lcsim/contrib/onoprien/util
diff -N ConstHep3Vector.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ConstHep3Vector.java 5 Nov 2008 03:32:47 -0000 1.1
@@ -0,0 +1,111 @@
+package org.lcsim.contrib.onoprien.util;
+
+import java.io.Serializable;
+
+import hep.physics.vec.Hep3Vector;
+import hep.physics.vec.VecOp;
+
+/**
+ * Immutable implementation of <tt>Hep3Vector</tt>.
+ * <p>
+ * Coordinates supplied to constructors are interpreted as cartesian.
+ * The class is identical to <tt>hep.physics.vec.BasicHep3Vector</t> except:
+ * <ul><li>No <tt>set</tt> method, making it immutable
+ * <li>Constructor that takes <tt>Hep3Vector</tt>
+ * <li>No input array length check in constructors.</ul>
+ *
+ * @author D. Onoprienko
+ * @version $Id: ConstHep3Vector.java,v 1.1 2008/11/05 03:32:47 onoprien Exp $
+ */
+final public class ConstHep3Vector implements Hep3Vector, Serializable {
+
+// -- Constant vectors : ------------------------------------------------------
+
+ /** Constant vector (0.,0.,0.) */
+ static public final ConstHep3Vector V000 = new ConstHep3Vector(0.,0.,0.);
+
+ /** Constant vector (1.,0.,0.) */
+ static public final ConstHep3Vector V100 = new ConstHep3Vector(1.,0.,0.);
+
+ /** Constant vector (0.,1.,0.) */
+ static public final ConstHep3Vector V010 = new ConstHep3Vector(0.,1.,0.);
+
+ /** Constant vector (0.,0.,1.) */
+ static public final ConstHep3Vector V001 = new ConstHep3Vector(0.,0.,1.);
+
+// -- Constructors : ----------------------------------------------------------
+
+ public ConstHep3Vector() {
+ _x = 0.;
+ _y = 0.;
+ _z = 0.;
+ }
+
+ public ConstHep3Vector(double x, double y, double z) {
+ _x = x;
+ _y = y;
+ _z = z;
+ }
+
+ public ConstHep3Vector(double[] d) {
+ _x = d[0];
+ _y = d[1];
+ _z = d[2];
+ }
+
+ public ConstHep3Vector(float[] f) {
+ _x = f[0];
+ _y = f[1];
+ _z = f[2];
+ }
+
+ public ConstHep3Vector(Hep3Vector vector) {
+ _x = vector.x();
+ _y = vector.y();
+ _z = vector.z();
+ }
+
+// -- Implementing Hep3Vector : -----------------------------------------------
+
+ public double x() {
+ return _x;
+ }
+ public double y() {
+ return _y;
+ }
+ public double z() {
+ return _z;
+ }
+ public double magnitude() {
+ return Math.sqrt(_x*_x + _y*_y + _z*_z);
+ }
+ public double magnitudeSquared() {
+ return _x*_x + _y*_y + _z*_z;
+ }
+ public double[] v() {
+ return new double[] { _x, _y, _z };
+ }
+
+// -- Overriding Object : -----------------------------------------------------
+
+ public boolean equals(Object obj) {
+ if (obj instanceof Hep3Vector) {
+ Hep3Vector that = (Hep3Vector) obj;
+ return _x == that.x() && _y == that.y() && _z == that.z();
+ } else {
+ return false;
+ }
+ }
+
+ public String toString() {
+ return VecOp.toString(this);
+ }
+
+ public int hashCode() {
+ return (int) (Double.doubleToLongBits(_x) + Double.doubleToLongBits(_y) + Double.doubleToLongBits(_z));
+ }
+
+// -- Private parts : ---------------------------------------------------------
+
+ double _x, _y, _z;
+}
lcsim/src/org/lcsim/contrib/onoprien/util
diff -N ConstSymmetricMatrix.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ConstSymmetricMatrix.java 5 Nov 2008 03:32:48 -0000 1.1
@@ -0,0 +1,39 @@
+package org.lcsim.contrib.onoprien.util;
+
+import hep.physics.matrix.Matrix;
+import hep.physics.matrix.MatrixOp;
+import hep.physics.matrix.SymmetricMatrix;
+
+/**
+ *
+ *
+ * @author D. Onoprienko
+ * @version $Id: ConstSymmetricMatrix.java,v 1.1 2008/11/05 03:32:48 onoprien Exp $
+ */
+public final class ConstSymmetricMatrix extends SymmetricMatrix {
+
+// -- Constructors : ----------------------------------------------------------
+
+ public ConstSymmetricMatrix(int size) {
+ super(size);
+ }
+
+ public ConstSymmetricMatrix(int size, double[] initialValues, boolean isLower) {
+ super(size, initialValues, isLower);
+ }
+
+ public ConstSymmetricMatrix(Matrix mIn) {
+ super(mIn);
+ }
+
+// -- Disable modifying operations : ------------------------------------------
+
+ public void transpose() {throw new UnsupportedOperationException();}
+
+ public void invert() throws MatrixOp.IndeterminateMatrixException {throw new UnsupportedOperationException();}
+
+ public void setElement(int x, int y, double value) {throw new UnsupportedOperationException();}
+
+ public void incrementElement(int x, int y, double value) {throw new UnsupportedOperationException();}
+
+}
lcsim/src/org/lcsim/contrib/onoprien/util
diff -N Driver.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Driver.java 5 Nov 2008 03:32:48 -0000 1.1
@@ -0,0 +1,173 @@
+package org.lcsim.contrib.onoprien.util;
+
+import java.util.logging.Level;
+
+import org.lcsim.event.EventHeader;
+
+/**
+ * Base class for drivers.
+ * <p>
+ * Logging facility included in this class simply prints messages to standard output
+ * when the {@link #log log(String, Level)} method is called with the level greater
+ * or equal to the logging level set for this driver.
+ * <p>
+ * Typically, logging levels are set according to the following guidelines:
+ * <dl>
+ * <dt>SEVERE</dt><dd>Error messages.</dd>
+ * <dt>WARNING</dt><dd>Messages about suspected errors.</dd>
+ * <dt>INFO (default)</dt><dd>Very little output - things the user would like to see
+ * when running interactively but not debugging or testing.</dd>
+ * <dt>CONFIG</dt><dd>In addition, print out configuration information.</dd>
+ * <dt>FINE</dt><dd>Print most important statistics for each major step in event processing.</dd>
+ * <dt>FINER</dt><dd>Output for debugging</dd>
+ * <dt>FINEST</dt><dd>Detailed diagnostic output - something only the developer would
+ * like to see, and only when debugging a particular class or method.</dd>
+ * </dl>
+ *
+ *
+ * @author D. Onoprienko
+ * @version $Id: Driver.java,v 1.1 2008/11/05 03:32:48 onoprien Exp $
+ */
+public class Driver extends org.lcsim.util.Driver {
+
+// -- Constructors : ----------------------------------------------------------
+
+ public Driver() {
+ }
+
+// -- Setters : ---------------------------------------------------------------
+
+ /**
+ * Set any parameter.
+ * The following parameters can be set with this method:
+ * <p><dl>
+ * <dt>"LOG_LEVEL"</dt> <dd>Logging level. See {@link Level} for possible values.
+ * <br>Default: INFO.</dd>
+ * <dt>"LOG_DEFAULT_LEVEL"</dt> <dd>Default logging level. Calling {@link #log(String)}
+ * will log at this level. This is intended to be set only in the driver's
+ * own constructor - if a particular driver logs many messages at a particular level,
+ * the code can be made more concise by making it the default level.
+ * <br>Default: INFO.</dd>
+ * <dt>"LOG_LEVEL_GLOBAL"</dt> <dd>Logging level for this driver and all its known sub-drivers.
+ * <br>Default: INFO.</dd>
+ * <dt>"LOG_PREFIX"</dt> <dd>Logging prefix.
+ * <br>Default: <tt>null</tt> (driver name will be used as a prefix).</dd></dl>
+ *
+ * @param name Name of parameter to be set. Case is ignored.
+ * @param values List of values to be used for setting the parameter.
+ * @throws NoSuchParameterException Thrown if the supplied parameter name is unknown.
+ * @throws IllegalArgumentException Thrown if incorrect nunber of values, or a value
+ * of incorrect type is supplied.
+ */
+ public void set(String name, Object... values) {
+ Object value = values.length == 0 ? null : values[0];
+ try {
+ if (name.equalsIgnoreCase("LOG_LEVEL")) {
+ try {
+ _logLevel = ((Level)value).intValue();
+ } catch (ClassCastException xx) {
+ try {
+ _logLevel = Level.parse((String)value).intValue();
+ } catch (IllegalArgumentException xxx) {
+ throw new IllegalArgumentException("Unknown logging level: "+(String)value);
+ }
+ }
+ } else if (name.equalsIgnoreCase("LOG_DEFAULT_LEVEL")) {
+ try {
+ _defLevel = ((Level)value);
+ } catch (ClassCastException xx) {
+ try {
+ _defLevel = Level.parse((String)value);
+ } catch (IllegalArgumentException xxx) {
+ throw new IllegalArgumentException("Unknown logging level: "+(String)value);
+ }
+ }
+ } else if (name.equalsIgnoreCase("LOG_LEVEL_GLOBAL")) {
+ try {
+ _logLevel = ((Level)value).intValue();
+ } catch (ClassCastException xx) {
+ try {
+ _logLevel = Level.parse((String)value).intValue();
+ } catch (IllegalArgumentException xxx) {
+ throw new IllegalArgumentException("Unknown logging level: "+(String)value);
+ }
+ }
+ for (org.lcsim.util.Driver daughter : drivers()) {
+ try {
+ ((Driver)daughter).set(name, value);
+ } catch (ClassCastException xx) {}
+ }
+ } else if (name.equalsIgnoreCase("LOG_PREFIX")) {
+ if (value == null) {
+ _logPrefix = getName() + " : ";
+ } else {
+ _logPrefix = (String) value;
+ if (_logPrefix.length() == 0) _logPrefix = null;
+ }
+ } else {
+ throw new NoSuchParameterException(name, this.getClass());
+ }
+ } catch (ClassCastException x) {
+ throw new IllegalArgumentException(ERR_VIT, x);
+ }
+ }
+
+// -- Logging : ---------------------------------------------------------------
+
+ /** Log a message at the given level. */
+ public void log(String message, Level level) {
+ if (level.intValue() >= _logLevel) {
+ if (_logPrefix != null) message = _logPrefix + message;
+ System.out.println(message);
+ }
+ }
+
+ /**
+ * Log a message at the level set by a call to <tt>set("LOG_DEFAULT_LEVEL", level)</tt>.
+ */
+ public void log(String message) {
+ log(message, _defLevel);
+ }
+
+ /**
+ * Returns <tt>true</tt> if messages at the given level are being printed out.
+ * That is, when the current logging level set for this driver is at or below
+ * the given <tt>Level</tt>.
+ */
+ public boolean isLogging(Level level) {
+ return level.intValue() >= _logLevel;
+ }
+
+ /**
+ * Add a driver that will log the message at the given level.
+ */
+ public void addLog(final String message, final Level level) {
+ add(new Driver() {
+ public void process(EventHeader event) {
+ Driver.this.log(message, level);
+ }
+ });
+ }
+
+ /**
+ * Add a driver that will log the message at the level set by a call to <tt>set("LOG_DEFAULT_LEVEL", level)</tt>.
+ */
+ public void addLog(String message) {
+ addLog(message, _defLevel);
+ }
+
+
+
+// -- Private parts : ---------------------------------------------------------
+
+ /** Setter error message: "Value of incompatible type " */
+ static public final String ERR_VIT = "Value of incompatible type ";
+ /** Setter error message: "Illegal number of values for name " */
+ static public final String ERR_INV = "Illegal number of values for name ";
+ /** Setter error message: "Illegal value for name " */
+ static public final String ERR_IV = "Illegal value for name ";
+
+ private int _logLevel = Level.INFO.intValue();
+ private Level _defLevel = Level.INFO;
+ private String _logPrefix = getName() + " : ";
+}
lcsim/src/org/lcsim/contrib/onoprien/util
diff -N NoSuchParameterException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ NoSuchParameterException.java 5 Nov 2008 03:32:48 -0000 1.1
@@ -0,0 +1,25 @@
+package org.lcsim.contrib.onoprien.util;
+
+/**
+ * Exception to be thrown by <tt>set(name,value)</tt> methods of various classes.
+ *
+ * @author D. Onoprienko
+ * @version $Id: NoSuchParameterException.java,v 1.1 2008/11/05 03:32:48 onoprien Exp $
+ */
+public class NoSuchParameterException extends RuntimeException {
+
+// -- Constructors : ----------------------------------------------------------
+
+ public NoSuchParameterException() {
+ super("No such parameter name\n Method: set(name,value)");
+ }
+
+ public NoSuchParameterException(String parName) {
+ super("No such parameter name: " + parName + "\n Method: set(name,value)");
+ }
+
+ public NoSuchParameterException(String parName, Class cl) {
+ super("No such parameter name: " + parName + "\n Method: set(name,value)\n Class: " + cl.getName());
+ }
+
+}
lcsim/src/org/lcsim/contrib/onoprien/util
diff -N RemoveObjectDriver.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ RemoveObjectDriver.java 5 Nov 2008 03:32:48 -0000 1.1
@@ -0,0 +1,65 @@
+package org.lcsim.contrib.onoprien.util;
+
+import java.util.*;
+
+import org.lcsim.event.EventHeader;
+
+/**
+ * Driver that removes specified objects from the event record.
+ *
+ * @author D. Onoprienko
+ * @version $Id: RemoveObjectDriver.java,v 1.1 2008/11/05 03:32:48 onoprien Exp $
+ */
+public class RemoveObjectDriver extends Driver {
+
+// -- Constructors : ----------------------------------------------------------
+
+ public RemoveObjectDriver() {
+ }
+
+// -- Setters : ---------------------------------------------------------------
+
+ /**
+ * Set any parameter.
+ * The following parameters can be set with this method:
+ * <p><dl>
+ * <dt>"NAMES"</dt> <dd>One or more names of objects to be removed from the event record.</dd></dl>
+ *
+ * @param name Name of parameter to be set. Case is ignored.
+ * @param values List of values to be used for setting the parameter.
+ * @throws NoSuchParameterException Thrown if the supplied parameter name is unknown.
+ * @throws IllegalArgumentException Thrown if incorrect nunber of values, or a value
+ * of incorrect type is supplied.
+ */
+ public void set(String name, Object... values) {
+ Object value = values.length == 0 ? null : values[0];
+ try {
+ if (name.equalsIgnoreCase("NAMES")) {
+ _names = new ArrayList<String>(values.length);
+ for (Object ob : values) _names.add((String) ob);
+ } else {
+ super.set(name, values);
+ }
+ } catch (ClassCastException x) {
+ throw new IllegalArgumentException(ERR_VIT, x);
+ }
+ }
+
+// -- Event processing : ------------------------------------------------------
+
+ /** Called by the framework to process an event. */
+ public void process(EventHeader event) {
+
+ super.process(event);
+
+ for (String name : _names) {
+ event.remove(name);
+ }
+
+ }
+
+// -- Private parts : ---------------------------------------------------------
+
+ private ArrayList<String> _names;
+
+}
lcsim/src/org/lcsim/contrib/onoprien/util
diff -N package-info.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ package-info.java 5 Nov 2008 03:32:48 -0000 1.1
@@ -0,0 +1,4 @@
+/**
+ * Utility and infrastructure classes used by multiple packages.
+ */
+package org.lcsim.contrib.onoprien.util;
CVSspam 0.2.8