Print

Print


Commit in lcio/src/python on MAIN
test.py+2-11.2 -> 1.3
write_test.py+2-131.1 -> 1.2
+4-14
2 modified files
JM: Cleanup LCIO Python examples

lcio/src/python
test.py 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- test.py	14 Mar 2006 23:55:40 -0000	1.2
+++ test.py	16 Mar 2006 02:12:53 -0000	1.3
@@ -38,4 +38,5 @@
 gc.collect()
 print "Done collecting garbage."
 
-
+nms = evt.getCollectionNames()
+print repr(nms)

lcio/src/python
write_test.py 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- write_test.py	15 Mar 2006 00:33:26 -0000	1.1
+++ write_test.py	16 Mar 2006 02:12:54 -0000	1.2
@@ -14,24 +14,13 @@
 writer.open("write_test", lcio.LCIO.WRITE_NEW)
 
 # write out 10k events
-nevents = 1
+nevents = 10
 for i in range(0,nevents):
 
-#    coll = lcio.LCCollectionVec(lcio.cvar.LCIO_RAWCALORIMETERHIT)
     coll = lcio.LCCollectionVec(lcio.cvar.LCIO_SIMCALORIMETERHIT)
-    coll.thisown = 0 # set C++ ownership
-
-    #flag = lcio.LCFlagImpl()
-    #flag.setBit( lcio.LCIO.CHBIT_LONG )
-    #coll.setFlag( flag.getFlag() )
-    #print "set coll flags"
 
     for i in range(0,1):
         hit = lcio.SimCalorimeterHitImpl()
-#        hit  = lcio.RawCalorimeterHitImpl()
-
-#        hit.setAmplitude(1)
-        hit.thisown = 0 # set C++ ownership
         coll.addElement(hit)
 
     evt = lcio.LCEventImpl()
@@ -42,7 +31,7 @@
 
     writer.writeEvent(evt)
     writer.flush()
-    evt = None    
+    evt = None
 
     coll = None
 
CVSspam 0.2.8