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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.