Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JTuna.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 # ------------------------------------------------------------------------------------------
5 #
6 # Auxiliary script to convert slow control data from database to ROOT TTree or TGraph's.
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/}
20 
21 if ( do_usage $* ); then
22  usage "$script <detector> <run> <output file> [option]"
23 fi
24 
25 case $# in
30  *) fatal "Wrong number of arguments."
31 esac
32 
33 JCookie.sh
34 
35 #typeset -Z 8 DETECTOR
36 typeset -Z 8 RUN
37 
38 set_variable OUTPUT_FILE ${OUTPUT_FILE/\%/${DETECTOR}}
40 
41 if [[ ! -f $OUTPUT_FILE ]]; then
42 
43  JTuna \
44  -D ${DETECTOR} \
45  -R "$RUN $RUN" \
46  -o ${OUTPUT_FILE} \
47  ${OPTION} \
48  -d ${DEBUG} --!
49 else
50  notice "File $OUTPUT_FILE exists; remove to overwrite."
51 fi
set_variable DETECTOR
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
exit
Definition: JPizza.sh:36
do set_array DAQHEADER JPrintDAQHeader f
Definition: JTuneHV.sh:79
then echo
then rm i $OUTPUT_FILE fi let RUN
&set_variable OUTPUT_FILE
do $DIR JTransitTime o
Definition: JTransitTime.sh:44
* usage
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:40
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:45
then usage $script< detector >< run >< outputfile > fi case set_variable OPTION
Definition: JTuna.sh:26
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:36
script
Definition: JAcoustics.sh:2
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
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62