Print

Print


Commit in lcio/src/cpp/src/EXAMPLE on MAIN
recjob.cc+11-11.51 -> 1.52
added commented out code for testing copy c'tor of SimCalorimeterHit

lcio/src/cpp/src/EXAMPLE
recjob.cc 1.51 -> 1.52
diff -u -r1.51 -r1.52
--- recjob.cc	1 Dec 2006 14:10:10 -0000	1.51
+++ recjob.cc	26 Apr 2007 16:45:22 -0000	1.52
@@ -246,6 +246,9 @@
 
     LCCollection* simcalHits = evt->getCollection( simcalHitName ) ;
 
+//     // create a collection with copied simhits and modify these
+//     // (test copy constructor  - NOT YET AVAILABLE FOR OTHER CLASSES !)
+//     LCCollection* modifiedSimCalHits = new LCCollectionVec( LCIO::SIMCALORIMETERHIT );
 
     LCCollectionVec* clusterVec = new LCCollectionVec( LCIO::CLUSTER )  ;
     LCCollectionVec* calHits = new LCCollectionVec( LCIO::CALORIMETERHIT )  ;
@@ -283,8 +286,15 @@
       scRel->addElement( new LCRelationImpl( calHit , simcalHit , 0.5 ) ) ;
       scRel->addElement( new LCRelationImpl( calHit , simcalHit , 0.5 ) ) ;
       calHits->addElement( calHit ) ;
+
+//       // create a copy of sim hit and modify it
+//       SimCalorimeterHitImpl* mSimHit = new SimCalorimeterHitImpl( *simcalHit ) ;
+//       mSimHit->setEnergy(  mSimHit->getEnergy() * 1000. ) ;
+//       modifiedSimCalHits->addElement( mSimHit ) ;
+
     }
     evt->addCollection( calHits , "CalorimeterHits") ;
+//     evt->addCollection( modifiedSimCalHits , "ModifiedSimCalorimeterHits") ;
 
     LCFlagImpl relFlag(0) ;
     relFlag.setBit( LCIO::LCREL_WEIGHTED ) ;
@@ -292,7 +302,7 @@
 
     evt->addCollection( scRel , "CalorimeterHitsSimRel" ) ;
     //    evt->addRelation( scRel , "CalorimeterHitsSimRel" ) ;
-
+    
 
 
 
CVSspam 0.2.8