Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JDetector.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 script=${0##*/}
6 
7 # ------------------------------------------------------------------------------------------
8 #
9 # Utility script to generate KM3NeT reference detector.
10 #
11 # ------------------------------------------------------------------------------------------
12 
13 if [ -z $JPP_DIR ]; then
14  echo "Variable JPP_DIR undefined."
15  exit
16 fi
17 
18 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
19 
20 set_variable DETECTOR $JPP_DATA/km3net_reference.detx
21 set_variable NUMBER_OF_STRINGS 115
23 set_variable ID 1000
24 
25 if ( do_usage $* ); then
26  usage "$script [detector file [variant [identifier]]]"
27 fi
28 
29 case $# in
30  3) set_variable ID $3;&
33  0) ;;
34  *) fatal "Wrong number of arguments."
35 esac
36 
37 set_variable numberOfLines 115
38 set_variable numberOfFloors 18
39 set_variable floorDistance_m 36
40 set_variable heightOfFirstFloor_m 72
42 
43 if [[ -f $DETECTOR ]]; then
44  echo "Detector $DETECTOR aleady exists; remove to overwrite."
45  exit
46 fi
47 
48 JDetector \
49  -D $ID \
50  -V $VARIANT \
51  -@ "detectorType = $detectorType" \
52  -@ "numberOfLines = $numberOfLines" \
53  -@ "numberOfFloors = $numberOfFloors" \
54  -@ "floorDistance_m = $floorDistance_m" \
55  -@ "lineDistance_m = $lineDistance_m" \
56  -z $heightOfFirstFloor_m \
57  -f footprint.txt \
58  -o $DETECTOR -d 1 --!
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
set_variable DETECTOR
Definition: JLegolas.sh:31
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
exit
Definition: JPizza.sh:36
then JPizza f
Definition: JPizza.sh:46
then echo
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
* usage
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
&set_variable VARIANT
Definition: JDetector.sh:31