Print

Print


Commit in ExampleProject on MAIN
maven.xml+8added 1.1
project.properties+10added 1.1
project.xml+152added 1.1
src/ExampleDriver.java+30added 1.1
+200
4 added files
Add project to show how to build driver in netbeans using maven

ExampleProject
maven.xml added at 1.1
diff -N maven.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ maven.xml	25 Aug 2005 20:41:42 -0000	1.1
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project default="jar">
+<postGoal name="xdoc:register-reports">
+  <attainGoal name="maven-checkstyle-plugin:deregister"/>  
+  <attainGoal name="maven-license-plugin:deregister"/>
+</postGoal>
+</project>

ExampleProject
project.properties added at 1.1
diff -N project.properties
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ project.properties	25 Aug 2005 20:41:42 -0000	1.1
@@ -0,0 +1,10 @@
+# Sample ResourceBundle properties file
+
+maven.compile.source=1.5
+maven.compile.target=1.5
+maven.javadoc.source=1.5
+
+maven.repo.remote = http://www.ibiblio.org/maven,http://java.freehep.org/maven
+maven.jar.mainclass=HitPositionTest
+maven.javadoc.links=http://java.sun.com/j2se/1.5.0/docs/api/, http://java.freehep.org/lib/freehep/api/
+#maven.compile.deprecation=on

