How to put code in the UserCode area

Some basic documentation is available from the CMS Workbook.

  • First, develop the code in the usual fashion. Make sure it works and put it in a subdirectory of some known CMSSW tree.
    Example: SKIM/CMSSW_2_1_0_pre7/src/RecoLocalMuon/CSCSkim
  • Next, make a subdirectory exactly parallel to what you want to have in the UserCode area:
  • Go to the main directory
    cd public
    cvs co UserCode/README
    cd UserCode
  • Make the same subdirectory in the CVS repository:
    cvs add Schmitt/CSCSkim
  • Make standard set of subdirectories
    cd Schmitt/CSCSkim
    mkdir test
    mkdir src
    mkdir interface
    mkdir python
  • Add them to the CVS repository.
    cd Schmitt/CSCSkim
    cvs add -m "first public version" test
    cvs add -m "first public version" src
    cvs add -m "first public version" interface
    cvs add -m "first public version" python
  • Transfer your code, including the BuildFile, from your original developmental area to the parallel set of subdirectories under UserCode/
    cd src
    cp -v ~/SKIM/CMSSW_2_1_0_pre7/src/RecoLocalMuon/CSCSkim/src/* .
    cvs add -m "first public version" *
    (Don't forget the BuildFile!)
  • Commit the whole set of files
    cd public/UserCode
    cvs commit -m "first public version" Schmitt/CSCSkim
  • You should see the code with the browser.
  • You can add TAG to your commited files by :
    cd public/UserCode/Schmitt
    cvs update
    cvs tag mytag_X_Y_Z CSCSkim

  • Removing unneeded files from repository. Here is an example of removing several files:
    cd test
    rm *.c
    cvs remove
    cvs commit -m "Removed unneeded files"

-- MichaelSchmitt - 22 Jul 2008

This topic: Main > TWikiUsers > MichaelSchmitt > HowToUserCode
Topic revision: r5 - 2011-12-31 - ShahzadMalikMuzaffar
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback