Changeset 17008 for trunk/FACT++/gui


Ignore:
Timestamp:
Aug 15, 2013, 8:18:23 AM (6 years ago)
Author:
lyard
Message:
unified support for both .gz and .fz files in the viewer
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc

    r16964 r17008  
    561561    }
    562562    vector<string> entriesToCheck;
    563     entriesToCheck.push_back("NAXIS2");
     563    if (inputFile->IsCompressedFITS())
     564        entriesToCheck.push_back("ZNAXIS2");
     565    else
     566        entriesToCheck.push_back("NAXIS2");
    564567    entriesToCheck.push_back("NROI");
    565568    entriesToCheck.push_back("REVISION");
     
    591594    }
    592595
    593     nRows =          inputFile->HasKey("NAXIS2") ? inputFile->GetInt("NAXIS2") : 0;
     596    nRows = 0;
     597    if (inputFile->IsCompressedFITS())
     598        nRows = inputFile->HasKey("ZNAXIS2") ? inputFile->GetInt("ZNAXIS2") : 0;
     599    else
     600        nRows = inputFile->HasKey("NAXIS2") ? inputFile->GetInt("NAXIS2") : 0;
    594601    nRoi =           inputFile->HasKey("NROI") ?  inputFile->GetInt("NROI") : 0;
    595602    runNumber =      inputFile->HasKey("RUNID") ?  inputFile->GetInt("RUNID") : -1;
Note: See TracChangeset for help on using the changeset viewer.