Print

Print


Commit in hps-java/src/main/java/org/lcsim/hps/evio on MAIN
MCRawDataToEvio4Converter.java+12-81.3 -> 1.4
add print out of total events written

hps-java/src/main/java/org/lcsim/hps/evio
MCRawDataToEvio4Converter.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- MCRawDataToEvio4Converter.java	22 Mar 2012 22:03:35 -0000	1.3
+++ MCRawDataToEvio4Converter.java	25 Mar 2012 07:26:45 -0000	1.4
@@ -39,13 +39,7 @@
  * @author Jeremy McCormick <[log in to unmask]>
  */
 public class MCRawDataToEvio4Converter extends Driver {
-    
-    String evioOutputFile = "MCRawData.evio";
-    EventWriter writer;
-    
-    String rawTrackerHitCollectionName = "RawTrackerHitMaker_RawTrackerHits";
-    String rawCalorimeterHitCollectionName = "EcalRawHits";    
-
+        
     // These correspond to ROC (readout crate) IDs from the DAQ system.
     public static final int ecalTopBankTag = 0x1;
     public static final int ecalBottomBankTag = 0x2;
@@ -59,6 +53,14 @@
     public static final int trackerBankNumber = 1;
     public static final int ecalBankNumber = 2;
     
+    String evioOutputFile = "MCRawData.evio";
+    EventWriter writer;
+    
+    String rawTrackerHitCollectionName = "RawTrackerHitMaker_RawTrackerHits";
+    String rawCalorimeterHitCollectionName = "EcalRawHits";    
+
+    private int eventsWritten = 0;
+    
     public MCRawDataToEvio4Converter() 
     {}
     
@@ -84,6 +86,7 @@
     }
     
     public void endOfData() {
+        System.out.println("wrote " + eventsWritten + " events");
         try {
             writer.close();
         } catch (EvioException e) {
@@ -110,6 +113,7 @@
         builder.setAllHeaderLengths();
         try {
             writer.writeEvent(builder.getEvent());
+            ++eventsWritten;
         } catch (EvioException e) {
             throw new RuntimeException(e);
         } catch (IOException e) {
@@ -121,7 +125,7 @@
 
         int dataSize = rawTrackerHits.size();
         
-        System.out.println("writeRawTrackerHits will write " + dataSize + " hits");
+        //System.out.println("writeRawTrackerHits will write " + dataSize + " hits");
                                              
         CompositeData.Data data = new CompositeData.Data();       
         data.addN(dataSize);     
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1