Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…ne-software into eb-dev
  • Loading branch information
Nathan Baltzell committed Sep 1, 2017
2 parents 0143807 + 44a6641 commit 165de86
Show file tree
Hide file tree
Showing 78 changed files with 2,403 additions and 803 deletions.
18 changes: 8 additions & 10 deletions build-coatjava.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

mkdir -p coatjava
rm -f coatjava/lib/clas/jcsg-0.3.2.jar
cp -r bin coatjava/
cp -r etc coatjava/
mkdir -p coatjava/lib/clas
Expand All @@ -27,19 +28,9 @@ if [ $? != 0 ] ; then echo "common tools failure 2" ; exit 1 ; fi
cd -
cp common-tools/coat-lib/target/coat-libs*.jar coatjava/lib/clas/

### jcsg ###
export COATJAVA=$PWD/coatjava/
cd common-tools/clas-jcsg
./gradlew assemble
if [ $? != 0 ] ; then echo "jcsg failure" ; exit 1 ; fi
cd -
cp common-tools/clas-jcsg/build/libs/jcsg-0.3.2.jar coatjava/lib/clas/

### create local mvn repo containing coat-libs and jcsg ##
mvn deploy:deploy-file -Dfile=./common-tools/coat-lib/target/coat-libs-3.0-SNAPSHOT.jar -DgroupId=org.jlab.clas -DartifactId=common-tools -Dversion=0.0 -Dpackaging=jar -Durl=file:./myLocalMvnRepo/ -DrepositoryId=myLocalMvnRepo -DupdateReleaseInfo=true
if [ $? != 0 ] ; then echo "failed to create local mvn repo" ; exit 1 ; fi
mvn deploy:deploy-file -Dfile=./common-tools/clas-jcsg/build/libs/jcsg-0.3.2.jar -DgroupId=org.jlab.clas -DartifactId=clas-jcsg -Dversion=0.0 -Dpackaging=jar -Durl=file:./myLocalMvnRepo/ -DrepositoryId=myLocalMvnRepo -DupdateReleaseInfo=true
if [ $? != 0 ] ; then echo "failed to create local mvn repo" ; exit 1 ; fi

### dc (depends on jcsg) ###
cd reconstruction/dc
Expand Down Expand Up @@ -94,6 +85,13 @@ if [ $? != 0 ] ; then echo "htcc failure" ; exit 1 ; fi
cd -
cp reconstruction/htcc/target/clasrec-htcc-1.0-SNAPSHOT.jar coatjava/lib/services/

### cnd ###
cd reconstruction/cnd
mvn install
if [ $? != 0 ] ; then echo "cnd failure" ; exit 1 ; fi
cd -
cp reconstruction/cnd/target/clas12detector-cnd-1.0-SNAPSHOT.jar coatjava/lib/services/

### eb ###
cd reconstruction/eb
mvn install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,15 @@ public void open(String filename) {
}

public void open(ByteBuffer buff) {
// TODO Auto-generated method stub
try {
evioReader = new EvioCompactReader(buff);
currentEvent = 1;
currentFileEntries = evioReader.getEventCount()+1;
storeByteOrder = evioReader.getFileByteOrder();
// System.out.println("****** opened BUFFER [] ** NEVENTS = " + currentFileEntries + " *******");
} catch (EvioException ex) {
Logger.getLogger(EvioSource.class.getName()).log(Level.SEVERE, null, ex);
}
}

public void close() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void fillHipoEventLTCC(HipoDataEvent hipoEvent, EvioDataEvent evioEvent){
hipoBank.setByte("sector", i, (byte) evioBank.getInt("sector",i));
hipoBank.setByte("layer", i, (byte) evioBank.getInt("side",i));
hipoBank.setShort("component", i, (short) evioBank.getInt("segment",i));
hipoBank.setInt("ADC", i, evioBank.getInt("npheD", i)*100);
hipoBank.setInt("ADC", i, evioBank.getInt("adc", i));
hipoBank.setFloat("time", i, (float) evioBank.getDouble("time",i));
hipoBank.setShort("ped", i, (short) 0);
}
Expand Down Expand Up @@ -481,6 +481,23 @@ public void fillHipoEventECAL(HipoDataEvent hipoEvent, EvioDataEvent evioEvent){
}

