As a preliminary step, we make sure our environment variables are set, as in the following .cshrc file:
setenv SCRAM_ARCH slc3_ia32_gcc323
setenv GROUP_DIR /afs/cern.ch/group/zh
setenv CMS_SYS i386_linux24
source /afs/cern.ch/cms/sw/cmsset_default.csh
source $GROUP_DIR/group_env.csh
setenv CVSROOT :pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW
setenv ROOTSYS /cern/root
set path=($ROOTSYS/bin $path)
setenv LD_LIBRARY_PATH /cern/root/lib
We then set up a new project area:
$ scramv1 project CMSSW CMSSW_1_1_0
Creating a developer area based on project CMSSW, version CMSSW_1_1_0
Getting project release area....
Checking SCRAM version....
...
Installation procedure complete.
Developer area located at:
/home/grayson/CMSSW_1_1_0
$
Then we check out the relevant modules:
$ cd CMSSW_1_1_0/src
$ cvs co RecoLocalMuon
cvs checkout: Updating RecoLocalMuon
cvs checkout: Updating RecoLocalMuon/.admin
U RecoLocalMuon/.admin/NewLeaf
...
cvs checkout: Updating RecoLocalMuon/doc/html
U RecoLocalMuon/doc/html/index.html
U RecoLocalMuon/doc/html/overview.html
$
To check out modules from different releases:
$ cd CMSSW_1_1_0/src
$ cvs co -r CMSSW_1_0_0 RecoLocalMuon
cvs checkout: Updating RecoLocalMuon
cvs checkout: Updating RecoLocalMuon/.admin
U RecoLocalMuon/.admin/NewLeaf
...
cvs checkout: Updating RecoLocalMuon/doc/html
U RecoLocalMuon/doc/html/index.html
U RecoLocalMuon/doc/html/overview.html
$
Copy over necessary libraries:
These can be found at:
http://cmsdoc.cern.ch/cms/CSC/CERN/dbc_library/ (copy: libcondbc.so)
http://cmsdoc.cern.ch/CSC/CERN/cscmap_library/ (copy: libcscmap.so)
These must be placed in the CMSSW_1_1_0/lib/slc3_ia32_gcc323/ area (replace 1_1_0 with your version number).
Change to relevant directory and set environment:
The "relevant directory" is the one containing BuildFile. It's usually found in either the project directory itself (ie CSCSegment), or in a subdirectory called test/
$ cd /home/grayson/CMSSW_1_1_0/src/RecoLocalMuon/CSCSegment/
$
Compiling:
Note: if you are on a 64-bit machine (ie cmsosu001), you must do this:
$ cp ~/64Hack ~/CMSSW_1_1_0/config/Buildfile
$ scramv1 b -r
Resetting caches
Parsing BuildFiles
..............
Entering Package RecoLocalMuon/CSCSegment
...
Copying tmp/slc3_ia32_gcc323/src/RecoLocalMuon/CSCStandAlone/test/libtestRecHitComp.so to productstore area:
@@@@ Checking shared library for missing symbols:
@@@@ ----> OK, shared library FULLY-BOUND (no missing symbols)
@@@@ Checking SEAL plugin:
@@@@ ----> OK, SEAL plugin loaded successfully --
--- Registered SEAL capabilities plugin testRecHitComp
87.390u 37.830s 2:19.36 89.8% 0+0k 0+0io 823088pf+0w
$
For a 32-bit machine, the following procedure applies:
$ scramv1 b
Resetting caches
Parsing BuildFiles
..............
Entering Package RecoLocalMuon/CSCSegment
...
Copying tmp/slc3_ia32_gcc323/src/RecoLocalMuon/CSCStandAlone/test/libtestRecHitComp.so to productstore area:
@@@@ Checking shared library for missing symbols:
@@@@ ----> OK, shared library FULLY-BOUND (no missing symbols)
@@@@ Checking SEAL plugin:
@@@@ ----> OK, SEAL plugin loaded successfully --
--- Registered SEAL capabilities plugin testRecHitComp
87.390u 37.830s 2:19.36 89.8% 0+0k 0+0io 823088pf+0w
$
Running:
Special instructions for running a module, if necessary, can be found in a file entitled README in the directory containing the relevant .cfg file. The configuration file has the extension .cfg and can be found in the test/ directory.
$ eval `scramv1 runtime -csh`
$ cmsRun nicole.cfg >& nicole.out
$
We assume that the source file already exists, and add it to the BuildFile:
----- add this part -----
<library file=Sample.cc name=Sample>
<flags SEAL_PLUGIN_NAME="Sample">
</library>
DEFINE_FWK_MODULE(Sample)
process TEST = {
source = PoolConvert {
untracked vstring fileNames ={"file:/home/ippolito/globaldaq/00000282_FilterUnitFramework_0_2.root"}
untracked int32 maxEvents = 500
}
module Sample=Sample{ }
path p = {Sample}
}
string theMappingFile = pset.getParameter<std::string>("theMappingFile");
----- end of code snippet -----
CMSSW includes several commands to help fix itself, such as the following:
$ scramv1 b clean
$
$ cd ~/CMSSW_1_1_0/tmp/slc3_ia32_gcc323
$ rm -r src/
$
CASTOR is CERN's protocol for remote file access, similar to rcp.
To list directory contents:
$ rfdir /castor/cern.ch/cms/store/unmerged/RelVal/2006/7/18/
$
$ rfcp /castor/cern.ch/cms/store/unmerged/RelVal/2006/7/18/RelVal080Higgs-ZZ-4E/GEN-SIM-DIGI-RECO/0005/00CE7FF5-8216-DB11-9AA1-0030485618DE.root reco.root
$
untracked vstring fileNames = {'castor:/castor/cern.ch/cms/MTCC/data/00004047/A/mtcc.00004047.A.testStorageManager_0.60.root'}
Jeremy Mans' CMSSW Tutorial (PDF): http://jmans.web.cern.ch/jmans/cms/CMSSW_Tutorial_0_4_1.pdf
Further CMSSW Tutorials: http://indico.cern.ch/conferenceDisplay.py?confId=a057880
Jason Gilmore's homepage: http://www.physics.ohio-state.edu/~gilmore/mylinks.html
MTCC File listing @FNAL: http://nippon.fnal.gov/lpc1/cmsroc/MTCC/check_mtcc/
CMS Runs summary: http://www.uscms.org/LPC/lpc_roc/cms_runs.html
July 2006 CMS Week Tutorials: https://twiki.cern.ch/twiki/bin/view/CMS/July06CMSweekTutorials
CMSSW Documentation/Class Listing: http://cmsdoc.cern.ch/cms/sw/slc3_ia32_gcc323/cms/cmssw/CMSSW_1_1_0_pre4/doc/html/classes.html
CMSSW CVS browser: http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/?cvsroot=CMSSW