Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:51

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 Connectivity Runs.txt > AllConnectivityRuns.txt 
0023 #filters for only the main file from each run
0024 grep -e "RUI" AllConnectivityRuns.txt > GoodConnectivityRuns_.txt
0025 grep -e ".raw" GoodConnectivityRuns_.txt > GoodConnectivityRuns.txt
0026 
0027 echo " ";
0028 echo "will process runs: ";
0029 cat GoodConnectivityRuns.txt;
0030 echo " ";
0031 
0032 #for each file in GoodConnectivityRuns, execute the following process
0033 cat GoodConnectivityRuns.txt | while read line 
0034 do 
0035   #copy to /tmp/cscclaib directory
0036   rfcp "/castor/cern.ch/cms/emuslice/2006/$line" "/tmp/csccalib/$line";
0037   #create a config file using the perl script
0038   perl ConfigChanges.pl "/tmp/csccalib/$line";  
0039   perl CreateConfigConnectivity.pl "/tmp/csccalib/$line";
0040   #execute the the analyzer using the newly create config file. 
0041   # .root file will go into /tmp/csccalib
0042   cmsRun CSCCFEBConnect.cfg;
0043   ls -l "/tmp/csccalib/";
0044   #remove .raw file from from /tmp/csccalib
0045   rm "/tmp/csccalib/$line";
0046   #execute root macro. this will automatically take whatever file is in /tmp/csccalib
0047   #as it's input, so there should only be the new root file, nothing else. 
0048   #the root file will put it's image output into /afs/cern.ch/cms/CSC/html/csccalib/images/xxx
0049   #see the macro for more information. 
0050   root saturationMacro.C;
0051   #clean out the /tmp/cscclaib directory. 
0052   rm /tmp/csccalib/csc*;
0053 done
0054 
0055 #clean out run files from current directory
0056 rm Runs.txt
0057 rm AllConnectivityRuns.txt 
0058 rm GoodConnectivityRuns_.txt
0059 rm GoodConnectivityRuns.txt
0060 
0061 #go into public and exec the perl script for web display
0062 cd /afs/cern.ch/cms/CSC/html/csccalib
0063 perl CreateTree_Items.pl 
0064 cd -