Ignore:
Timestamp:
11/09/11 21:51:58 (13 years ago)
Author:
tbretz
Message:
Moved RunDescription to HeadersFAD, added it as a second argument to Open and write the run-type to the header.
File:
1 edited

Legend:

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

    r12454 r12477  
    11#include "DataWriteFits.h"
    22
     3#include "HeadersFAD.h"
    34#include "FAD.h"
    45#include "Converter.h"
     
    3031//! @param h a pointer to the RUN_HEAD structure that contains the informations relative to this run
    3132//
    32 bool DataWriteFits::Open(RUN_HEAD* h)
     33bool DataWriteFits::Open(const RUN_HEAD* h, const FAD::RunDescription &d)
    3334{
    3435    if (fConv)
     
    9495        fFile.WriteKey("NROI",     h->Nroi,     "Number of slices per pixels");
    9596        fFile.WriteKey("NROITM",   realRoiTM,   "Number of slices per time-marker"); //ETIENNE from NroiTMm to Nroi
    96                 int realOffset = (h->NroiTM > h->Nroi) ?  h->NroiTM - 2*h->Nroi : 0;
    97                 fFile.WriteKey("OFFSET", realOffset, "Offset between pixels ROI and TM ROi"); //ETIENNE added
     97
     98        const uint16_t realOffset = (h->NroiTM > h->Nroi) ?  h->NroiTM - 2*h->Nroi : 0;
     99        fFile.WriteKey("OFFSET", realOffset, "Offset between pixels ROI and TM ROi"); //ETIENNE added
    98100
    99101        //FIXME should we also put the start and stop time of the received data ?
     
    103105        fFile.WriteKey("ADCRANGE", 2000,        "Dynamic range in mV");
    104106        fFile.WriteKey("ADC",      12,          "Resolution in bits");
    105 
     107        fFile.WriteKey("TYPE",     d.name,      "File type according to FAD configuration (Config database)");
    106108
    107109        // Write a single key for:
Note: See TracChangeset for help on using the changeset viewer.