lcsim/src/org/lcsim/recon/cluster/density
diff -N PFlow.java
--- PFlow.java 12 Dec 2005 05:29:11 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,101 +0,0 @@
-
-package org.lcsim.recon.cluster.density;
-
-import hep.aida.*;
-import org.lcsim.util.aida.AIDA;
-import org.lcsim.event.EventHeader;
-import java.io.File;
-import java.io.IOException;
-
-// org.lcsim drivers
-import org.lcsim.util.Driver;
-import org.lcsim.util.loop.LCIODriver;
-import org.lcsim.recon.cluster.util.CalHitMapDriver;
-import org.lcsim.mc.fast.tracking.MCFastTracking;
-import org.lcsim.recon.muon.MuonReco;
-import org.lcsim.recon.cluster.cheat.CheatClusterDriver;
-import org.lcsim.util.loop.LCSimLoop;
-
-public class PFlow extends Driver {
-
- public static void main(String [] args) throws Exception{
-
- if(args.length==0) help();
-
- // Setup LCSim event loop
- LCSimLoop loop = new LCSimLoop();
-
- // setup input/outfile files
- File input = new File(args[0]);
- loop.setLCIORecordSource(input);
-
- // drivers needed
- PFlow pflow = new PFlow();
- loop.add( pflow );
-
-// ModeDetection anal2 = new ModeDetection(_tf,_tree);
-// Canny anal3 = new Canny(_tf,_tree);
-
- // last driver, if output is needed
-// loop.add( new LCIODriver( new File("output.slcio") );
-
- System.out.println("Starting loop over events");
- loop.loop(20); // -1 for all
-
- loop.dispose();
- org.lcsim.util.aida.AIDA.defaultInstance().saveAs("myhistos.aida");
- System.out.println("Analyzed "+ pflow._nevt +" events.");
- }
-
- public void process(final EventHeader evt) {
- // event counter
- ++_nevt;
- System.out.println("\n###### Event "+_nevt+" #####");
-
- // subdrivers processing
- if(_calhit!=null) _calhit.setEvent(evt);
- super.process(evt);
- }
-
- private static void help(){
- System.out.println("Usage:");
- System.out.println(" java "+PFlow.class.getName()+" <input-file>");
- System.exit(1);
- }
-
- public PFlow() throws IOException{
- // select one...
-// _calhit = LoadMyCalorimeterHit.getInstance();
- add( new CalHitMapDriver() );
-
-// // add subdrivers
-// add( new CheatClusterDriver() );
-// add( new DirectedTreeClusterer() );
-
- add( new MCFastTracking() );
-// add(new MuonReco(0,1,12));
- add(new MuonReco(0,1,0));
-
-// add(new TrackMatching());
-
-// add( new DTreeAnalysis() );
- }
-
- public void prepareNtupleFactory() throws IOException{
- _aida = AIDA.defaultInstance();
-
-// _tree=af.createTreeFactory().create("canny-test2.aida","xml",false,true);
- _tree = _aida.tree();
- _tf = _aida.analysisFactory().createTupleFactory(_tree);
- }
-
- //=== FIELDS ====
-
- private static AIDA _aida;
- private static ITree _tree;
- private static ITupleFactory _tf;
-
- private int _nevt = 0;
- private LoadMyCalorimeterHit _calhit;
- private DTreeAnalysis _lyze;
-}