Commit in lcio on v01-07-vtx
doc/lcio.xml+11.59.4.5 -> 1.59.4.6
src/aid/EVENT/Vertex.aid+6-61.2.2.6 -> 1.2.2.7
src/cpp/include/CPPFORT/lcvtx.h+41.1.2.2 -> 1.1.2.3
src/cpp/include/IMPL/VertexImpl.h+10-31.1.2.5 -> 1.1.2.6
src/cpp/src/CPPFORT/lcvtx.cc+111.1.2.2 -> 1.1.2.3
src/cpp/src/IMPL/VertexImpl.cc+8-11.1.2.5 -> 1.1.2.6
src/cpp/src/SIO/SIOVertexHandler.cc+21.1.2.2 -> 1.1.2.3
src/cpp/src/UTIL/Operators.cc+12-111.1.2.3 -> 1.1.2.4
src/java/hep/lcio/implementation/event/IVertex.java+101.1.2.1 -> 1.1.2.2
src/java/hep/lcio/implementation/sio/SIOVertex.java+31.1.2.1 -> 1.1.2.2
src/java/hep/lcio/util/Printer.java+4-31.1.2.1 -> 1.1.2.2
+71-24
11 modified files
added new methods to vertex class (int getAlgorithmType(), void setAlgorithmType(int type))

lcio/doc
lcio.xml 1.59.4.5 -> 1.59.4.6
diff -u -r1.59.4.5 -r1.59.4.6
--- lcio.xml	25 Aug 2006 08:47:41 -0000	1.59.4.5
+++ lcio.xml	31 Aug 2006 15:18:50 -0000	1.59.4.6
@@ -438,6 +438,7 @@
       <data type="int" name="nVertex"></data>
       <repeat count="nVertex">
 	<data type="int" name="primary">primary vertex of the event</data>
+	<data type="int" name="type">algorithm type</data>
 	<data type="float" name="chi2">chi**2 of vertex</data>
 	<data type="float" name="probability">?probability of the fit?</data>
 	<data type="float[3]" name="position">position of the vertex (px,py,pz)</data>

lcio/src/aid/EVENT
Vertex.aid 1.2.2.6 -> 1.2.2.7
diff -u -r1.2.2.6 -r1.2.2.7
--- Vertex.aid	30 Aug 2006 17:44:24 -0000	1.2.2.6
+++ Vertex.aid	31 Aug 2006 15:18:54 -0000	1.2.2.7
@@ -15,7 +15,7 @@
  *  <p>UNDER DEVELOPMENT!</p>
  *  
  * @author gaede, engels
