Print

Print


Commit in lcsim/src/org/lcsim/digisim on MAIN
DigiSimMain.java+16-71.13 -> 1.14
GL: cleanup and improved javadoc

lcsim/src/org/lcsim/digisim
DigiSimMain.java 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- DigiSimMain.java	12 Dec 2005 04:48:19 -0000	1.13
+++ DigiSimMain.java	17 Jan 2006 17:59:12 -0000	1.14
@@ -22,14 +22,26 @@
  * The main driver for standalone digitization simulation
  *
  * @author Guilherme Lima
- * @version $Id: DigiSimMain.java,v 1.13 2005/12/12 04:48:19 lima Exp $
+ * @version $Id: DigiSimMain.java,v 1.14 2006/01/17 17:59:12 lima Exp $
  */
 public class DigiSimMain extends Driver {
 
+  /** Create a default DigiSim driver, with default configuration
+   */
   public DigiSimMain() {
       this( new String[0] );
   }
 
+  /** Create a DigiSim driver.
+      @param args an String[] array, possibly empty.<br>
+
+      If empty use default configuration file from detector .zip file,
+      via the conditions system.<br>
+
+      If argument is not empty, the first argument must be a
+      user-provided steering file to be used for DigiSim
+      configuration.
+  */
   public DigiSimMain(String[] args) {
 
     // instantiate all needed drivers
@@ -37,8 +49,7 @@
 
     if( args.length>0 ) {
 	// Config file given in CL.  Pass it to the driver
-	String name = args[0];
-	_digi = new DigiSimDriver(name);
+	_digi = new DigiSimDriver(args[0]);
     }
     else {
 	_digi = new DigiSimDriver();
@@ -95,7 +106,6 @@
 	    : "Discrepancy on EcalBarr: simE=" + simE
 	    + ", rawE=" + rawhit.getAmplitude() ;
       }
-
     }
     catch(IllegalArgumentException e) {
 	// no problem if data is not there
@@ -124,15 +134,14 @@
 
       // drivers needed
       DigiSimMain digimain = new DigiSimMain(args);
+      // debugging control
+      digimain.setDebug();
       loop.add( digimain );
 
       // output file
       File output = new File("digisim.slcio");
       loop.add( new LCIODriver(output) );
 
-      // debugging control
-      digimain.setDebug();
-
       // event loop
       loop.loop(10); // -1 for all
       loop.dispose();
CVSspam 0.2.8