Changeset 14025 for trunk/FACT++/src
- Timestamp:
- 06/01/12 16:25:45 (12 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DataCalib.cc
r14024 r14025 211 211 } 212 212 213 void DataCalib::WriteFits(const string &filename) 214 { 215 ofits file(filename.c_str()); 216 213 void DataCalib::WriteFitsImp(const string &filename, const vector<float> &vec) const 214 { 217 215 const uint16_t roi = fData.fRoi; 218 216 const uint16_t ntm = fData.fNumTm; 217 218 const size_t n = 1440*1024*4 + 1440*roi*2 + ntm*roi*2 + 3; 219 220 if (vec.size()!=n+1) 221 throw runtime_error("Size of vector does not match region-of-interest"); 222 223 ofits file(filename.c_str()); 219 224 220 225 file.AddColumnInt("RunNumberBaseline"); … … 252 257 253 258 file.WriteTableHeader("DrsCalibration"); 254 255 const int n = (1440*1024*4 + 1440*roi*2 + ntm*roi*2 + 3)*sizeof(float); 256 file.WriteRow(fStats.data()+1, n); 259 file.WriteRow(vec.data()+1, n*sizeof(float)); 257 260 } 258 261 … … 305 308 try 306 309 { 307 WriteFits (filename);310 WriteFitsImp(filename, fStats); 308 311 309 312 ostringstream str; -
trunk/FACT++/src/DataCalib.h
r14024 r14025 24 24 // uint16_t fDAC[8]; 25 25 26 void WriteFits (const std::string &filename);26 void WriteFitsImp(const std::string &filename, const std::vector<float> &vec) const; 27 27 28 28 int GetDrsStep() const { return fData.fStep; }
Note:
See TracChangeset
for help on using the changeset viewer.