Jpp  17.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
archive-get-Detector.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
14 
15 if do_usage $*; then
16  usage "$script <archive> <detector file> <run> [variant]"\
17  "\nGet \"pcal\", \"ccal\", tripod, transmitter and hydrophone data from archive and accordingly update detector."
18 fi
19 
20 case $# in
21  4) set_variable VARIANT $argv[4];&
22  3) set_variable RUN $argv[3];
25  *) fatal "Wrong number of arguments.";;
26 esac
27 
28 eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
29 
30 CHECK_EXIT_CODE
31 
32 function clean()
33 {
34  rm -f $WORKDIR/{p,c}cal.txt
35  rm -f $WORKDIR/{tripod,transmitter,hydrophone}.txt
36 }
37 
38 clean
39 
40 for KEY in pcal ccal tripod transmitter hydrophone; do
41  getFile.sh $ARCHIVE $DETECTOR_ID $RUN $KEY $VARIANT $WORKDIR/$KEY
42 done
43 
44 JEditDetector \
45  -a $DETECTOR \
46  -o $DETECTOR \
47  -M "-1 set 0.0 0.0 0.0" \
48  -d $DEBUG
49 
50 JConstructDetector \
51  -a $DETECTOR \
52  -o $DETECTOR \
53  -f $WORKDIR/pcal.txt \
54  -d $DEBUG
55 
56 JConstructDetector \
57  -a $DETECTOR \
58  -o $DETECTOR \
59  -f $WORKDIR/ccal.txt \
60  -d $DEBUG
61 
62 cp -p $WORKDIR/{tripod,transmitter,hydrophone}.txt ./
63 
64 clean
then usage $script< detector identifier >< startdate\"YYYY-MM-DDHH:MM:SS\"><finaldate\"YYYY-MM-DDHH:MM:SS\"><QA/QCfile> fi case set_variable QAQC_TXT $argv[4]
Definition: JDataMonitor.sh:24
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
exit
Definition: JPizza.sh:36
clean for KEY in pcal ccal tripod transmitter hydrophone
then echo
TFile * getFile(const std::string &file_name, const std::string &option="exist")
Get TFile pointer corresponding to give file name.
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
case $OPTION in clean clean
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR if do_usage *then usage $script[(input file)+] fi set_variable DEBUG set_variable WORKDIR TMPDIR
then usage $script< archive >< detectorfile >< run > nGet pcal
then rm i $OUTPUT_FILE fi let RUN
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
Definition: JLegolas.sh:20
* usage
then JConvertDetectorFormat a $DETECTOR[1] o
source $JPP_DIR setenv sh $JPP_DIR ARCHIVE
Definition: archive.sh:5
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then JCalibrateToT a
Definition: JTuneHV.sh:116
then set_variable MODULE getModule a $DETECTOR L $STRING $FLOOR JEditDetector a $DETECTOR M $MODULE add $X o $DETECTOR else echo No update of detector $DETECTOR
then display $WORKDIR
Definition: plot-Domino.sh:128
then cp
$WORKDIR ev_configure_domsimulator txt echo process $DOM_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DOM_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
set_variable DETECTOR
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 JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
script
Definition: JAcoustics.sh:2
then usage $script< archive >< detectorfile >< run > nGet ccal
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
then usage $script< archive >< detectorfile >< run > nGet tripod
esac done
Definition: JAddHDE.sh:21
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62
&set_variable VARIANT
Definition: JDetector.sh:30