User Tips for Running SAM

To start using the SAM system, you must be a registered user.

This gives basic instructions for users who want to start using SAM with any D0 general framework package. YY is the base release version you want to use. Running with SAM on d0mino:

  1. Setup the environment:
       > setup n32
       > setenv SAM_STATION central-analysis
       > setup D0RunII t00.YY.00
       > setup sam
    
  2. Create a Dataset Definition, using one of the alternative tools:

  3. Skip this step if you are ready to link and re-compile your executable.
    Go to your work directory. The newrel command below will create a subdirectory tYY and where YOURPACKAGE is the name of your package.

    > newrel -t t00.YY.00 tYY
    > cd tYY
    > addpgk YOURPACKAGE

  4. Before linking, you need to do the following:
    NOTE: You may want to update OBJECTS, LIBRARIES, Sam.rcp and YOURMAIN.rcp in cvs to include SAM from now on. This way, you do not have to keep doing this for each release version!
      > emacs YOURPACKAGE/bin/OBJECTS        --> include RegSAMManager in the
                                             --> list of objects.
    
      > emacs YOURPACKAGE/bin/LIBRARIES      --> include sam_manager in the list
                                             --> of libraries.
    
      > emacs YOURPACKAGE/rcp/ReadEvent.rcp  --> comment out the string InputFile
                                             --> line and type the following:
    
                                                 string InputFile = "SAMInput:"
    
      > emacs YOURPACKAGE/bin/YOURMAIN.rcp   --> include sam FIRST in the list of
                                                 packages you are using:
    
                                                 string Packages = "sam YOURSTUFF"
    
                                             --> and add the RCP
      
                                                 RCP sam = <YOURPACKAGE Sam>
    
      > emacs YOURPACKAGE/rcp/Sam.rcp        --> define variables needed by SAM
    
        string PackageName="SAMManager"
        string WorkingGroup="test"
        string ApplicationName="d0reco"
        string ApplicationVersion="preco03.05"
        string FileStoreLocation="/pnfs/sam/mammoth/mcc99/"
    
        int FileRequestTimeOut=60  //in minutes; default 0 (indefinite)
        int StoreRequestTimeOut=60  //in minutes; default 0 (indefinite)
    
  5. Link the executable:
      > d0setwa
      > gmake YOURPACKAGE.lib
      > gmake YOURPACKAGE.bin
    
  6. Create a script to run the executable:
      > cd YOURPACKAGE/bin/
      > d0setwa
    
      > cp ~roco/sam.bash .
      > emacs sam.bash                       --> change defname to the one you
                                                 created earlier:
    
                                               --defname=samtest_YOURNAME_zee
    
                                             --> change the executable area from
                                             --> /prj_root/777/alg_5/roco/samtest/
                                             --> to your work area location
    
    
  7. You are now ready to run your executable... Execute your script using a small number of test events. You can change int NumEvents = 10 in YOURPACKAGE/rcp/ReadEvent.rcp for testing purposes.

    NOTE: The script sam.bash can be used to read the (temporarily) cached files for reco certification. It can be modified to use the robot tapes by simply removing

      --preferred-loc=/sam/cache
    

Maintained by: sam-design@fnal.gov Last modified: Fri Apr 15 14:21:30 CDT 2005