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. The folders have to exist in your working directory before you can run the cvs add command.
    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
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2012-11-19 - BenCarlson
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 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