Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:51

0001 #! /bin/bash
0002 
0003 function parse_HLT_schema() {
0004   # check input
0005   if [ $# != 1 ]; then
0006     echo 'parse_HLT_schema: wrong number of parameters' 1>&2
0007     return 1
0008   fi
0009 
0010   # default values
0011   Vx="v3"
0012   DB="$1"
0013 
0014   # parse the connection string [version/]database
0015   if [[ "$DB" =~ .*/.* ]]; then
0016     Vx=`echo "$DB" | cut -d/ -f1`
0017     DB=`echo "$DB" | cut -d/ -f2`
0018   fi
0019 
0020   echo "$Vx" "$DB"
0021 }
0022 
0023 function parse_HLT_menu() {
0024   # check input
0025   if [ $# != 1 ]; then
0026     echo 'parse_HLT_menu: wrong number of parameters' 1>&2
0027     return 1
0028   fi
0029 
0030   # default values
0031   Vx="v3"
0032   DB="run3"
0033   MENU="$1"
0034 
0035   # parse the connection string [[version/]database:]menu
0036   if [[ "$1" =~ .*:.*  ]]; then
0037     MENU=`echo "$1" | cut -d: -f2`
0038     DB=`echo "$1" | cut -d: -f1`
0039     if [[ "$DB" =~ .*/.* ]]; then
0040       Vx=`echo "$DB" | cut -d/ -f1`
0041       DB=`echo "$DB" | cut -d/ -f2`
0042     fi
0043   fi
0044 
0045   echo "$Vx" "$DB" "$MENU"
0046 }