1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash
### simple script to add information to the database. takes three arguments: the name of the calib.dat file (full path pls), the run number, and calibration type, GainCalibration, SCurve, or PixelAlive
filename=$1
runnumber=$2
calibtype=$3
if [ "$calibtype" != "SCurve" ] && [ "$calibtype" != "GainCalibration" ] && [ "$calibtype" != "PixelAlive" ];
then
echo "calib type must be either SCurve, GainCalibration, or PixelAlive"
exit 1
else
pixeltag="$calibtype"_default
oldrunnumber=PIXELRUNNUMBER # these should be identical to definition in inputfile
oldname=PIXELFILENAME #these should be identical to definition in inputfile
oldpixeltag=PIXELTAG #these should be identical to definition in inputfile
inputfile=${CMSSW_BASE}/src/CondTools/SiPixel/test/calibconfiguration_write_template_cfg.py
outputfile=`echo "dbinput_"$calibtype"_"$runnumber"_scripted_iov__cfg.py"`
rm -rf $outputfile
cat $inputfile | replace $oldname $filename $oldrunnumber $runnumber $oldpixeltag $pixeltag >$outputfile
echo "****** THIS IS THE INPUT FILE:"
echo ""
cat $outputfile
echo "****** starting DB fill:"
cmsRun $outputfile
echo "removing temporary files..."
fi
|