Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
file-Tuna.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 # ------------------------------------------------------------------------------------------
5 #
6 # Auxiliary script to file test-Tuna.sh input parameters.
7 #
8 # ------------------------------------------------------------------------------------------
9 
10 if [ -z $JPP_DIR ]; then
11  echo "Variable JPP_DIR undefined."
12  exit
13 fi
14 
15 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
16 
17 set_variable DEBUG ${DATABASE_DEBUG:-2}
18 set_variable WORKDIR ${DATABASE_WORKDIR:-/tmp/}
19 set_variable NUMBER_OF_ENTRIES ${DATABASE_NUMBER_OF_ENTRIES:-1000}
20 set_variable NUMBER_OF_OUTLIERS ${DATABASE_NUMBER_OF_OUTLIERS:-5}
21 
22 if ( do_usage $* ); then
23  usage "$script <input file> <parameters file> [working directory]"
24 fi
25 
26 case $# in
30  *) fatal "Wrong number of arguments."
31 esac
32 
33 if [[ ! -f $PARAMETERS_FILE ]]; then
34 
35  JFileTuna \
36  -f $INPUT_FILE:\.\* \
37  -P $PARAMETERS_FILE \
38  -N $NUMBER_OF_ENTRIES \
39  -O $NUMBER_OF_OUTLIERS \
40  \
41  -Y ".* 0.1" \
42  \
43  -D "Power_Measurement_TEMP_LVL 200.0" \
44  -D "Power_Measurement 2.0" \
45  -D "TEMP 20.0" \
46  -D "temp 20.0" \
47  -D "HUMID 20.0" \
48  -D "humid 20.0" \
49  -D "run_number 1.0e6" \
50  -D "pmt_highvolt@ 1.0" \
51  -D "pmt_threshold@ 0.01" \
52  -D "pwr_meas\[9\] 100.0" \
53  -D "pwr_meas\[10\] 200.0" \
54  -D "pwr_meas\[12\] 10.0" \
55  -D "pwr_meas 5.0" \
56  -D "ahrs 3.0" \
57  -D "acdc_volt 3.0" \
58  -D "edfa_pumpdc 5.0e3" \
59  -D "bps_iback 2.5" \
60  -D "wr_mu 1.0e3" \
61  -D "rx_input_power 5.0" \
62  -D ".* 0.0" \
63  \
64  -d $DEBUG --!
65 else
66  notice "File $PARAMETERS_FILE exists; remove to overwrite."
67 fi
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
exit
Definition: JPizza.sh:36
&set_variable INPUT_FILE
Definition: JLegolas.sh:30
then JPizza f
Definition: JPizza.sh:46
then echo
&set_variable PARAMETERS_FILE
Definition: file-Tuna.sh:28
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
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
Definition: JLegolas.sh:28
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
then $DIR JPlotNPE PDG P
Definition: JPlotNPE-PDG.sh:60
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62