To get a release of CMSSW:
$ cmsrel CMSSW_3_2_X
Inside the newly created release's src directory, you can set the runtime variables:
$ cmsenv
Use cvs to get packages:
$ addpkg <subproject>/<package>
Append HEAD or the version (V07-08-29) to get that specific version of the package
These need to be run in the src/ of your release within a
$ mkskel <name>
$ mkedanlzr [-<template>] <name>
$ mkedprod <name>
$ mkedfltr <name>
The option -list to mkedanlzr lists templates.
$ scramv1 build
#or
$ scramv1 b
Add -jN to use N cores
$ cmsRun <project_cfg>.py
FWLight makes using CMSSW like using ROOT
To use, in ROOT:
gSystem->Load("libFWCoreFWLite);
AutoLibraryLoader::enable();
Ready to go!
A nice ROOT style: niceRootStyle
Similarly,
from PhysicsTools.PythonAnalysis import *
from ROOT import *
gSystem.Load("libFWCoreFWLite.so")
AutoLibraryLoader.enable()
To run the normal event visualization software, Fireworks, run:
cmsShow <rootfile.root>
This is the name of the CMSSW CVS server:1
cmssw.cvs.cern.ch:/cvs/CMSSW
You can also access cvs through a web browser at http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/
After you have set up your environment set CVSROOT to this for anonymous access:
export CVSROOT=:pserver:anonymous@cmssw.cvs.cern.ch:/local/reps/CMSSW
You'll need to use cvs login and a password too.
Dataset info: https://twiki.cern.ch/twiki/bin/viewauth/CMS/PVTMain
Use the DBS data discovery page: https://cmsweb.cern.ch/dbs_discovery/ or in a cmsenv'd environment on the command line do:
dbsql "<search terms>"
To find data at UF IHEPA search: find dataset where site = srm.ihepa.ufl.edu
To find your own crab output at UF T2:
lcg-ls -l srm://srmb.ihepa.ufl.edu:8443/srm/v2/server?SFN=/cms/data/store/user/
Just take "/cms/data" off of the front of the filenames to use them in a CMSSW job.
https://twiki.cern.ch/twiki/bin/viewauth/CMS/SWGuideFrontierConditions
This page shows how to access RECO data:
https://twiki.cern.ch/twiki/bin/viewauth/CMS/SWGuideRecoDataTable
To find what data and datatypes are accessible, append this to the end of a python config to dump raw events out:
process.FEVT = cms.OutputModule("PoolOutputModule",
fileName = cms.untracked.string("test.root"),
outputCommands = cms.untracked.vstring(
"keep *"
)
)
process.outpath = cms.EndPath(process.FEVT)
Running the following command on that output file will print what data is inside:
edmDumpEventContent test.root
L1 Trigger Algorithms: https://twiki.cern.ch/twiki/bin/view/CMS/GlobalTriggerAvailableMenus
HLT: https://twiki.cern.ch/twiki/bin/viewauth/CMS/TriggerTables
To process over multiple runs (Closes Outfiles between every Infile):
process.options = cms.untracked.PSet(
fileMode = cms.untracked.string('NOMERGE')
)
To suppress the event blah blah blah output
process.load("FWCore.MessageService.MessageLogger_cfi") #You want this always anyway
process.MessageLogger.cerr.threshold = ""
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
To add log message behaviour:2
process.load('FWCore.MessageService.MessageLogger_cfi')
process.MessageLogger.debugModules = ['*']
process.MessageLogger.categories = ['*']
process.MessageLogger.destinations = ['cout']
process.MessageLogger.cout = cms.untracked.PSet(
threshold = cms.untracked.string('INFO'),
DEBUG=cms.untracked.PSet(
limit=cms.untracked.int32(-1)
),
INFO=cms.untracked.PSet(
limit=cms.untracked.int32(-1)
),
WARNING=cms.untracked.PSet(
limit=cms.untracked.int32(-1)
),
ERROR=cms.untracked.PSet(
limit=cms.untracked.int32(-1)
)
)
For Parallel Generation: cmsswParallelGeneration
For Parallel Analysis: cmsswParallelAnalysis
For Statistics:
process.options = cms.untracked.PSet(
makeTriggerResults = cms.untracked.bool(True),
wantSummary = cms.untracked.bool(True)
)
To add more than 255 input file names:34
myfilelist = cms.untracked.vstring()
# add as many files as you wish this way
myfilelist.extend( ['file:myfile1.root','file:myfile2.root'] )
process.source = cms.Source ("PoolSource",
fileNames=myfilelist
)
Also, if some files may not be present, this is a file checker for python configs: edmfilechecker
#To list files:
nsls
#where cms data/mc is stored:
nsls /castor/cern.ch/cms/store/
#to see the path to your home directory:
nsls -d
It is good to stage in all of your files at once, before an operation. For a single file:
stager_get -M <fullCastorFilename>
Check the staging status with:
stager_qry -M <fullCastorFilename>
You can also use a new line separated list of filenames for both commands with the -f option. If it doesn't work, add the option "-S default"
To use the mega fast XRootD for copying (-R also works for recursive):
xrdcp root://castorcms/castor/cern.ch/<filename> <localFilename>
cmsLs /store/user/
srmrmdir -recursive srm://srmb.ihepa.ufl.edu:8443/srm/v2/server?SFN=/cms/data/store/user/
CMS Sorts the Primary Vertex collections by $\sum (p_{T}^{track})^2$ for tracks associated with that vertex.5 Due to this, the first entry in the collection is most likely the hardest collison.
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideGoodLumiSectionsJSONFile
lp -d <Printer Name> <file to print>
Make sure the file is text/.ps/.pdf
Printer Names
32-4210-HP
On 4th floor down the hall B/W32-SB02-CAN
In Basement of B32 B/W32-1B03-HP
1st Floor of B32 B/W32-1B03-HPC
1st Floor of B32 Color513-HP-A0GLOSSY
A0 Printer, Must call Computer Centre Operator
(Tel: 75011 or +41 22 76 75011)513-HP-A0
Same As obove with matte paperCode must be compiled on the node r11a-s18
A neat link allowing you to change the version of external tools enabled in CMSSW
DAS Data Aggregation System for searching metadata about datasets, runs, files, blocks, etc.
CMS PREP Website for MC Production Management
https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookComputingConcepts ↩
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideMessageLogger ↩
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuidePoolInputSources ↩
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideEDMParametersForModules ↩
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideOfflinePrimaryVertexProduction ↩