Changeset 12705 for trunk


Ignore:
Timestamp:
12/06/11 13:55:51 (13 years ago)
Author:
lyard
Message:
added more columns in grouping files
File:
1 edited

Legend:

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

    r12704 r12705  
    20532053        names.push_back("MEMBER_NAME");
    20542054        dataTypes.push_back(pathTypeName.str());
     2055        names.push_back("MEMBER_VERSION");
     2056        dataTypes.push_back("1J");
     2057        names.push_back("MEMBER_POSITION");
     2058        dataTypes.push_back("1J");
    20552059
    20562060        groupTable = groupFile->addTable("GROUPING", numFilesToGroup, names, dataTypes);
     
    20642068         return;
    20652069     }
    2066 
     2070     try
     2071     {
     2072         groupTable->addKey("GRPNAME", "FACT_RAW_DATA", "Data from the FACT telescope");
     2073     }
     2074     catch (CCfits::FitsException e)
     2075     {
     2076         Error("CCfits::Table::addKey failed for 'GRPNAME' in '"+groupName+"-GROUPING': "+e.message());
     2077         return;
     2078     }
    20672079    //CCfits seems to be buggy somehow: can't use the column's function "write": it create a compilation error: maybe strings were not thought about.
    20682080    //use cfitsio routines instead
    20692081    groupTable->makeThisCurrent();
    20702082    //create appropriate buffer.
    2071     const unsigned int n = 8 + 3 + 2*maxCharLength + 1; //+1 for trailling character
     2083    const unsigned int n = 8 + 3 + 2*maxCharLength + 1 + 8; //+1 for trailling character
    20722084
    20732085    vector<unsigned char> realBuffer;
     
    20802092    char* startOfLocation  = reinterpret_cast<char*>(&fitsBuffer[8 + 3]);
    20812093    char* startOfName      = reinterpret_cast<char*>(&fitsBuffer[8+3+maxCharLength]);
     2094 //   char* startOfMemVer    = reinterpret_cast<char*>(&fitsBuffer[8+3+2*maxCharLength]);
     2095 //   char* startOfMemPos    = reinterpret_cast<char*>(&fitsBuffer[8+3+2*maxCharLength+1]);
    20822096
    20832097    strcpy(startOfExtension, "BINTABLE");
    20842098    strcpy(startOfURI,       "URL");
     2099    fitsBuffer[8+3+2*maxCharLength+3] = 1;
     2100    fitsBuffer[8+3+2*maxCharLength+7] = 1;
    20852101
    20862102    int i=1;
     
    20992115
    21002116            int status = 0;
    2101             fits_write_tblbytes(groupFile->fitsPointer(), i, 1, 8+3+2*maxCharLength, fitsBuffer, &status);
     2117            fits_write_tblbytes(groupFile->fitsPointer(), i, 1, 8+3+2*maxCharLength +8, fitsBuffer, &status);
    21022118            if (status)
    21032119            {
Note: See TracChangeset for help on using the changeset viewer.