Changeset 16845


Ignore:
Timestamp:
06/14/13 14:21:53 (11 years ago)
Author:
lyard
Message:
Added guard handling of case where startCells not found and Drs requested
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/fitsCompressor.cc

    r16826 r16845  
    11161116            {
    11171117                heapSize += _catalog[i][j].first;
     1118//              cout << "heapSize: " << heapSize << endl;
    11181119                //set the catalog offsets to their actual values
    11191120                _catalog[i][j].second = compressedOffset;
     
    11331134    }
    11341135    writeHeader(true);
     1136
    11351137    ostringstream str;
    11361138    str << _checksum.val();
     
    17301732            continue;
    17311733        outFile.setHeaderKey(i->second.fitsString);
     1734//        cout << i->first << endl;
    17321735    }
    17331736
     
    17561759            drsCalib16[i] = (int16_t)(drsCalibFloat[i]*4096.f/2000.f);
    17571760
    1758         //assign it to the ouput file
    1759         outFile.setDrsCalib(drsCalib16);
    17601761
    17611762        //get the start cells offsets
     
    17731774        if (startCellOffset == -1)
    17741775        {
    1775             cout << "Could not find StartCellData in input file " << fileNameIn << ". Aborting."<< endl;
    1776             return -1;
     1776            cout << "WARNING: Could not find StartCellData in input file " << fileNameIn << ". Doing it uncalibrated"<< endl;
     1777        }
     1778        else
     1779        {
     1780            //assign it to the ouput file
     1781            outFile.setDrsCalib(drsCalib16);
    17771782        }
    17781783    }
     
    18581863    }
    18591864
    1860     delete[] drsCalib16;
     1865    if (drsCalib16 != NULL)
     1866        delete[] drsCalib16;
    18611867
    18621868    if (displayText) cout << "Done." << endl;
     
    18751881    //get a compressed reader
    18761882//TEMP try to copy the file too
    1877 //    string copyName("/scratch/copyFile.fz");
     1883//    string copyName("/gpfs/scratch/fact/etienne/copyFile.fz");
     1884//    string copyName(fileNameOut+".copy");
    18781885    string copyName("");
    18791886    factfits verifyFile(fileNameOut, copyName, tableName, false);
     
    20372044    else
    20382045    {
    2039         if (displayText) cout << "Ok" << endl;
     2046        if (true) cout << "Ok" << endl;
    20402047    }
    20412048
Note: See TracChangeset for help on using the changeset viewer.