Print

Print


Commit in java/trunk/hps-java/src/main/java/org/lcsim/hps/recon/ecal on MAIN
EcalRawConverterDriver.java+6-6333 -> 334
don't output a collection if there's no input collection

java/trunk/hps-java/src/main/java/org/lcsim/hps/recon/ecal
EcalRawConverterDriver.java 333 -> 334
--- java/trunk/hps-java/src/main/java/org/lcsim/hps/recon/ecal/EcalRawConverterDriver.java	2014-03-21 21:37:58 UTC (rev 333)
+++ java/trunk/hps-java/src/main/java/org/lcsim/hps/recon/ecal/EcalRawConverterDriver.java	2014-03-21 21:49:44 UTC (rev 334)
@@ -94,6 +94,9 @@
 
     @Override
     public void process(EventHeader event) {
+        int flags = 0;
+        flags += 1 << LCIOConstants.RCHBIT_TIME; //store cell ID
+
         if (!runBackwards) {
             ArrayList<CalorimeterHit> newHits = new ArrayList<CalorimeterHit>();
 
@@ -113,6 +116,7 @@
                         newHits.add(newHit);
                     }
                 }
+                event.put(ecalCollectionName, newHits, CalorimeterHit.class, flags, ecalReadoutName);
             }
             if (event.hasCollection(RawCalorimeterHit.class, rawCollectionName)) {
                 List<RawCalorimeterHit> hits = event.get(RawCalorimeterHit.class, rawCollectionName);
@@ -135,10 +139,8 @@
                         newHits.add(newHit);
                     }
                 }
+                event.put(ecalCollectionName, newHits, CalorimeterHit.class, flags, ecalReadoutName);
             }
-            int flags = 0;
-            flags += 1 << LCIOConstants.RCHBIT_TIME; //store cell ID
-            event.put(ecalCollectionName, newHits, CalorimeterHit.class, flags, ecalReadoutName);
         } else {
             ArrayList<RawCalorimeterHit> newHits = new ArrayList<RawCalorimeterHit>();
             if (event.hasCollection(CalorimeterHit.class, ecalCollectionName)) {
@@ -156,10 +158,8 @@
                         newHits.add(newHit);
                     }
                 }
+                event.put(rawCollectionName, newHits, RawCalorimeterHit.class, flags, ecalReadoutName);
             }
-            int flags = 0;
-            flags += 1 << LCIOConstants.RCHBIT_TIME; //store cell ID
-            event.put(rawCollectionName, newHits, RawCalorimeterHit.class, flags, ecalReadoutName);
         }
     }
 }
SVNspam 0.1