Project

General

Profile

redmine_issue_stop_timeouts.sh

John Freeman, 08/22/2017 01:55 PM

 
1

    
2
artdaq_demo_installation=$1
3

    
4

    
5
if [[ "$HOSTNAME" != woof.fnal.gov ]]; then
6
    echo "This script is meant to be run on woof" >&2
7
    return
8
fi
9

    
10
if [[ ! -e $artdaq_demo_installation ]]; then 
11
    echo "Unable to find artdaq-demo installation in directory \"$artdaq_demo_installation\"" >&2
12
    return
13
fi
14

    
15
if [[ -n $( ls -1 ) ]]; then 
16
    echo "You need to be in an empty directory to run this script" >&2
17
    return
18
fi
19

    
20
git clone http://cdcvs.fnal.gov/projects/artdaq-utilities-daqinterface
21

    
22
mkdir run_records
23
record_directory=$PWD/run_records
24

    
25
cd artdaq-utilities-daqinterface
26

    
27
sed -i -r 's!^\s*productsdir_for_bash_scripts: .*!productsdir_for_bash_scripts: /products!' .settings
28

    
29
sed -i -r 's!^\s*record_directory: .*!record_directory: '$record_directory'!' .settings
30

    
31
sed -i -r 's!^\s*DAQ directory: .*!DAQ directory: '$artdaq_demo_installation'!' docs/config.txt
32

    
33
sed -i -r 's!^\s*config=.*!config="request_dataflow_windowmode"!' bin/just_do_it.sh
34

    
35
sed -i -r 's!^\s*$scriptdir/setdaqcomps.sh.*!$scriptdir/setdaqcomps.sh component01 component02!' bin/just_do_it.sh
36

    
37
cat <<EOF
38

    
39
To perform a run with one ToySimulator pushing fragments and a second
40
one waiting for requests, in two terminals, perform the following:
41

    
42
cd $PWD
43
. source_me
44

    
45
and then, in one terminal, do:
46

    
47
DAQInterface
48

    
49
and in the second terminal, do:
50

    
51
just_do_it.sh 10
52

    
53
...to run for 10 seconds. Details can be found at https://cdcvs.fnal.gov/redmine/projects/artdaq-utilities/wiki/Artdaq-daqinterface.
54

    
55
EOF
56