Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:46

0001 #!/bin/bash
0002 
0003 ####################################################
0004 #                                                  #
0005 #Author:  Adam Roe, Northeastern University        #
0006 #Contact: Adam.Roe@cern.ch, Oana.Boeriu@cern.ch    #
0007 #Date:    November, 2006                           #
0008 #                                                  #
0009 ####################################################
0010 
0011 #this is for the "automated" processing of calibration runs. 
0012 #it will copy a run from castor, process it using the Analyzer,
0013 #run the root macro over it, and put it on the web. 
0014 #the only input it needs is the files to run over. 
0015 
0016 #enter " eval `scramv1 runtime -csh` " from src directory
0017 #source exec.sh ### before processing
0018 
0019 #Copies all runs from castor directory
0020 nsls /castor/cern.ch/cms/emuslice/2006/ > Runs.txt 
0021 #takes all crosstalk runs
0022 grep -e PulseDAC Runs.txt > AllNoiseRuns.txt 
0023 #filters for only the main file from each run
0024 grep -e "RUI" AllNoiseRuns.txt > GoodNoiseRuns_.txt
0025 #grep -e "csc_00000102_EmuRUI01_CFEB_PulseDAC_000.raw" GoodNoiseRuns_.txt > GoodNoiseRuns.txt
0026 grep -e ".raw" GoodNoiseRuns_.txt > GoodNoiseRuns.txt
0027 
0028 echo " ";
0029 echo "will process runs: ";
0030 cat GoodNoiseRuns.txt;
0031 echo " ";
0032 
0033 #for each file in GoodNoiseRuns, execute the following process
0034 cat GoodNoiseRuns.txt | while read line 
0035 do 
0036   #copy to /tmp/cscclaib directory
0037   rfcp "/castor/cern.ch/cms/emuslice/2006/$line" "/tmp/csccalib/$line";
0038   #create a config file using the perl script
0039   perl ConfigChanges.pl "/tmp/csccalib/$line";
0040   perl CreateConfigNoise.pl "/tmp/csccalib/$line";
0041   #execute the the analyzer using the newly create config file. 
0042   # .root file will go into /tmp/csccalib
0043   cmsRun CSCmatrix.cfg;
0044   ls -l "/tmp/csccalib/";
0045   #remove .raw file from from /tmp/csccalib
0046   #rm "/tmp/csccalib/$line";
0047   #execute root macro. this will automatically take whatever file is in /tmp/csccalib
0048   #as it's input, so there should only be the new root file, nothing else. 
0049   #the root file will put it's image output into /afs/cern.ch/cms/CSC/html/csccalib/images/xxx
0050   #see the macro for more information. 
0051   root noiseMatrixMacro.C;
0052   #clean out the /tmp/cscclaib directory. 
0053   rm /tmp/csccalib/csc*;
0054 done
0055 
0056 #clean out run files from current directory
0057 rm Runs.txt
0058 rm AllNoiseRuns.txt 
0059 rm GoodNoiseRuns_.txt
0060 rm GoodNoiseRuns.txt
0061 
0062 #go into public and exec the perl script for web display
0063 cd /afs/cern.ch/cms/CSC/html/csccalib
0064 perl CreateTree_Items.pl 
0065 cd -
0066