ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/scripts/setup.sh
Revision: 1.4
Committed: Tue Sep 30 22:01:31 2008 UTC (16 years, 7 months ago) by loizides
Content type: application/x-sh
Branch: MAIN
CVS Tags: Mit_004
Changes since 1.3: +22 -17 lines
Log Message:
Updated to use case statement and therefore better scale with different versions.

File Contents

# Content
1 #!/bin/bash
2 # $Id: setup.sh,v 1.3 2008/09/27 06:15:18 loizides Exp $
3
4 if test -z $CMSSW_VERSION; then
5 echo "Need cmssw project area setup!";
6 exit 1;
7 fi
8
9 majver=`echo $CMSSW_VERSION | cut -d_ -f 2`;
10 minver=`echo $CMSSW_VERSION | cut -d_ -f 3`;
11 patver=`echo $CMSSW_VERSION | cut -d_ -f 4`;
12 majver=`expr $majver \* 1000000`;
13 minver=`expr $minver \* 1000`;
14 version=`expr $majver + $minver`;
15 version=`expr $version + $patver`;
16
17 echo "Setup called for $CMSSW_VERSION ($version)";
18
19 cd $CMSSW_BASE/src;
20
21 if test $version -lt 20108; then
22 echo "Nothing to be done, exiting";
23 exit 1;
24 fi
25
26 case $version in
27 (2001008 | 2001009)
28
29 cvs co -r V01-06-02 CondFormats/JetMETObjects;
30 cvs co -r V01-08-03 JetMETCorrections/Configuration;
31 cvs co -r V02-09-00 JetMETCorrections/Modules;
32 #to remove annoying Warning messages for the jet to vertex associator.
33 cvs co JetMETCorrections/JetVertexAssociation;
34 TMP=`mktemp`;
35 cat JetMETCorrections/JetVertexAssociation/src/JetVertexMain.cc |
36 sed -e 's/else std::cout << \"\[Jets\] JetVertexAssociation: Warning\! problems for Algo = 2: possible division by zero ..\" << std::endl;//' > $TMP;
37 mv $TMP JetMETCorrections/JetVertexAssociation/src/JetVertexMain.cc
38 ;;
39 *)
40 echo "Nothing known about this version, exiting";
41 exit 1;
42 ;;
43 esac
44
45 echo "Setup done; you probably want to compile your project area now";