Print

Print


Author: [log in to unmask]
Date: Tue Mar  3 08:59:58 2015
New Revision: 3566

Log:
Terminate loop after writing requested number of events

Modified:
    projects/lcsim/trunk/analysis/src/main/java/org/lcsim/analysis/StripIdrupEvent.java

Modified: projects/lcsim/trunk/analysis/src/main/java/org/lcsim/analysis/StripIdrupEvent.java
 =============================================================================
--- projects/lcsim/trunk/analysis/src/main/java/org/lcsim/analysis/StripIdrupEvent.java	(original)
+++ projects/lcsim/trunk/analysis/src/main/java/org/lcsim/analysis/StripIdrupEvent.java	Tue Mar  3 08:59:58 2015
@@ -51,6 +51,14 @@
         if (skipEvent) {
             throw new Driver.NextEventException();
         }
+        
+        if(_numberWritten >= _numberToWrite)
+        {
+            System.out.println("Wrote "+_numberWritten+" events of idrup= "+_idrupToWrite);
+            System.out.println("Exiting...");
+            throw new Driver.AbortRunException();
+        }
+        
     }
 
     public void setDebug(boolean debug)

########################################################################
Use REPLY-ALL to reply to list

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