ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/TMISoftware/ErrorStream/runRecoStep.csh
Revision: 1.1
Committed: Mon Sep 17 11:16:30 2012 UTC (12 years, 7 months ago) by fantasia
Content type: application/x-csh
Branch: MAIN
CVS Tags: HEAD
Error occurred while calculating annotation data.
Log Message:
added

File Contents

# Content
1 #!/bin/tcsh
2 #Script to Analyze Error Stream Events
3 #Sylvia Lewin, January 2012
4 #Compiled from scripts by Edgar Carrera, Conor Henderson, Giovanni Petrucianni, Halil Gamsizkan, and others
5 #Last edited April 29, 2012
6
7 #NOTE: Check/edit MAINDIR, USER, ERA, DRIVERFILE, Exotica_Tag before running
8 # Make sure that DriverInfo.txt and HLTInfo.txt are in MAINDIR
9 # Make sure that current shell is tcsh
10
11 unset noclobber
12
13
14 set SCRAM_ARCH = "slc5_amd64_gcc462"
15 set filter = "0"
16 set hadd = "0"
17 set cleanup = "0"
18 set reco_release_bare = "CMSSW_5_2_6"
19 set reco_gt = "GR_P_V39::All"
20 set User = `whoami` #${CMSSW_USER}
21
22 set MAINDIR = "~"
23 set WorkDir = "/tmp/${User}"
24
25 #loop over HLT output files
26 foreach File (${MAINDIR}/Error/outputA*.root)
27 set FilenameBase = `basename $File .root`
28 set reco_file = "RECO_${FilenameBase}"
29
30 set CurrentRun=`echo $File | awk -F"." '{print $2}'`
31 set CurrentRun=`echo $CurrentRun | sed 's/^0*//'`
32 echo "CurrentRun for $File is $CurrentRun"
33
34 ########################
35 # run RECO
36 ########################
37
38 set reco_release = ${reco_release_bare}_RECO
39
40 cd ${WorkDir}
41
42 #sh ~/CMSSW_5_2_6_ONLINE/src/SetupOnline/setupEnv.sh #This should give us offline release
43 #setenv SCRAM_ARCH ${SCRAM_ARCH} #Cory: Needed?
44 #echo Using SCRAM_ARCH ${SCRAM_ARCH}
45 #scramv1 list CMSSW
46
47 echo "Setting up dir ${reco_release}"
48
49 if ( ! -d ${reco_release} ) then
50 scramv1 project -n ${reco_release} CMSSW ${reco_release_bare}
51 endif
52
53 cd ${reco_release}/src
54 eval `scramv1 runtime -csh` #cmsenv
55
56 echo $reco_file.root
57
58 if ( ! -e $reco_file.root ) then #Only do this if output doesn't exist
59
60
61 echo "Running Reco cmsDriver Command ..."
62 set cmsDriverCmd = "cmsDriver.py reco -s RAW2DIGI,RECO --data --filein file:${File} --fileout ${reco_file}.root --conditions ${reco_gt} --no_exec --number=-1"
63 echo $cmsDriverCmd
64 ${cmsDriverCmd} >& /dev/null
65
66 mv reco_RAW2DIGI_RECO.py ${reco_file}.py
67 #edit RECO file: Cory: DO I still need to put in fix for SiStrip error
68
69 echo "# override the GlobalTag, connection string and pfnPrefix" >> ${reco_file}.py
70 echo "if 'GlobalTag' in process.__dict__:" >> ${reco_file}.py
71 echo " process.GlobalTag.connect = 'frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'" >> ${reco_file}.py
72 echo " process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://FrontierProd/')" >> ${reco_file}.py
73
74 echo "Running Reco ..."
75 echo "cmsRun ${reco_file}.py"
76 cmsRun ${reco_file}.py >& ${reco_file}.log
77
78 endif #Skip to here if reco done
79
80 #######################
81 ## Print event displays
82 #######################
83
84 #if ( ! -e .root ) then #Already converted, skip
85 cmsShow --auto-save-all-views ${reco_file} --input-file ${reco_file}.root
86 # -c [ --config-file ] arg Include configuration file
87
88 #endif #Skip to here if evt displays done
89
90
91 end #End loop over file directories
92
93
94 ##################
95
96 exit 0