ExampleProject
project.xml added at 1.1
diff -N project.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ project.xml	25 Aug 2005 20:41:42 -0000	1.1
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <pomVersion>3</pomVersion>
+ <artifactId>ExampleProject</artifactId>
+ <groupId>lcsim</groupId>
+ <currentVersion>0.0</currentVersion>
+ <organization>
+  <name>SLAC</name>
+  <url>http://www.slac.stanford.edu</url>
+ </organization>
+ <description>Java based software for analysis and reconstruction of international linear collider data.</description>
+ <shortDescription>Example driver for org.lcsim</shortDescription>
+ <url>http://www.lcsim.org/software/lcsim</url>
+ <issueTrackingUrl>http://jira.slac.stanford.edu/secure/BrowseProject.jspa?id=10172</issueTrackingUrl>
+ <repository>
+  <connection>scm:cvs:pserver:[log in to unmask]:/cvs/lcd:ExampleProject</connection>
+ </repository>
+ <name>LCSim Example</name>
+ <package>org.lcsim.example</package>
+ <inceptionYear>2005</inceptionYear>
+ <dependencies>
+  <dependency>
+   <groupId>maven</groupId>
+   <artifactId>maven-scm-plugin</artifactId>
+   <version>1.5</version>
+   <url>http://www.ibiblio.org/maven</url>
+   <type>plugin</type>
+   </dependency>
+  <dependency>
+   <groupId>freehep</groupId>
+   <artifactId>freehep-jas-plugin</artifactId>
+   <version>1.0.2</version>
+   <url>http://java.freehep.org/freehep-jas-plugin</url>
+   <type>plugin</type>
+  </dependency>
+  <dependency>
+   <groupId>jdom</groupId>
+   <artifactId>jdom</artifactId>
+   <version>1.0</version>
+   <url>http://www.jdom.org/</url>
+  </dependency>
+  <dependency>
+   <groupId>jel</groupId>
+   <artifactId>jel</artifactId>
+   <version>0.9.10</version>
+   <url>http://galaxy.fzu.cz/JEL/</url>
+  </dependency>
+  <dependency>
+   <groupId>aida</groupId>
+   <artifactId>aida</artifactId>
+   <version>3.2.1</version>
+   <url>http://aida.freehep.org</url>
+  </dependency>
+  <dependency>
+   <groupId>aida</groupId>
+   <artifactId>aida-dev</artifactId>
+   <version>3.2.1</version>
+   <url>http://aida.freehep.org</url>
+  </dependency>
+  <dependency>
+   <groupId>freehep</groupId>
+   <artifactId>freehep-hep</artifactId>
+   <version>13032005</version>
+   <url>http://java.freehep.org</url>
+  </dependency>
+  <dependency>
+   <groupId>freehep</groupId>
+   <artifactId>freehep-base</artifactId>
+   <version>27012005</version>
+   <url>http://java.freehep.org</url>
+  </dependency>
+  <dependency>
+   <groupId>freehep</groupId>
+   <artifactId>freehep-physics</artifactId>
+   <version>13032005</version>
+   <url>http://java.freehep.org</url>
+  </dependency>
+  <dependency>
+   <groupId>freehep</groupId>
+   <artifactId>freehep-heprep</artifactId>
+   <version>02032005</version>
+   <url>http://java.freehep.org</url>
+  </dependency>
+  <dependency>
+   <groupId>freehep</groupId>
+   <artifactId>freehep-jheprep</artifactId>
+   <version>02032005</version>
+   <url>http://java.freehep.org</url>
+  </dependency>
+  <dependency>
+   <groupId>lcd</groupId>
+   <artifactId>sio</artifactId>
+   <version>1.0</version>
+   <url>http://java.freehep.org</url>
+  </dependency>
+  <dependency>
+   <groupId>lcsim</groupId>
+   <artifactId>GeomConverter</artifactId>
+   <version>0.6</version>
+   <url>http://www.lcsim.org</url>
+  </dependency>
+  <dependency>
+   <groupId>netbeans</groupId>
+   <artifactId>openide-lookup</artifactId>
+   <version>1.9-patched-1.0</version>
+   <url>http://aidatld.freehep.org</url>
+  </dependency>
+  <dependency>
+   <groupId>jas</groupId>
+   <artifactId>jas3</artifactId>
+   <version>0.8rc3</version>
+   <url>http://jas.freehep.org</url>
+  </dependency>
+  <dependency>
+   <groupId>commons-math</groupId>
+   <artifactId>commons-math</artifactId>
+   <version>1.0</version>
+   <type>jar</type>
+  </dependency>
+  <dependency>
+   <groupId>org.lcsim</groupId>
+   <artifactId>lcsim</artifactId>
+   <version>0.9</version>
+   <type>jar</type>
+  </dependency>
+ </dependencies>
+ <build>
+  <sourceDirectory>src</sourceDirectory>
+  <sourceModifications>
+   <sourceModification>
+    <className>fakeClass</className>
+    <excludes>
+     <exclude>org/lcsim/plugin/web/**</exclude>
+     <exclude>org/lcsim/contrib/**</exclude>
+    </excludes>
+   </sourceModification>
+  </sourceModifications>
+  <unitTestSourceDirectory>test</unitTestSourceDirectory>
+  <resources>
+   <resource>
+    <directory>src</directory>
+    <includes>
+     <include>org/lcsim/detector/**</include>
+     <include>PLUGIN-inf/plugins.xml</include>
+     <include>org/lcsim/**/*.menus</include>
+     <include>org/lcsim/plugin/web/**</include>
+    </includes>
+   </resource>
+  </resources>
+ </build>
+</project>
+

ExampleProject/src
ExampleDriver.java added at 1.1
diff -N ExampleDriver.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ExampleDriver.java	25 Aug 2005 20:41:44 -0000	1.1
@@ -0,0 +1,30 @@
+import org.lcsim.util.aida.AIDA;
+import hep.physics.vec.VecOp;
+import java.util.List;
+import org.lcsim.event.EventHeader;
+import org.lcsim.event.MCParticle;
+import org.lcsim.util.Driver;
+
+/**
+ * An example LCSim driver
+ * @author tonyj
+ */
+public class Analysis101 extends Driver
+{
+   private AIDA aida = AIDA.defaultInstance();
+   
+   protected void process(EventHeader event)
+   {
+      // Get the list of MCParticles from the event
+      List<MCParticle> particles = event.get(MCParticle.class,event.MC_PARTICLES);
+      // Histogram the number of particles per event
+      aida.cloud1D("nTracks").fill(particles.size());
+      // Loop over the particles
+      for (MCParticle particle : particles)
+      {
+         aida.cloud1D("energy").fill(particle.getEnergy());
+         aida.cloud1D("cosTheta").fill(VecOp.cosTheta(particle.getMomentum()));
+         aida.cloud1D("phi").fill(VecOp.phi(particle.getMomentum()));
+      }
+   }
+}   
CVSspam 0.2.8