Jpp  18.3.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Variables
archive-put-wiki-detectors.sh File Reference

Go to the source code of this file.

Variables

 script
 
then usage $script< detector
identifier >[< archive >
< version >] nAuxiliary script
to download official detectors
from wiki 
nOptionally
 
then usage $script< detector
identifier >[< archive >
< version >] nAuxiliary script
to download official detectors
from wiki the corresponding
JSON files are stored in the
archive with given version fi
case set_variable VERSION 
$argv [3]
 
*fatal Wrong number of
arguments esac set_variable
WIKI_HTML $WORKDIR wiki html
set_variable WIKI_TXT $WORKDIR
wiki txt set_variable DETID
getDetector D $DETID O string
typeset Z DETID 
if [[!-f $WIKI_HTML]]
 
then wget no check certificate user
 
do debug $__line__ echo
$__line__ read URL DETECTOR
RUNS 
RUNS
 
then wget no check certificate load cookies
 
do RUN1
 
 then
 
 RUN2 =99999999
 

Variable Documentation

script
Initial value:
=${0##*/}
source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
set_variable: DEBUG ARCHIVE_DEBUG 2
if do_usage $*
usr share Modules init zsh export TMPDIR
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
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
then fatal Timeout at user input fi set_variable SERVER JServerDB wget no check certificate q https
Definition: JCookie.sh:58
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62

Definition at line 2 of file archive-put-wiki-detectors.sh.

then usage $script<detector identifier> [<archive> <version>] nAuxiliary script to download official detectors from wiki nOptionally

Definition at line 13 of file archive-put-wiki-detectors.sh.

& set_variable DETID $argv[1]

Definition at line 13 of file archive-put-wiki-detectors.sh.

then if[["$ARCHIVE"!=""]]

Definition at line 19 of file archive-put-wiki-detectors.sh.

then wget no check certificate user
Initial value:
=km3net
--ask-password
-q
-O $WIKI_HTML
"$URL"
xmllint --html $WIKI_HTML |
awk 'BEGIN { RS = "</tr>"; FS = "</td>" }
{
if ($1 ~ "https://km3netdbweb.in2p3.fr/detx/") {
URL = gensub(".*href *= *\"([^\"]+)\".*", "\\1", "", $1)
DETECTOR = gensub(".*(KM3NeT_.*\\.detx|TBD).*", "\\1", "", $1)
RUNS = gensub("(<td>|,|<br>|\n)", " ", "g", $2)
print gensub("\\&amp;", "\\&", "g", URL), DETECTOR, RUNS
}
}' > $WIKI_TXT
while read __line__
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
do set_variable STRING_TXT awk

Definition at line 35 of file archive-put-wiki-detectors.sh.

do debug $__line__ echo $__line__ read URL DETECTOR RUNS RUNS
Initial value:
=(`echo $RUNS`)
notice "Processing $DETECTOR..."
if [[ "$DETECTOR" =~ "$DETID" ]]
then fatal Detector file should be binary format fi eval JPrintDetector a $DETECTOR O IDENTIFIER typeset a INPUT_FILES expand_array RUNS for RUN in $RUNS[*]
then echo
Definition: JQAQC.sh:90

Definition at line 65 of file archive-put-wiki-detectors.sh.

then wget no check certificate load cookies
Initial value:
=$HOME/.km3netdb_cookie
--secure-protocol=TLSv1_2
"$URL"
for RANGE in $RUNS[*]
then fatal Detector file should be binary format fi eval JPrintDetector a $DETECTOR O IDENTIFIER typeset a INPUT_FILES expand_array RUNS for RUN in $RUNS[*]
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:48
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 fatal Invalid detector identifier $DETECTOR_ID fi set_variable RUNSETUPID typeset a RANGE RANGE[1]

Definition at line 75 of file archive-put-wiki-detectors.sh.

RUN1
Initial value:
=${RANGE%%-*}
RUN2=${RANGE##*-}
if [[ "$RUN1" =~ "\.\." ]]
then fatal Invalid detector identifier $DETECTOR_ID fi set_variable RUNSETUPID typeset a RANGE RANGE[1]

Definition at line 83 of file archive-put-wiki-detectors.sh.

then

Definition at line 86 of file archive-put-wiki-detectors.sh.

RUN2 =99999999

Definition at line 87 of file archive-put-wiki-detectors.sh.