Skip to content

Commit 8aad7dc

Browse files
author
bquilain
committed
Prepare shell files to help for launching jobs
1 parent 4b0c870 commit 8aad7dc

File tree

3 files changed

+11
-39
lines changed

3 files changed

+11
-39
lines changed

app/FitVertexLE.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ void loadSplines(){
492492
fSplines2 = fSplines;
493493
}
494494
else{
495-
fSplines = new TFile("timePDF_DRnew_Large.root","read");//To generate with my code ProduceWSPlots.c
496-
fSplines2 = new TFile("timePDF_Directionality.root","read");//To generate with my code ProduceWSPlots.c
495+
fSplines = new TFile("../inputs/timePDF_DRnew_Large.root","read");//To generate with my code ProduceWSPlots.c
496+
fSplines2 = new TFile("../inputs/timePDF_Directionality.root","read");//To generate with my code ProduceWSPlots.c
497497
}
498498
for(int pmtType=0;pmtType<nPMTtypes;pmtType++){
499499
//Load 1D t-tof splines

shell/Launcher.sh

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,14 @@
11
#!/bin/zsh +x
2-
#sleep 10m
3-
#TOTAL=$1
4-
#COUNTER=0
5-
#while [ $COUNTER -lt $TOTAL ]; do
6-
# echo Launch/RunMergerBNJ${i}.sh
7-
# qsub -eo -q all Launch/RunMergerBNJ${i}.sh
8-
# let COUNTER=COUNTER+1
9-
#done
10-
#neventPerFile=20
11-
neventPerFile=10
12-
#neventPerFile=100
13-
#neventPerFile=100
2+
neventPerFile=20
143
#for e in 3 4 5 6 8 10 15;do
15-
#for e in 4 5;do
16-
#for e in 3 4 5;do
17-
#for e in 6 8;do
18-
#for e in 10 15;do
19-
#for e in 6 8 10 15;do
20-
#for e in 3;do
21-
#for e in 3 4 5 6 8 10 15;do
22-
#for e in 3 4 5;do
234
for e in 10;do
24-
# for i in {0..0};do
255
for i in {0..999};do
26-
# for i in {0..10000};do
27-
# for i in {0..5000};do
28-
# echo $i
29-
# echo $neventPerFile
306
f=$((${i}/$neventPerFile))
317
q=$(($i - ${f}*${neventPerFile}))
32-
# echo $f
33-
# echo $q
348
if [ $q -eq 0 ];
359
then
3610
echo $i
37-
qsub -q all -e /disk01/usr5/bquilain/jobs2/fitLE_e${e}_start${i}.err -o /disk01/usr5/bquilain/jobs2/fitLE_e${e}_start${i}.log jobs/fitLE_e${e}_start${i}.sh
38-
# qsub -q all -e /disk01/usr5/bquilain/jobs2/fitLE_e${e}_start${i}.err -o /disk01/usr5/bquilain/jobs2/fitLE_e${e}_start${i}.log jobs/fitLE_e${e}_start${i}.sh
39-
# qsub -q all -e /disk01/usr5/bquilain/jobs2/inputs_e${e}_start${i}.err -o /disk01/usr5/bquilain/jobs2/inputs_e${e}_start${i}.log jobs/inputs_e${e}_start${i}.sh
40-
#-e /disk01/usr5/bquilain/jobs/ -o /disk01/usr5/bquilain/jobs/
11+
qsub -q all -e ${LEAFDIR}/jobs/fitLE_e${e}_start${i}.err -o ${LEAFDIR}/jobs/fitLE_e${e}_start${i}.log ${LEAFDIR}/jobs/fitLE_e${e}_start${i}.sh
4112
fi
4213
done
4314
done

shell/generateShell.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33
ofstream ShellFile(ShellName);
44
char * infilename = new char[512];
55
char * outfilename = new char[512];
6+
char * LEAFDIR = getenv("LEAFDIR");
67

7-
int nevents=1000;
8-
int neventsPerFile=10;
8+
int nevents=10000;
9+
int neventsPerFile=20;
910
for(int nrj=10;nrj<11;nrj++){
1011
//for(int nrj=3;nrj<16;nrj++){
11-
sprintf(infilename,"${LEAFDIR}/inputs/wcsim_hkhybridmpmt10pc14374100Hz_4.2kHzBL_e%d_center_nominal_fulltank_0hitstrigger_10000.root",nrj);
12+
sprintf(infilename,"%s/inputs/wcsim_hkhybridmpmt10pc14374100Hz_4.2kHzBL_e%d_center_nominal_fulltank_0hitstrigger_10000.root",LEAFDIR,nrj);
1213

1314
for(int startBin=0;startBin<nevents;startBin+=neventsPerFile){
14-
sprintf(ShellName,"${LEAFDIR}/jobs/fitLE_e%d_start%d.sh",nrj,startBin);
15-
sprintf(outfilename,"${LEAFDIR}/outputs/LEAF_test_%dMeV_tmp%d.root",nrj,startBin);
15+
sprintf(ShellName,"%s/jobs/fitLE_e%d_start%d.sh",LEAFDIR,nrj,startBin);
16+
sprintf(outfilename,"%s/outputs/LEAF_test_%dMeV_tmp%d.root",LEAFDIR,nrj,startBin);
1617

1718
ofstream ShellFile(ShellName);
1819
if(ShellFile){
1920
ShellFile<<"#!/bin/bash"<<endl;
20-
ShellFile<<Form("${LEAFDIR}/app/FitVertexLE -f %s -o %s -s %d -e %d",infilename,outfilename,startBin,startBin+neventsPerFile)<<endl;
21+
ShellFile<<Form("%s/app/FitVertexLE -f %s -o %s -s %d -e %d",LEAFDIR,infilename,outfilename,startBin,startBin+neventsPerFile)<<endl;
2122
}
2223
}
2324
}

0 commit comments

Comments
 (0)