Changeset 16991 for fact/tools


Ignore:
Timestamp:
07/30/13 20:13:30 (11 years ago)
Author:
kraehenb
Message:
CalFactFitsTest.py: Fixed error on some systems about missing dictionary
calfactfits.h: Added possibility to open old DRS files without NROI
Location:
fact/tools/pyscripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/examples/CalFactFitsTest.py

    r13515 r16991  
    1414
    1515from ROOT import gSystem
     16gSystem.Load("izstream_h.so") #Not always necessary
     17gSystem.Load("factfits_h.so") #Not always necessary
    1618gSystem.Load("calfactfits_h.so")
    1719from ROOT import *
  • fact/tools/pyscripts/pyfact/calfactfits.h

    r16947 r16991  
    22//
    33// Class CalFactFits
    4 // Wrapper class for fits.h or pyfits.h
     4// Wrapper class for factfits.h (or fits.h, pyfits.h)
    55// Provides fast access to calibrated events of FACT raw files
    66//
     
    1717// root [3] .L calfactfits.h++
    1818//
     19// Try /usr/lib/x86_64-linux-gnu/libz.so at ETH for the libz.so file.
     20//
    1921// Note: the produced izstream_h.so must be in LD_LIBRARY_PATH, e.g.
    2022// export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/guest/kraehenb/software/PythonIncludes/
     
    101103                //Read basic parameters of the two files
    102104//              std::cout << "...Reading basic file parameters..." << std::endl;
    103                 calib_nroi = calibfile.GetUInt("NROI");
    104                 calib_npix = calibfile.GetUInt("NPIX");
     105                try {
     106                        calib_nroi = calibfile.GetUInt("NROI");
     107                }
     108                catch(runtime_error &err) {
     109                        std::cout << err.what() << std::endl;
     110                        std::cout << "Standard value NROI=1024 assumed." << std::endl;
     111                        calib_nroi = 1024;
     112                }
     113                try {
     114                        calib_npix = calibfile.GetUInt("NPIX");
     115                }
     116                catch(runtime_error &err) {
     117                        std::cout << err.what() << std::endl;
     118                        std::cout << "Standard value NPIX=1440 assumed." << std::endl;
     119                        calib_npix = 1440;
     120                }
     121               
    105122                data_nroi = datafile.GetUInt("NROI");
    106123                data_npix = datafile.GetUInt("NPIX");
Note: See TracChangeset for help on using the changeset viewer.