Changeset 12269 for trunk


Ignore:
Timestamp:
10/25/11 19:50:16 (13 years ago)
Author:
tbretz
Message:
Fixed wiritng the fits header.
File:
1 edited

Legend:

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

    r12163 r12269  
    130130                continue;
    131131
     132            fFile.WriteKey("BOARD", i, "Board number for RUN, PRESC, PHASE and DAC");
    132133            fFile.WriteKey("RUN",   hh.runnumber, "Run number");
    133134            fFile.WriteKey("PRESC", hh.trigger_generator_prescaler, "Trigger generator prescaler");
    134             fFile.WriteKey("PHASE", hh.adc_clock_phase_shift, "ADC clock phase shift");
     135            fFile.WriteKey("PHASE", (int16_t)hh.adc_clock_phase_shift, "ADC clock phase shift");
    135136
    136137            for (int j=0; j<8; j++)
    137138            {
    138                 ostringstream dac;
     139                ostringstream dac, cmt;
    139140                dac << "DAC" << j;
    140                 fFile.WriteKey(dac.str(), hh.dac[j], "DAC command value");
     141                cmt << "Command value for " << dac.str();
     142                fFile.WriteKey(dac.str(), hh.dac[j], cmt.str());
    141143            }
    142144
     
    157159        }
    158160
     161        // FIXME: I cannot write a double! WHY?
    159162        fFile.WriteKey("REFCLK", avg/cnt, "Average reference clock frequency in Hz");
    160163    }
    161164    catch (const CCfits::FitsException &e)
    162165    {
    163         Error("CCfits::Table::addKey failed in "+fFileName+"': "+e.message());
     166        Error("CCfits::Table::addKey failed in '"+fFileName+"': "+e.message());
    164167        return false;
    165168    }
Note: See TracChangeset for help on using the changeset viewer.