Getting started with the CMSSW software at IIHE: Difference between revisions

From T2B Wiki
Jump to navigation Jump to search
 
Line 62: Line 62:
   scramv1 p CMSSW CMSSW_4_4_5
   scramv1 p CMSSW CMSSW_4_4_5
   cd CMSSW_4_4_5/src
   cd CMSSW_4_4_5/src
   eval <tt>scramv1 runtime -sh</tt>
   eval `scramv1 runtime -sh`
</pre>
</pre>
----
----
=== Get the necessary code ===
=== Get the necessary code ===
*checkout the source code of the libraries that you want to use or modify. Here we will produce a few fastsim ttbar events with production of a PAT-tree in the end:  
*checkout the source code of the libraries that you want to use or modify. Here we will produce a few fastsim ttbar events with production of a PAT-tree in the end:  

Latest revision as of 11:41, 22 August 2018

A few words on our User Interfaces

  • The policies for usage of the User Interfaces can be found here. Please read them carefully.

Login to a machine and define the CMS environment variables

  • Login to a user interface :
 e.g: 
  ssh -X <tt>whoami</tt>@m1.iihe.ac.be
  • Source the CMS environment :
  source $VO_CMS_SW_DIR/cmsset_default.sh
  • or for tcsh :
  source $VO_CMS_SW_DIR/cmsset_default.csh
  • Adapt your SCRAM_ARCH environment variable :
Keep in mind that this initial source will affect the value of the environment variable SCRAM_ARCH. Depending on which UI you are, SCRAM_ARCH can take two different values : slc4_ia32_gcc345 for UIs in SL4, and slc5_ia32_gcc434 for UIs in SL5. As a practical consequence, if you want to work with CMSSW releases older than CMSSW_3_4_0 on an SL5 UI, than you must change SCRAM_ARCH :
  export SCRAM_ARCH=slc4_ia32_gcc345
If you want to use CMSSW4 releases, then you must set SCRAM_ARCH like this :
  export SCRAM_ARCH=slc5_amd64_gcc434
  • Define the code cvs repository :
export CVSROOT=:ext:<your user name>@cmscvs.cern.ch:/local/reps/CMSSW
  • or for tcsh :
 setenv CVSROOT :ext:<your user name>@cmscvs.cern.ch:/local/reps/CMSSW
  • where you replace <your user name> by your user name at cern, and make a kerberos token :
 kinit
log in with your cern password. 

Prepare the CMSSW working area

  • First, list the CMSSW versions installed locally
  scramv1 list
  scramv1 list | grep CMSSW
These commands also show the paths to the installation directories. 
  • Select the version you want to work with (here: CMSSW_2_2_6)
  • Install a CMSSW working area, go to the src subdirectory and prepare to compile and run
  scramv1 p CMSSW CMSSW_4_4_5
  cd CMSSW_4_4_5/src
  eval `scramv1 runtime -sh`

Get the necessary code

  • checkout the source code of the libraries that you want to use or modify. Here we will produce a few fastsim ttbar events with production of a PAT-tree in the end:
  cvs co -r CMSSW_4_4_5 PhysicsTools/PatAlgos/test; cd PhysicsTools/PatAlgos/test

Run CMSSW interactively and produce a few events

The parameters for CMSSW are specified in a text file called the config file. Run it with the command:

  cmsRun patLayer1_fromScratch_fast.cfg.py

You should see one root file appear: PATLayer1_Output.fromScratch_fast.root

At this stage you should learn more about CMSSW and PAT by studying the CMSSW Workbook.


Troubleshooting

If you meet troubles, please have a look in our FAQ : FAQ CMSSW on the Grid on proxy and more!



Template:TracNotice