- * @version $Id: Vertex.aid,v 1.2.2.6 2006/08/30 17:44:24 gaede Exp $
+ * @version $Id: Vertex.aid,v 1.2.2.7 2006/08/31 15:18:54 engels Exp $
  */
 
 public interface Vertex extends LCObject {
@@ -32,6 +32,11 @@
      *  Only one primary vertex per event is allowed
      */
     public boolean isPrimary() const ;
+    
+    /** Type code for the algorithm that has been used to create the vertex - check/set the 
+     *  collection parameters AlgorithmName and  AlgorithmType.
+     */
+    public int getAlgorithmType() const ;	
 
      /** Chi squared of the vertex fit.
      */
@@ -50,11 +55,6 @@
      */
     public const FloatVec & getCovMatrix() const ;
 
-    /** Type code for the algorithm that has been used to create the vertex - check/set the 
-     *  collection parameters AglorithmName and  AglorithmType.
-     */
-    public int getAlgorithmType() const ;	
-
     /** Additional parameters related to this vertex - check/set the collection
      *  parameter "VertexParameterNames" for the parameters' meaning.
      */

lcio/src/cpp/include/CPPFORT
lcvtx.h 1.1.2.2 -> 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- lcvtx.h	29 Aug 2006 15:22:18 -0000	1.1.2.2
+++ lcvtx.h	31 Aug 2006 15:18:55 -0000	1.1.2.3
@@ -14,6 +14,7 @@
 
 int     lcvtxid( PTRTYPE vtx ) ;
 bool    lcvtxisprimary( PTRTYPE vtx ) ;
+int     lcvtxgetalgorithmtype( PTRTYPE vtx ) ;
 float   lcvtxgetchi2( PTRTYPE vtx ) ;
 float   lcvtxgetprobability( PTRTYPE vtx ) ;
 int     lcvtxgetposition( PTRTYPE vtx, float* pos ) ;
@@ -22,6 +23,7 @@
 PTRTYPE lcvtxgetassociatedparticle( PTRTYPE vtx ) ;
 
 int     lcvtxsetprimary( PTRTYPE vtx, bool pri ) ;
+int     lcvtxsetalgorithmtype( PTRTYPE vtx, int type ) ;
 int     lcvtxsetchi2( PTRTYPE vtx, float chi2 ) ;
 int     lcvtxsetprobability( PTRTYPE vtx, float prob ) ;
 int     lcvtxsetposition( PTRTYPE vtx, float* pos ) ;
@@ -38,6 +40,7 @@
 
 FCALLSCFUN1(INT, lcvtxid, LCVTXID, lcvtxid, CFORTRANPNTR) 
 FCALLSCFUN1(LOGICAL, lcvtxisprimary, LCVTXISPRIMARY, lcvtxisprimary, CFORTRANPNTR) 
+FCALLSCFUN1(INT, lcvtxgetalgorithmtype, LCVTXGETALGORITHMTYPE, lcvtxgetalgorithmtype, CFORTRANPNTR) 
 FCALLSCFUN1(FLOAT, lcvtxgetchi2, LCVTXGETCHI2, lcvtxgetchi2, CFORTRANPNTR) 
 FCALLSCFUN1(FLOAT, lcvtxgetprobability, LCVTXGETPROBABILITY, lcvtxgetprobability, CFORTRANPNTR) 
 FCALLSCFUN2(INT, lcvtxgetposition, LCVTXGETPOSITION, lcvtxgetposition, CFORTRANPNTR, FLOATV) 
@@ -46,6 +49,7 @@
 FCALLSCFUN1(CFORTRANPNTR, lcvtxgetassociatedparticle,  LCVTXGETASSOCIATEDPARTICLE, lcvtxgetassociatedparticle, CFORTRANPNTR) 
 
 FCALLSCFUN2(INT, lcvtxsetprimary, LCVTXSETPRIMARY, lcvtxsetprimary, CFORTRANPNTR, LOGICAL) 
+FCALLSCFUN2(INT, lcvtxsetalgorithmtype, LCVTXSETALGORITHMTYPE, lcvtxsetalgorithmtype, CFORTRANPNTR, INT) 
 FCALLSCFUN2(INT, lcvtxsetchi2, LCVTXSETCHI2, lcvtxsetchi2, CFORTRANPNTR, FLOAT) 
 FCALLSCFUN2(INT, lcvtxsetprobability, LCVTXSETPROBABILITY, lcvtxsetprobability, CFORTRANPNTR, FLOAT) 
 FCALLSCFUN2(INT, lcvtxsetposition, LCVTXSETPOSITION, lcvtxsetposition, CFORTRANPNTR, FLOATV) 

lcio/src/cpp/include/IMPL
VertexImpl.h 1.1.2.5 -> 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- VertexImpl.h	24 Aug 2006 14:20:36 -0000	1.1.2.5
+++ VertexImpl.h	31 Aug 2006 15:18:55 -0000	1.1.2.6
@@ -36,7 +36,12 @@
      *  Only one primary vertex per event is allowed
      */
     virtual bool isPrimary() const ;
-    
+     
+    /** Type code for the algorithm that has been used to create the vertex - check/set the
+     *  collection parameters AlgorithmName and  AlgorithmType.
+     */
+    virtual int getAlgorithmType() const ;
+
     /** Chi squared of the vertex fit.
      */
     virtual float getChi2() const;
@@ -53,7 +58,7 @@
      *  cov(xx),cov(y,x),cov(y,y) ).
      */
     virtual const EVENT::FloatVec & getCovMatrix() const;
-                                                                                                         
+
     /** Additional parameters related to this vertex - check/set the collection
      *  parameter "VertexParameterNames" for the parameters' meaning.
      */
@@ -64,7 +69,8 @@
     virtual EVENT::ReconstructedParticle * getAssociatedParticle() const;
 
     // setters
-    void setPrimary(bool primary) ;
+    void setPrimary( bool primary ) ;
+    void setAlgorithmType( int type ) ;
     void setChi2( float chi2 ) ;
     void setProbability( float probability ) ;
     void setPosition( float vpos[3] ) ;
@@ -76,6 +82,7 @@
 
   protected:
     int _primary ;
+    int _type ;
     float _chi2 ;
     float _probability ;
     float _vpos[3] ;

lcio/src/cpp/src/CPPFORT
lcvtx.cc 1.1.2.2 -> 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- lcvtx.cc	29 Aug 2006 15:22:18 -0000	1.1.2.2
+++ lcvtx.cc	31 Aug 2006 15:18:55 -0000	1.1.2.3
@@ -33,6 +33,11 @@
   return vtx->isPrimary() ;
 }
 
+int lcvtxgetalgorithmtype ( PTRTYPE vertex ) {
+  VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
+  return vtx->getAlgorithmType() ;
+}
+
 float lcvtxgetchi2( PTRTYPE vertex ) {
   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
   return vtx->getChi2() ;
@@ -85,6 +90,12 @@
   return LCIO::SUCCESS ;
 }
 
+int lcvtxsetalgorithmtype( PTRTYPE vertex, int type ) {
+  VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
+  vtx->setAlgorithmType( type ) ;
+  return LCIO::SUCCESS ;
+}
+
 int lcvtxsetchi2( PTRTYPE vertex, float chi2 ) {
   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
   vtx->setChi2( chi2 ) ;

lcio/src/cpp/src/IMPL
VertexImpl.cc 1.1.2.5 -> 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- VertexImpl.cc	24 Aug 2006 14:20:37 -0000	1.1.2.5
+++ VertexImpl.cc	31 Aug 2006 15:18:56 -0000	1.1.2.6
@@ -7,6 +7,7 @@
 
   VertexImpl::VertexImpl() :
     _primary(0),
+    _type(0),
     _chi2(0),
     _probability(0),
     _par(0),
@@ -20,7 +21,8 @@
 
   VertexImpl::~VertexImpl(){ }
  
-  bool VertexImpl::isPrimary() const { return _primary ;}
+  bool VertexImpl::isPrimary() const { return _primary ; }
+  int VertexImpl::getAlgorithmType() const { return _type ; }
   float VertexImpl::getChi2() const { return _chi2 ; }
   float VertexImpl::getProbability() const { return _probability ; }
   const float* VertexImpl::getPosition() const { return  _vpos ; }
@@ -34,6 +36,11 @@
     checkAccess("VertexImpl::setPrimary" );
     _primary = (primary==0?0:1);
   }
