FACT++  1.0
bool factfits::init ( )
inlineprivate

Definition at line 100 of file factfits.h.

References fits::Table::cols, fNumRoi, fOffsetData, fOffsetStartCellData, fits::fTable, and fits::HasKey().

Referenced by factfits().

101  {
102  if (!HasKey("NPIX") || !HasKey("NROI"))
103  return false;
104 
105  if (Get<uint16_t>("NPIX")!=1440)
106  return false;
107 
108  fNumRoi = Get<uint16_t>("NROI");
109  if (fNumRoi>1024)
110  return false;
111 
112  // check column details for Data
113  const Table::Columns::const_iterator it = fTable.cols.find("Data");
114  if (it==fTable.cols.end() || it->second.num!=1440*fNumRoi || it->second.type!='I')
115  return false;
116 
117  // check column details for StartCellData
118  const Table::Columns::const_iterator is = fTable.cols.find("StartCellData");
119  if (is==fTable.cols.end() || is->second.num!=1440 || is->second.type!='I')
120  return false;
121 
122  fOffsetStartCellData = is->second.offset;
123  fOffsetData = it->second.offset;
124 
125  return true;
126  }
bool HasKey(const std::string &key) const
Definition: fits.h:1002
size_t fOffsetStartCellData
Definition: factfits.h:199
Columns cols
Definition: fits.h:116
Table fTable
Definition: fits.h:502
size_t fOffsetData
Definition: factfits.h:200
uint16_t fNumRoi
Definition: factfits.h:202

+ Here is the call graph for this function:

+ Here is the caller graph for this function: