Skip to content

Commit

Permalink
Adding Ben's script to insert the Si calibration constants into the c…
Browse files Browse the repository at this point in the history
…alib DB. See issue #248
  • Loading branch information
AndrewEdmonds11 committed Feb 2, 2015
1 parent 4243eca commit cafed4c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions analyzer/rootana/scripts/insert_calib_si.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#! /bin/bash

RightChannels=( SiR{1_{1..4},2}-S )
RightGains=( 2.53 2.62 2.49 2.53 7.96 )
RightOffsets=( -87.97 -139.5 -30.2 -103.7 -182.99 )

LeftChannels=( SiL{1_{1..4},2}-S )
LeftGains=( 2.61 2.54 2.65 2.54 7.86 )
LeftOffsets=( -113.17 -52.19 -131.1 -84.29 -111.23 )

for run in $@;do
for i_channel in {0..4};do
echo "INSERT into Energy (run, channel, gain, offset) values ( $run, \"${RightChannels[$i_channel]}\", ${RightGains[$i_channel]}, ${RightOffsets[$i_channel]}) ;"
echo "INSERT into Energy (run, channel, gain, offset) values ( $run, \"${LeftChannels[$i_channel]}\", ${LeftGains[$i_channel]}, ${LeftOffsets[$i_channel]}) ;"
done
done

0 comments on commit cafed4c

Please sign in to comment.