All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
make_sam_wrapper.sh
Go to the documentation of this file.
1 #! /bin/bash
2 
3 #------------------------------------------------------------------
4 #
5 # Purpose: Generate a sam wrapper fcl file.
6 #
7 # Usage: make_sam_wrapper.sh <job-fcl> <project-url> <consumer-process-id>
8 #
9 # Notes:
10 #
11 # 1. This script is invoked with three positional arguments, all
12 # of which are required.
13 #
14 # 2. The wrapper fcl file is written to standard output. This
15 # output should normally be captured to a file.
16 #
17 # Created: H. Greenlee, 30-Jul-2013
18 #
19 #------------------------------------------------------------------
20 
22 prjurl=''
23 cpid=''
24 
25 if [ $# -ne 3 ]; then
26  echo "Usage: make_sam_wrapper.sh <job-fcl> <project-url> <consumer-process-id>" >&2
27  exit 1
28 fi
29 jobfcl=$1
30 prjurl=$2
31 cpid=$3
32 
33 cat <<EOF
34 #include "${jobfcl}"
35 
36 services.user.IFDH:
37 {
38  IFDH_BASE_URI: "http://samweb.fnal.gov:8480/sam/sbnd/api"
39 }
40 
41 services.user.CatalogInterface:
42 {
43  service_provider: "IFCatalogInterface"
44  webURI: "${prjurl}"
45 }
46 
47 services.user.FileTransfer:
48 {
49  service_provider: "IFFileTransfer"
50 }
51 
52 source.fileNames: [ "${cpid}" ]
53 
54 EOF
BEGIN_PROLOG triggeremu_data_config_icarus settings PMTADCthresholds sequence::icarus_stage0_multiTPC_TPC physics sequence::icarus_stage0_EastHits_TPC physics sequence::icarus_stage0_WestHits_TPC physics producers purityana0 caloskimCalorimetryCryoE physics caloskimCalorimetryCryoW physics sequence::physics pathW services
do source
then shift fi