2 removed + 8 modified, total 10 files
GeomConverter/src/org/lcsim/detector
diff -u -r1.36 -r1.37
--- DetectorElement.java 21 Sep 2007 00:44:33 -0000 1.36
+++ DetectorElement.java 10 Oct 2007 22:35:44 -0000 1.37
@@ -15,10 +15,9 @@
* Implementation of {@link IDetectorElement}.
*
* @author Jeremy McCormick
- * @version $Id: DetectorElement.java,v 1.36 2007/09/21 00:44:33 jeremy Exp $
+ * @version $Id: DetectorElement.java,v 1.37 2007/10/10 22:35:44 jeremy Exp $
*/
public class DetectorElement
-extends Named
implements IDetectorElement
{
private IDetectorElementContainer children;
@@ -28,6 +27,13 @@
private IIdentifierHelper helper;
private IParameters parameters;
private IReadout readout;
+ private String name;
+
+ /**
+ * For subclasses.
+ */
+ protected DetectorElement()
+ {}
/**
* Create a DE with complete arguments, including
@@ -44,9 +50,8 @@
IDetectorElement parent,
IPhysicalVolumePath support,
IIdentifier id)
- {
- super(name);
- setup(parent,support,id);
+ {
+ setup(name,parent,support,id);
register();
}
@@ -61,9 +66,8 @@
String name,
IDetectorElement parent,
IPhysicalVolumePath support)
- {
- super(name);
- setup(parent,support,null);
+ {
+ setup(name,parent,support,null);
register();
}
@@ -79,9 +83,8 @@
String name,
IDetectorElement parent,
String support)
- {
- super(name);
- setup(parent,support,id);
+ {
+ setup(name,parent,support,id);
register();
}
@@ -99,8 +102,7 @@
String support,
IIdentifier id)
{
- super(name);
- setup(parent,support,id);
+ setup(name,parent,support,id);
register();
}
@@ -115,8 +117,7 @@
String name,
IDetectorElement parent)
{
- super(name);
- setup(parent,(IPhysicalVolumePath)null,null);
+ setup(name,parent,(IPhysicalVolumePath)null,null);
register();
}
@@ -131,9 +132,14 @@
public DetectorElement(
String name)
{
- super(name);
+ this.name = name;
register();
}
+
+ public String getName()
+ {
+ return name;
+ }
/**
* Set the parent IDetectorElement. Once this
@@ -187,12 +193,15 @@
}
private void setup(
+ String name,
IDetectorElement parent,
IPhysicalVolumePath support,
IIdentifier id
)
{
- checkName(getName());
+ this.name = name;
+
+ checkName(this.name);
if ( parent != null )
{
@@ -211,11 +220,16 @@
}
private void setup(
+ String name,
IDetectorElement parent,
String support,
IIdentifier id
)
- {
+ {
+ this.name = name;
+
+ checkName(this.name);
+
if ( parent != null )
{
setParent(parent);
GeomConverter/src/org/lcsim/detector
diff -u -r1.21 -r1.22
--- IDetectorElement.java 21 Sep 2007 00:44:33 -0000 1.21
+++ IDetectorElement.java 10 Oct 2007 22:35:44 -0000 1.22
@@ -21,16 +21,15 @@
* @see IGeometryInfo
* @see IIdentifiable
* @see IIdentifier
- * @see INamed
* @see IParameters
* @see IReadout
*
* @author jeremym
* @author tknelson
- * @version $Id: IDetectorElement.java,v 1.21 2007/09/21 00:44:33 jeremy Exp $
+ * @version $Id: IDetectorElement.java,v 1.22 2007/10/10 22:35:44 jeremy Exp $
*/
-public interface IDetectorElement
-extends IIdentifiable, INamed
+public interface IDetectorElement
+extends IIdentifiable
{
/**
* Get the geometric information for this node,
GeomConverter/src/org/lcsim/detector
diff -u -r1.6 -r1.7
--- ILogicalVolume.java 3 Mar 2007 13:33:56 -0000 1.6
+++ ILogicalVolume.java 10 Oct 2007 22:35:44 -0000 1.7
@@ -14,8 +14,8 @@
*
*/
public interface ILogicalVolume
-extends INamed
{
+ public String getName();
public ISolid getSolid();
public IMaterial getMaterial();
public IPhysicalVolumeContainer getDaughters();
GeomConverter/src/org/lcsim/detector
diff -u -r1.7 -r1.8
--- IPhysicalVolume.java 4 May 2007 10:23:37 -0000 1.7
+++ IPhysicalVolume.java 10 Oct 2007 22:35:44 -0000 1.8
@@ -3,8 +3,9 @@
import hep.physics.vec.Hep3Vector;
public interface IPhysicalVolume
-extends INamed
{
+ public String getName();
+
/**
* Get the associated LogicalVolume.
* @return The associated LogicalVolume.
GeomConverter/src/org/lcsim/detector
diff -u -r1.9 -r1.10
--- IPhysicalVolumeNavigator.java 4 May 2007 10:23:37 -0000 1.9
+++ IPhysicalVolumeNavigator.java 10 Oct 2007 22:35:44 -0000 1.10
@@ -11,11 +11,12 @@
* transform of an IPhysicalVolumePath.
*
* @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: IPhysicalVolumeNavigator.java,v 1.9 2007/05/04 10:23:37 jeremy Exp $
+ * @version $Id: IPhysicalVolumeNavigator.java,v 1.10 2007/10/10 22:35:44 jeremy Exp $
*/
public interface IPhysicalVolumeNavigator
-extends INamed
{
+ public String getName();
+
/**
* Get the top physical volume assigned to
* this navigator.
GeomConverter/src/org/lcsim/detector
diff -u -r1.3 -r1.4
--- LogicalVolume.java 6 Mar 2007 20:22:16 -0000 1.3
+++ LogicalVolume.java 10 Oct 2007 22:35:44 -0000 1.4
@@ -10,11 +10,11 @@
*
*/
public class LogicalVolume
-extends Named
implements ILogicalVolume
{
IMaterial material;
ISolid solid;
+ String name;
// The same PhysicalVolume cannot be added twice.
// The volumes must have unique names within their mother.
@@ -23,7 +23,7 @@
public LogicalVolume(String name, ISolid solid, IMaterial material)
{
- super(name);
+ this.name = name;
this.solid = solid;
this.material = material;
@@ -31,6 +31,11 @@
LogicalVolumeStore.getInstance().add(this);
}
+ public String getName()
+ {
+ return name;
+ }
+
public IMaterial getMaterial()
{
return material;
GeomConverter/src/org/lcsim/detector
diff -u -r1.9 -r1.10
--- PhysicalVolume.java 7 Aug 2007 18:11:39 -0000 1.9
+++ PhysicalVolume.java 10 Oct 2007 22:35:44 -0000 1.10
@@ -3,7 +3,6 @@
import hep.physics.vec.Hep3Vector;
public class PhysicalVolume
-extends Named
implements IPhysicalVolume
{
ITransform3D transform;
@@ -11,6 +10,7 @@
ILogicalVolume motherLogicalVolume;
int copyNum;
boolean sensitive=false;
+ String name;
public PhysicalVolume(
ITransform3D transform,
@@ -19,7 +19,7 @@
ILogicalVolume motherLogicalVolume,
int copyNum)
{
- super(name);
+ this.name = name;
if (transform != null)
{
@@ -43,6 +43,11 @@
PhysicalVolumeStore.getInstance().add(this);
}
+ public String getName()
+ {
+ return name;
+ }
+
public IRotation3D getRotation()
{
return transform.getRotation();
GeomConverter/src/org/lcsim/detector
diff -u -r1.14 -r1.15
--- PhysicalVolumeNavigator.java 6 Aug 2007 19:09:31 -0000 1.14
+++ PhysicalVolumeNavigator.java 10 Oct 2007 22:35:44 -0000 1.15
@@ -40,9 +40,10 @@
*
*/
public class PhysicalVolumeNavigator
-extends Named
implements IPhysicalVolumeNavigator
{
+ String name;
+
/**
* Find the full geometry path to the PhysicalVolume containing
* the global point @param globalPoint, relative to the world volume.
@@ -322,14 +323,14 @@
public PhysicalVolumeNavigator(String name, IPhysicalVolume pvTop)
{
- super(name);
+ this.name = name;
setTopPhysicalVolume(pvTop);
PhysicalVolumeNavigatorStore.getInstance().add(this);
}
public PhysicalVolumeNavigator(String name, IPhysicalVolumePath path)
{
- super(name);
+ this.name = name;
if ( path == null )
{
@@ -412,4 +413,9 @@
{
traversePostOrder(getTopPhysicalVolume(), visitor);
}
+
+ public String getName()
+ {
+ return name;
+ }
}
\ No newline at end of file
GeomConverter/src/org/lcsim/detector
diff -N INamed.java
--- INamed.java 10 Jul 2007 19:49:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-package org.lcsim.detector;
-
-/**
- *
- * A mixin interface for assigning String names to objects.
- *
- * @author Jeremy McCormick <[log in to unmask]>
- *
- */
-public interface INamed
-{
- public String getName();
-}
\ No newline at end of file
GeomConverter/src/org/lcsim/detector
diff -N Named.java
--- Named.java 10 Jul 2007 19:49:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-package org.lcsim.detector;
-
-/**
- *
- * Implementation of the @see INamed interface.
- *
- * @author Jeremy McCormick <[log in to unmask]>
- *
- */
-public abstract class Named
-implements INamed
-{
- private String name;
-
- public Named(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
-}
\ No newline at end of file
CVSspam 0.2.8