Jpp  18.6.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
datalogs.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 
11 set_variable: DEBUG DATABASE_DEBUG 2
12 set_variable: WORKDIR DATABASE_WORKDIR `pwd`
13 
14 if do_usage $*; then
15  usage "$script <detector identifier> <run>[-<run>] [source [parameter]]"
16 fi
17 
18 case $# in
23  *) fatal "Invalid number of arguments."
24 esac
25 
26 set_variable DETID `getDetector -D $DETID -O string`
28 
29 SELECTOR=(
30  "detid=$DETID"
31  "minrun=${RUNS%%-*}"
32  "maxrun=${RUNS##*-}")
33 
34 if [[ -n "$SOURCE" ]]; then; SELECTOR+="source_name=$SOURCE"; fi
35 if [[ -n "$PARAMETER" ]]; then; SELECTOR+="parameter_name=$PARAMETER"; fi
36 
37 if [[ ! -f ${FILENAME}.gz ]]; then
38 
39  wget \
40  --load-cookies=$HOME/.km3netdb_cookie \
41  --secure-protocol=TLSv1_2 \
42  "https://km3netdbweb.in2p3.fr/streamds/datalogstrings.txt?${(j:&:)SELECTOR}" \
43  -O ${FILENAME}
44 
45  echo
46 
47  if (( $? == 0 )) && [[ `head ${FILENAME}` != "ERROR: "* ]]; then
48  gzip -v ${FILENAME}
49  else
50  fatal "wget error"
51  fi
52 fi
&set_variable SOURCE
Definition: datalogs.sh:20
then wget load cookies
Definition: datalogs.sh:40
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
exit
Definition: JPizza.sh:36
then usage $script< detector identifier >< run > fi case set_variable PARAMETER
Definition: datalogs.sh:19
then FILENAME
Definition: getLs.sh:62
then
Definition: datalogs.sh:34
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
Definition: JDBToolkit.hh:378
SELECTOR
Definition: datalogs.sh:34
then fatal Missing detector file $DETECTOR fi eval JPrintDetector a $DETECTOR O IDENTIFIER RUNS
const int n
Definition: JPolint.hh:786
then set_variable DETID
Definition: JEditTuneHV.sh:63
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
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
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
then fatal The output file must have the wildcard in the e g root fi 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:48
then eval ls $DIR $ID $TYPE _
Definition: getArchive.sh:108
data_type v[N+1][M+1]
Definition: JPolint.hh:866
then echo
Definition: JQAQC.sh:92
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
then getFile sh $JPP_ARCHIVE $DETECTOR_ID $RUNS[1] $KEY $VERSION $WORKDIR
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62