- Timestamp:
- 12/06/11 13:55:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/datalogger.cc
r12704 r12705 2053 2053 names.push_back("MEMBER_NAME"); 2054 2054 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"); 2055 2059 2056 2060 groupTable = groupFile->addTable("GROUPING", numFilesToGroup, names, dataTypes); … … 2064 2068 return; 2065 2069 } 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 } 2067 2079 //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. 2068 2080 //use cfitsio routines instead 2069 2081 groupTable->makeThisCurrent(); 2070 2082 //create appropriate buffer. 2071 const unsigned int n = 8 + 3 + 2*maxCharLength + 1 ; //+1 for trailling character2083 const unsigned int n = 8 + 3 + 2*maxCharLength + 1 + 8; //+1 for trailling character 2072 2084 2073 2085 vector<unsigned char> realBuffer; … … 2080 2092 char* startOfLocation = reinterpret_cast<char*>(&fitsBuffer[8 + 3]); 2081 2093 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]); 2082 2096 2083 2097 strcpy(startOfExtension, "BINTABLE"); 2084 2098 strcpy(startOfURI, "URL"); 2099 fitsBuffer[8+3+2*maxCharLength+3] = 1; 2100 fitsBuffer[8+3+2*maxCharLength+7] = 1; 2085 2101 2086 2102 int i=1; … … 2099 2115 2100 2116 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); 2102 2118 if (status) 2103 2119 {
Note:
See TracChangeset
for help on using the changeset viewer.