public void fillHipoEventGenPart(HipoDataEvent hipoEvent, EvioDataEvent evioEvent){
// if(evioEvent.hasBank("Header::true")==true){
// EvioDataBank evioBank = (EvioDataBank) evioEvent.getBank("Header::true");
// HipoDataBank hipoBank = (HipoDataBank) hipoEvent.createBank("MC::Event", evioBank.rows());
// for(int i = 0; i < evioBank.rows(); i++){
// hipoBank.setShort("npart", i, (short) evioBank.getDouble("nParticles", i));
// hipoBank.setFloat("pbeam", i, (float) (evioBank.getDouble("beamPol", i)) );
// hipoBank.setShort("atarget", i, (short) (evioBank.getDouble("nNucleons", i)) );
// hipoBank.setShort("ztarget", i, (short) (evioBank.getDouble("nProtons", i)) );
// hipoBank.setFloat("ptarget", i, (float) (evioBank.getDouble("targetPol", i)) );
// hipoBank.setShort("btype", i, (short) (evioBank.getDouble("x", i)) );
// hipoBank.setFloat("ebeam", i, (float) (evioBank.getDouble("y", i)) );
// hipoBank.setShort("targetid", i, (short) (evioBank.getDouble("w", i)) );
// hipoBank.setShort("processid", i, (short) (evioBank.getDouble("Q2", i)) );
// hipoBank.setFloat("weight", i, (float) (evioBank.getDouble("nu", i)) );
// }
// if(evioBank.rows()>0) hipoEvent.appendBanks(hipoBank);
// }
if(evioEvent.hasBank("GenPart::true")==true){
EvioDataBank evioBank = (EvioDataBank) evioEvent.getBank("GenPart::true");
HipoDataBank hipoBank = (HipoDataBank) hipoEvent.createBank("MC::Particle", evioBank.rows());
Expand All @@ -495,6 +512,27 @@ public void fillHipoEventGenPart(HipoDataEvent hipoEvent, EvioDataEvent evioEven
}
if(evioBank.rows()>0) hipoEvent.appendBanks(hipoBank);
}
// if(evioEvent.hasBank("LundPart::true")==true){
// EvioDataBank evioBank = (EvioDataBank) evioEvent.getBank("LundPart::true");
// HipoDataBank hipoBank = (HipoDataBank) hipoEvent.createBank("MC::Lund", evioBank.rows());
// for(int i = 0; i < evioBank.rows(); i++){
// hipoBank.setByte("index", i, (byte) evioBank.getInt("index", i));
// hipoBank.setByte("charge", i, (byte) evioBank.getInt("charge", i));
// hipoBank.setByte("type", i, (byte) evioBank.getInt("type", i));
// hipoBank.setInt("pid", i, evioBank.getInt("pid", i));
// hipoBank.setByte("parent", i, (byte) evioBank.getInt("parent", i));
// hipoBank.setByte("daughter", i, (byte) evioBank.getInt("daughter", i));
// hipoBank.setFloat("px", i, (float) (evioBank.getDouble("px", i)/1000.0) );
// hipoBank.setFloat("py", i, (float) (evioBank.getDouble("py", i)/1000.0) );
// hipoBank.setFloat("pz", i, (float) (evioBank.getDouble("pz", i)/1000.0) );
// hipoBank.setFloat("vx", i, (float) (evioBank.getDouble("vx", i)) );
// hipoBank.setFloat("vy", i, (float) (evioBank.getDouble("vy", i)) );
// hipoBank.setFloat("vz", i, (float) (evioBank.getDouble("vz", i)) );
// hipoBank.setFloat("energy", i, (float) (evioBank.getDouble("energy", i)) );
// hipoBank.setFloat("mass", i, (float) (evioBank.getDouble("mass", i)) );
// }
// if(evioBank.rows()>0) hipoEvent.appendBanks(hipoBank);
// }
}

public HipoDataBank createHeaderBank(HipoDataEvent event, int nrun, int nevent, float torus, float solenoid){
Expand Down
169 changes: 0 additions & 169 deletions common-tools/clas-jcsg/build.gradle

This file was deleted.

2 changes: 0 additions & 2 deletions common-tools/clas-jcsg/gradle.properties

This file was deleted.

Binary file not shown.

This file was deleted.

Loading

0 comments on commit 165de86

Please sign in to comment.