Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:26

0001 #!/bin/bash
0002 ### 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
0003 
0004 filename=$1
0005 runnumber=$2
0006 calibtype=$3
0007 if [ "$calibtype" != "SCurve" ] && [ "$calibtype" != "GainCalibration" ] && [ "$calibtype" != "PixelAlive" ];
0008 then
0009 echo "calib type must be either SCurve, GainCalibration, or PixelAlive" 
0010 exit 1
0011 else
0012 pixeltag="$calibtype"_default
0013 oldrunnumber=PIXELRUNNUMBER  # these should be identical to definition in inputfile
0014 oldname=PIXELFILENAME  #these should be identical to definition in inputfile
0015 oldpixeltag=PIXELTAG #these should be identical to definition in inputfile
0016 inputfile=${CMSSW_BASE}/src/CondTools/SiPixel/test/calibconfiguration_write_template_cfg.py
0017 outputfile=`echo "dbinput_"$calibtype"_"$runnumber"_scripted_iov__cfg.py"`
0018 rm -rf $outputfile
0019 cat $inputfile | replace $oldname $filename $oldrunnumber $runnumber $oldpixeltag $pixeltag >$outputfile
0020 echo "****** THIS IS THE INPUT FILE:"
0021 echo ""
0022 cat $outputfile
0023 echo "****** starting DB fill:"
0024 cmsRun $outputfile
0025 echo "removing temporary files..."
0026 fi