+
+  void VertexImpl::setAlgorithmType( int type ){
+    checkAccess("VertexImpl::setAlgorithmType");
+    _type = type;
+  }
   
   void VertexImpl::setChi2(float chi2){
     checkAccess("VertexImpl::setChi2" );

lcio/src/cpp/src/SIO
SIOVertexHandler.cc 1.1.2.2 -> 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- SIOVertexHandler.cc	18 Aug 2006 13:39:16 -0000	1.1.2.2
+++ SIOVertexHandler.cc	31 Aug 2006 15:18:56 -0000	1.1.2.3
@@ -28,6 +28,7 @@
 
     //read data
     SIO_DATA( stream ,  &(vtx->_primary)  , 1 ) ;
+    SIO_DATA( stream ,  &(vtx->_type)  , 1 ) ;
     SIO_DATA( stream ,  &(vtx->_chi2)  , 1 ) ;
     SIO_DATA( stream ,  &(vtx->_probability)  , 1 ) ;
     SIO_DATA( stream ,  vtx->_vpos  , 3 ) ;
@@ -67,6 +68,7 @@
 
     //write data
     LCSIO_WRITE( stream, vtx->isPrimary()  ) ;
+    LCSIO_WRITE( stream, vtx->getAlgorithmType()  ) ;
     LCSIO_WRITE( stream, vtx->getChi2()  ) ;
     LCSIO_WRITE( stream, vtx->getProbability()  ) ;
 

lcio/src/cpp/src/UTIL
Operators.cc 1.1.2.3 -> 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- Operators.cc	29 Aug 2006 15:00:21 -0000	1.1.2.3
+++ Operators.cc	31 Aug 2006 15:18:56 -0000	1.1.2.4
@@ -13,25 +13,28 @@
     
     out << setfill('0');
     out << " [" << setw(8) << hex << v->id() << "] | " << v->isPrimary()<< " | ";
-    out << scientific << setprecision(3) << v->getChi2() << " | " << v->getProbability() << " | " <<
+    out << setfill(' ') << setw(17) << left << v->getAlgorithmType() << " | ";
+    
+    out << setfill('0') << scientific << right << setprecision(3) << v->getChi2() << " | " << v->getProbability() << " | " <<
 	v->getPosition()[0] << "," <<
         v->getPosition()[1] << "," <<
-        v->getPosition()[2] << " | " ;
-                                                                                                                                                             
-    for(int i=0;i<VTXCOVMATRIX;i++)
-      out << v->getCovMatrix()[i] << (i<(VTXCOVMATRIX-1)?",":" | [");
+        v->getPosition()[2] << " | [" ;
+
+//    for(int i=0;i<VTXCOVMATRIX;i++)
+//      out << v->getCovMatrix()[i] << (i<(VTXCOVMATRIX-1)?",":" | [");
     out << setw(3) << v->getParameters().size() << "] | [";
     out << setw(8) << hex << (v->getAssociatedParticle()!=NULL?v->getAssociatedParticle()->id():0) << "]\n";
     
     return out;
-                                                                                                                                                             
+
   }
  
   std::ostream& operator<<( std::ostream& out, const EVENT::Vertex* v){
     
     out << setfill('0');
     out << "Vertex ID:\t\t[" << setw(8) << hex << v->id() << "]" << endl;
-    out << "Is Primary Vertex:\t" << (v->isPrimary() ? "true":"false") << endl;
+    out << "Is Primary Vertex:\t" << (v->isPrimary() ? "yes":"no") << endl;
+    out << "Algorithm Type:\t" << v->getAlgorithmType() << endl;
     out << scientific << setprecision(5);
     out << "Chi2:\t\t\t" << v->getChi2() << endl;
     out << "Probability:\t\t" << v->getProbability() << endl;
@@ -90,8 +93,7 @@
   const std::string& header(const EVENT::Vertex* v){
     
     static std::string _vtxh(
-      "\n    [id]    |pri|    chi2   |    prob.  |      position ( x, y, z)      |"
-	"                 covariance matrix (px, py, pz)              | [par] |  [idRecP]  \n");
+      "\n    [id]    |pri|     alg. type     |    chi2   |    prob.  |      position ( x, y, z)      | [par] |  [idRecP]  \n");
     _vtxh+=tail(new IMPL::VertexImpl());
     return _vtxh;
   }
@@ -99,8 +101,7 @@
   const std::string& tail(const EVENT::Vertex* v){
     
     static std::string _vtxt(
-	"------------|---|-----------|-----------|-------------------------------|"
-	"-------------------------------------------------------------|-------|------------\n");
+	"------------|---|-------------------|-----------|-----------|-------------------------------|-------|------------\n");
     return _vtxt;
   }
 

