Print

Print


Commit in lcsim/src/org/lcsim/digisim on MAIN
Digitizer.java+7-101.9 -> 1.10
GL: DigiSim histos go to directories named according to the digitizers.

lcsim/src/org/lcsim/digisim
Digitizer.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- Digitizer.java	2 Aug 2005 17:18:02 -0000	1.9
+++ Digitizer.java	12 Aug 2005 21:21:34 -0000	1.10
@@ -17,13 +17,14 @@
 
 import org.lcsim.util.aida.AIDA;
 import hep.aida.ICloud1D;
+import hep.aida.ITree;
 
 /**
  * A subdetector digitizer.  This class manages the digitization
  * simulation process for a specific subdetector.
  *
  * @author Guilherme Lima
- * @version $Id: Digitizer.java,v 1.9 2005/08/02 17:18:02 tonyj Exp $
+ * @version $Id: Digitizer.java,v 1.10 2005/08/12 21:21:34 lima Exp $
  */
 class Digitizer {
 
@@ -320,20 +321,13 @@
 
 //      System.out.println("\n*** Digitizer "+_name+": init() called");
 	assert modifiers.size()>0 : "No modifiers provided.";
+	_tree = AIDA.defaultInstance().tree();
+	_tree.mkdir( this.getName() );
 
 	_nRun = 0;
 	_nEvt = 0;
 	_selector = new CellSelector(_inputColl);
 
-	// make sure there is a global instance for this type of modifier
-// 	System.out.println("modifiers available: "
-// 	     + AbstractCalHitModifier._modifiersAvailable.size());
-// 	for( String modkey
-// 		 : AbstractCalHitModifier._modifiersAvailable.keySet() ) {
-// 	    System.out.println( " mod key="+ modkey +", value="
-// 		 + AbstractCalHitModifier._modifiersAvailable.get(modkey) );
-// 	}
-
 	// Create all modifiers needed.  For each one, choose the appropriate
 	// modifier among the several modifiers available
 	int i = 0;
@@ -393,6 +387,7 @@
 
 	//*** Call processHits method for each modifier
 	AIDA aida = AIDA.defaultInstance();
+	_tree.cd( this.getName() );
 	for( CalHitModifier modifier : _modifs ) {
 	    modifier.processHits( tmpHits );
 	    String cname = ((AbstractCalHitModifier)modifier).getName();
@@ -403,6 +398,7 @@
 		cloud.fill( Math.log(hit.getTotalEnergy())*lntolog10 );
 	    }
 	}
+	_tree.cd("..");
 
 	// create output collections and append them to the LCEvent
 	Vector<RawCalorimeterHit> rawColl = new Vector<RawCalorimeterHit>();
@@ -474,4 +470,5 @@
 
     /** histograms container */
     private Map<String,ICloud1D> cloudMap = new HashMap<String,ICloud1D>();
+    ITree _tree = null;
 }
CVSspam 0.2.8