Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Usage and Development through CVS and CMT

CVS Repository 

Wiki MarkupThe code CVS repository reside at the The code CVS repository reside at the $CVSROOT/users/Trg/\[Packagename\]    (CVSROOT is /afs/slac/g/glast/ground/cvs on SLAC cvs on SLAC UNIX). As  As part of the "users" code, they are not attached to any office release so that you need to check them out and compile yourself for all usage. Because the packages live under users/ subdirectories, some care needs to be taken to not accidentally checkout or tag the whole users package with many people's code (you will regret it\!). The general usage of the users packages are explained by [Toby's posting|http://www-glast.stanford.edu/protected/mail/infrasoft/0852.html]. As an example, if you want to develop the TrgTest code, starting from tag v0-01,  under your own release directory _myRelease,_ then the cvs checkout command is:   cd myRelease   cmt co \-r v0-01 \-o users/Trg TrgTest The \-o option indicates the directory offset for the package.  This should make a directory them out and compile yourself for all usage. Because the packages live under users/ subdirectories, some care needs to be taken to not accidentally checkout or tag the whole users package with many people's code (you will regret it!). The general usage of the users packages are explained by Toby's posting. As an example, if you want to develop the TrgTest code, starting from tag v0-01,  under your own release directory myRelease, then the cvs checkout command is:
  cd myRelease
  cmt co -r v0-01 -o users/Trg TrgTest
The -o option indicates the directory offset for the package.  This should make a directory myRelease/TrgTest/v0-01/.  Within the package  Within the package directory, you typically should have a subdirectory with the same name as the package name which contains the class headers; a subdirectory /src containging the class implementation C+\+ source files and the /cmt subdirectory containing the build options. The TrgTest pacakge also has a subdirectory /workdir for running applications in ROOT. When you commit the revised version for Trgtest, you should also issue the cvs commit from the directory  When you commit the revised version for Trgtest, you should also issue the cvs commit from the directory myRelease/TrgTest/v0-00/ or it subdirectories to only commit code within the package. When you want to tag an updated version, again you should be sitting in myRelease/TrgTest/v0-01/ and using the \ -rtag recommended by Toby for the packages residing in subdirectories:   cvs rtag _TagName_ users
  cvs rtag TagName users/Trg/TrgTest
To check the tags, you need to spell out the full package directory offset:   listtag the full package directory offset:
  listtag users/Trg/TrgTest TrgTest 

CMT Code Build

For packages checked out from CVS, you will work within CMT to build and update them.  The interactive CMT GUI is the recommended tool for doing development. It can be started with the command MRvcmt& after the setup is run. The essense of the CMT operations are introduced in the offline workbookunder the tab: MRvcmt. Upon startup of MRvcmt for the first time you need to configure the paths. From the MRvcmt top menu, select the Options tab then "Cmt Options"  to bring up the the following panel:

...

  • Check your environment setup if it effectively executed things needed in /afs/slac/g/glast/trigger/glast.setup:

    echo $GLASTROOT  

     /afs/slac.stanford.edu/g/glast

    echo $CVSROOT 

     /nfs/slac/g/glast/ground/cvs

    echo $ROOTSYS 

     /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/rh9_gcc32/ROOT/v4.02.00/root

  • Established a private development release directory and checked out the packages RTAutil (tag v0-00) and TrgTest (v0-01) into that private release directory following the instructions in the "CVS Repository" section above.      
  • Follow the instructions in the "CMT Code Build" section above to build both RTAutil and TrgTest packages and check the rh9_gcc32 directories of each package to see the the shlibs libRtautil.so and libTrgTest.so are indeed successfully built.unmigrated-wiki-markup
  • cd to \ [your test release\]/TrgTest/v0-01/workdir  and take look atthe release.setup  to see if all the softlink pointers are sensible amd modify if necessary (*_this is rather fragile and may not keep up with updates so that you should check this carefully_*). Then   source release.setup  which should setup various softlinks to the sharable libraries and the parent RELEASE pointer in the workdir. The setup script is made to allow making changes to release/shlib by removing old links first so that first time execution may result in a bunch of "no such file or directory" messages which you can ignore. For normal usage, you only need to do this once at the first time setting up the TrgTest workdir  and take look atthe release.setup  to see if all the softlink pointers are sensible amd modify if necessary (this is rather fragile and may not keep up with updates so that you should check this carefully). Then   source release.setup  which should setup various softlinks to the sharable libraries and the parent RELEASE pointer in the workdir. The setup script is made to allow making changes to release/shlib by removing old links first so that first time execution may result in a bunch of "no such file or directory" messages which you can ignore. For normal usage, you only need to do this once at the first time setting up the TrgTest package.
  • Still in the workdir, you can fire up ROOT (which will load the sharable libs through .rootrc pointing to RooLogon.C) and execute the following CINT macros with simple e.g.   .x RunDump.C.

    RunDump.C

    Formated dumps of digis, recon objects and GEM data (digi/recon)

    RunTestGeom.C

    Test to validate the ideal geometry utility (recon/histograms)

    RunAcdRate.C

    Analysis of ACD rate test data (histogram, GEM event time)

    The execution of AcdRate.C will take ~10min to grind through many runs (the job runs at 2-3K events/sec) and create a bunch of output histograms in subdirectory results/AcdRate.
  • Still within ROOT, you can try the plotting macro for AcdRate (assuming you executed RunAcdRate.C to produce the root files in results/AcdRate already) e.g.:
    • .x plotAcdRate.C(1,5171)             (time counter summary for run 135005171)
    • .x plotAcdRate.C(5,0)                  (GEM veto hit rate for various FreebBoard combos and thresholds)     

...