lcio/src/java/hep/lcio/implementation/event
IVertex.java 1.1.2.1 -> 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- IVertex.java	28 Aug 2006 13:31:06 -0000	1.1.2.1
+++ IVertex.java	31 Aug 2006 15:18:57 -0000	1.1.2.2
@@ -11,6 +11,7 @@
 
 	private static float[] null0 = new float[0];
 	protected int primary;
+	protected int type;
 	protected float chi2;
 	protected float probability;
 	protected float[] position = new float[3];
@@ -82,4 +83,13 @@
 		checkAccess();
 		this.primary = (primary == true ? 1 : 0 );
 	}
+	
+	public int getAlgorithmType() {
+		return type;
+	}
+	
+	public void setAlgorithmType(int type) {
+		checkAccess();
+		this.type=type;
+	}
 }

lcio/src/java/hep/lcio/implementation/sio
SIOVertex.java 1.1.2.1 -> 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- SIOVertex.java	28 Aug 2006 13:31:09 -0000	1.1.2.1
+++ SIOVertex.java	31 Aug 2006 15:18:57 -0000	1.1.2.2
@@ -15,6 +15,7 @@
 public class SIOVertex extends IVertex{
 	public SIOVertex(SIOInputStream in, SIOEvent owner, int major, int minor) throws IOException{
 		this.primary = in.readInt();
+		this.type = in.readInt();
 		this.chi2 = in.readFloat();
 		this.probability = in.readFloat();
 		for (int i=0; i<3; i++) this.position[i] = in.readFloat();
@@ -31,6 +32,7 @@
 		}
 	    else{
 	    	out.writeInt(v.isPrimary()?1:0);
+	    	out.writeInt(v.getAlgorithmType());
 	    	out.writeFloat(v.getChi2());
 	    	out.writeFloat(v.getProbability());
 	    	float[] pos = v.getPosition();
@@ -47,6 +49,7 @@
 	   }
 	private void write(SIOOutputStream out) throws IOException{
 		out.writeInt(primary);
+		out.writeInt(type);
 		out.writeFloat(chi2);
 		out.writeFloat(probability);
 		for (int i=0; i<3; i++) out.writeFloat(position[i]);

lcio/src/java/hep/lcio/util
Printer.java 1.1.2.1 -> 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- Printer.java	28 Aug 2006 13:31:11 -0000	1.1.2.1
+++ Printer.java	31 Aug 2006 15:18:57 -0000	1.1.2.2
@@ -773,14 +773,15 @@
 	}
 	class VertexPrinter extends LCTypePrinter{
 		void print(LCCollection coll, int nprint){
-			ps.println(" [   id   ] | pri | chi2 | prob. |          position ( x,y,z)       | [assRecP]");
+			ps.println(" [   id   ] | pri | alg. type | chi2 | prob. |          position ( x,y,z)       | [assRecP]");
 			
 			for (int i=0; i<nprint; i++){
 				Vertex v = (Vertex)coll.getElementAt(i);
-				ps.format(" [%08x] | %3s | %4.2e | %4.2e | (%5.3e,%5.3e,%5.3e) | %4.2e | %4.2e | %4.2e | (%5.3e,%5.3e,%5.3e) | [%08x] \n",
+				ps.format(" [%08x] | %3s | %d | %4.2e | %4.2e | (%5.3e,%5.3e,%5.3e) | %4.2e | %4.2e | %4.2e | (%5.3e,%5.3e,%5.3e) | [%08x] \n",
 			    		new Object[] {
 			    			Integer.valueOf(v.hashCode()),
-			    			v.isPrimary() ? "yes" : "no", 
+			    			v.isPrimary() ? "yes" : "no",
+			    			v.getAlgorithmType(),
 			    			Double.valueOf(v.getChi2()), 
 			    			Double.valueOf(v.getProbability()),
 			    			Double.valueOf(v.getPosition()[0]),
CVSspam 0.2.8