ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/scripts/setup.sh
Revision: 1.18
Committed: Tue Mar 3 21:33:23 2009 UTC (16 years, 2 months ago) by bendavid
Content type: application/x-sh
Branch: MAIN
CVS Tags: Mit_008pre1
Changes since 1.17: +11 -23 lines
Log Message:
Setup script brought into the modern age, no hacks needed, but full JetMet corrections need some tags to get the latest numbers

File Contents

# User Rev Content
1 loizides 1.1 #!/bin/bash
2 bendavid 1.18 # $Id: setup.sh,v 1.17 2008/11/21 17:40:50 bendavid Exp $
3 loizides 1.1
4     if test -z $CMSSW_VERSION; then
5     echo "Need cmssw project area setup!";
6     exit 1;
7     fi
8    
9 loizides 1.14 export CVSROOT=:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW
10    
11 loizides 1.1 majver=`echo $CMSSW_VERSION | cut -d_ -f 2`;
12     minver=`echo $CMSSW_VERSION | cut -d_ -f 3`;
13     patver=`echo $CMSSW_VERSION | cut -d_ -f 4`;
14 loizides 1.4 majver=`expr $majver \* 1000000`;
15     minver=`expr $minver \* 1000`;
16 loizides 1.1 version=`expr $majver + $minver`;
17     version=`expr $version + $patver`;
18    
19     echo "Setup called for $CMSSW_VERSION ($version)";
20    
21     cd $CMSSW_BASE/src;
22    
23 paus 1.6 if test $version -lt 2001008; then
24 loizides 1.1 echo "Nothing to be done, exiting";
25     exit 1;
26     fi
27    
28 loizides 1.4 case $version in
29 bendavid 1.18 (2002004 | 2002005)
30 sixie 1.5
31 loizides 1.14 #to remove annoying warning messages for the jet to vertex associator.
32 bendavid 1.18 cvs co -r $CMSSW_VERSION JetMETCorrections/JetVertexAssociation;
33 loizides 1.4 TMP=`mktemp`;
34     cat JetMETCorrections/JetVertexAssociation/src/JetVertexMain.cc |
35     sed -e 's/else std::cout << \"\[Jets\] JetVertexAssociation: Warning\! problems for Algo = 2: possible division by zero ..\" << std::endl;//' > $TMP;
36     mv $TMP JetMETCorrections/JetVertexAssociation/src/JetVertexMain.cc
37 sixie 1.7
38 bendavid 1.18 #Tags required for Summer08 redigi-rereco and Winter09 FastSim JetMetCorrections
39     cvs co -r V01-07-02 CondFormats/JetMETObjects
40     cvs co -r V01-08-13 JetMETCorrections/Configuration
41     cvs co -r V02-09-02 JetMETCorrections/Modules
42     cvs co -r V01-08-00 JetMETCorrections/Algorithms
43    
44     #needed for JetPlusTracks and associated corrections
45     cvs co -r V01-04-03 RecoJets/JetAssociationAlgorithms
46 sixie 1.7
47 loizides 1.4 ;;
48     *)
49     echo "Nothing known about this version, exiting";
50     exit 1;
51     ;;
52     esac
53    
54 paus 1.6 if test -z $MIT_VERS; then
55 loizides 1.12 echo
56     echo "Warning: Production setup not executed since \$MIT_VERS is not setup."
57     echo
58 paus 1.6 else
59 loizides 1.12 echo
60 paus 1.6 echo "Entering production setup. Looking for MIT_VERS: $MIT_VERS dependencies."
61 loizides 1.12 echo
62 paus 1.6 case $MIT_VERS in
63     005)
64     MitAna/scripts/setup-pixelLessTracking.sh
65     ;;
66     *)
67     echo "Nothing special to be done for this version";
68     ;;
69     esac
70     fi
71    
72 loizides 1.1 echo "Setup done; you probably want to compile your project area now";