Changeset 13376
- Timestamp:
- 04/18/12 09:26:03 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/doc/getting_started.rst
r13325 r13376 30 30 set the following env variables depending on the SHELL you are using, for instance in .bashrc or .tcshrc 31 31 32 32 33 * **ROOTSYS**: /swdev_nfs/root_v5.28.00 33 34 * **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 36 36 * **PYTHONPATH**: $ROOTSYS/lib 37 37 * **PYTHONPATH**: add all directories where python should search for modules. At least: 38 38 * pyscripts/pyfact 39 * pyscript/tools 40 * pyscripts/ ecamples39 * **LD_LIBRARY_PATH**: add the path to pyfits_h.so 40 * pyscripts/pyfact in many cases 41 41 42 42 the absolute path depends on where you have checked (or will check) out the pyscripts repository 43 44 example .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 43 61 44 62 3. Check out the repository … … 48 66 4. Create pyfits_h.so library 49 67 ============================= 68 50 69 FACT data are stored in (gzipped) fits files, but the data files are too large to be read by the existing tools: 51 70 … … 55 74 `pyroot <http://root.cern.ch/drupal/category/package-context/pyroot>`_ module. 56 75 57 got to the directory: pyscripts/pyfact 76 example by dom:: 58 77 59 simple:: 60 61 [lusterma@isdc-cn02 pyfact]$ root 78 neise@isdc-viewer00:~/py/pyscripts/pyfact$ root 62 79 ROOT 5.28/00 (trunk@37585, Dec 14 2010, 15:20:27 on linuxx8664gcc) 63 80 CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010 64 81 Type ? for help. Commands must be C++ statements. 65 82 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 66 91 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] 92 check if it worked:: 70 93 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 72 96 73 $rootcint -f my_dict.C -c fits.h izstream.h 97 98 This might not work for whatenver reason then you can try this:: 99 100 $rootcint -f my_dict.C -c pyfits.h izstream.h 74 101 $g++ -fPIC -c -I$ROOTSYS/include my_dict.C -o my_dict.o 75 $g++ -o fits_h.so -shared my_dict.o102 $g++ -o pyfits_h.so -shared my_dict.o 76 103 77 104 Now you can check if the reading rawdata is working:
Note:
See TracChangeset
for help on using the changeset viewer.