Changeset 13376


Ignore:
Timestamp:
04/18/12 09:26:03 (13 years ago)
Author:
neise
Message:
added some examples, and changed the part about the env vars
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/doc/getting_started.rst

    r13325 r13376  
    3030set the following env variables depending on the SHELL you are using, for instance in .bashrc or .tcshrc
    3131
     32
    3233* **ROOTSYS**: /swdev_nfs/root_v5.28.00
    3334* **PATH**: add $ROOTSYS/bin
    34 * **PATH**: add /swdev_nfs/FACT++
    35 * **LD_LIBRARY_PATH**: $ROOTSYS/lib:/swdev_nfs/FACT++/.libs
     35* **LD_LIBRARY_PATH**: add $ROOTSYS/lib
    3636* **PYTHONPATH**: $ROOTSYS/lib
    3737* **PYTHONPATH**: add all directories where python should search for modules. At least:
    3838    * pyscripts/pyfact
    39     * pyscript/tools
    40     * pyscripts/ecamples
     39* **LD_LIBRARY_PATH**: add the path to pyfits_h.so
     40    * pyscripts/pyfact in many cases
    4141
    4242the absolute path depends on where you have checked (or will check) out the pyscripts repository
     43
     44example .bashrc::
     45
     46    # this is just a convenient shortcut
     47    export MY_PYFACT=/home_nfs/isdc/neise/py/pyscripts/pyfact
     48
     49    # this is needed for ROOT only
     50    export ROOTSYS=/swdev_nfs/root_v5.28.00
     51    export PATH=$ROOTSYS/bin:$PATH
     52    export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
     53
     54    # this is needed for Python to find the pyfact classes and PyROOT
     55    export PYTHONPATH=$PYFACT
     56    export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH
     57
     58    #this is one of many possible ways, for ROOT to find pyfits_h.so
     59    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MY_PYFACT
     60
    4361
    44623. Check out the repository
     
    48664. Create pyfits_h.so library
    4967=============================
     68
    5069FACT data are stored in (gzipped) fits files, but the data files are too large to be read by the existing tools:
    5170
     
    5574`pyroot <http://root.cern.ch/drupal/category/package-context/pyroot>`_ module.
    5675
    57 got to the directory: pyscripts/pyfact
     76example by dom::
    5877
    59 simple::
    60 
    61   [lusterma@isdc-cn02 pyfact]$ root
     78  neise@isdc-viewer00:~/py/pyscripts/pyfact$ root
    6279  ROOT 5.28/00 (trunk@37585, Dec 14 2010, 15:20:27 on linuxx8664gcc)
    6380  CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
    6481  Type ? for help. Commands must be C++ statements.
    6582  Enclose multiple statements between { }.
     83  root [0] .L pyfits.h++
     84  Info in <TUnixSystem::ACLiC>: creating shared library /home_nfs/isdc/neise/py/pyscripts/pyfact/./pyfits_h.so
     85  In file included from /home_nfs/isdc/neise/py/pyscripts/pyfact/pyfits_h_ACLiC_dict.h:34,
     86                   from /home_nfs/isdc/neise/py/pyscripts/pyfact/pyfits_h_ACLiC_dict.cxx:17:
     87  /home_nfs/isdc/neise/py/pyscripts/pyfact/./pyfits.h: In member function »size_t std::fits::Table::GetN(const std::string&) const«:
     88  /home_nfs/isdc/neise/py/pyscripts/pyfact/./pyfits.h:442: Warnung: Deklaration von »it« überdeckt einen vorhergehenden lokalen Bezeichner
     89  /home_nfs/isdc/neise/py/pyscripts/pyfact/./pyfits.h:437: Warnung: Verdeckte Deklaration ist hier
     90  root [1] .q
    6691
    67   root [0] .L fits.h++
    68   Info in <TUnixSystem::ACLiC>: creating shared library /home_nfs/isdc/lusterma/pyscripts/pyfact/./fits_h.so
    69   root [1]
     92check if it worked::
    7093
    71 This might not work for whatenver reason then it should be done like this::
     94  neise@isdc-viewer00:~/py/pyscripts/pyfact$ ls pyfits*
     95  pyfits.h  pyfits_h.d  pyfits_h.so
    7296
    73   $rootcint -f my_dict.C -c fits.h izstream.h
     97
     98This might not work for whatenver reason then you can try this::
     99
     100  $rootcint -f my_dict.C -c pyfits.h izstream.h
    74101  $g++ -fPIC -c -I$ROOTSYS/include my_dict.C -o my_dict.o
    75   $g++ -o fits_h.so -shared my_dict.o
     102  $g++ -o pyfits_h.so -shared my_dict.o
    76103
    77104Now you can check if the reading rawdata is working:
Note: See TracChangeset for help on using the changeset viewer.