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:
public/UserCode/Schmitt/CSCSkim
- 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" *
etc.
(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 http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/
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