DataMethodFactory.hxx File Reference

Factory functions to select the correct data methods. More...

#include <cstdlib>
#include <map>
#include <string>
#include "Constants.h"
#include "FitsFile.h"
#include "MyException.h"
#include "TableInfo.h"
#include "IllumTable.hxx"
#include <exception>
#include "Options.h"
#include "StringOps.h"
#include "DataMethod.hxx"
#include <limits>
#include "Converter.h"
#include "DataOps.h"
#include "Logger.h"
#include "slalib.h"
#include "htm.h"
#include <float.h>
#include "IllumTable.hxx"
#include <cmath>
#include "ast.h"
#include <algorithm>
#include <time.h>
#include "ProgrammeTable.h"
Include dependency graph for DataMethodFactory.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DataMethodFactoryException
 Exception thrown if there is some problem in selecting a data method. More...

Functions

bool isMagnitudeError (const std::string &name)
bool isMagnitude (const std::string &name)
bool isAperMag (const std::string &name)
bool isWcsQuantity (const std::string &name)
 Does the given name correspond to an attribute calculated from WCS info?
std::map< int, StringMapmakeTargetList (TableInfo &info)
bool isFrameID (const std::string &name)
template<typename DataType >
DataMethod< DataType > * getFrameIDMethod (const std::string &name, TableInfo &info, FitsFile &ff)
template<typename DataType >
DataMethod< DataType > * getMethod (StringMap &target, TableInfo &info, IllumTable &illum, FitsFile &fpix, FitsFile &fcat)

Detailed Description

Factory functions to select the correct data methods.

Warning:
Only suitable for FITS ingest work
Author:
Ian Bond WFAU, IfA, University of Edinburgh

Function Documentation

template<typename DataType >
DataMethod<DataType>* getFrameIDMethod ( const std::string &  name,
TableInfo info,
FitsFile ff 
) [inline]

Select the appropriate frame ID method (direct or indirect) according to the given name (which corresponds to some frame ID quantity)

References TableInfo::getAttNo(), FitsFile::getFileName(), and TableInfo::getUsingValue().

template<typename DataType >
DataMethod<DataType>* getMethod ( StringMap target,
TableInfo info,
IllumTable illum,
FitsFile fpix,
FitsFile fcat 
) [inline]

Factory function to select (instantiate) the correct DataMethod subclass for the given target list

References ExpectNames::axis1Length, ExpectNames::axis2Length, ExpectNames::b, ExpectNames::catName, ExpectNames::centralDec, ExpectNames::centralRa, ExpectNames::cuEventID, ExpectNames::cx, ExpectNames::cy, ExpectNames::cz, ExpectNames::dec, ExpectNames::decMoon, ExpectNames::decMoonTopo, ExpectNames::deltaMag, ExpectNames::distortCorr, ExpectNames::eta, ExpectNames::fileName, ExpectNames::fileTimeStamp, ExpectNames::filterID, ExpectNames::frameType, Options::getArchive(), TableInfo::getAttNo(), TableInfo::getUsingValue(), ExpectNames::hlCircRadAs, ExpectNames::hlCircRadErrAs, ExpectNames::hlCorSMjRadAs, ExpectNames::hlCorSMnRadAs, ExpectNames::hlGeoRadAs, ExpectNames::hlSMjRadAs, ExpectNames::hlSMnRadAs, ExpectNames::htmID, TagNames::HTMLEVEL, ExpectNames::illumCorr, ExpectNames::illumMoon, ExpectNames::imageExtent, isFrameID(), isMagnitude(), isMagnitudeError(), TableInfo::isTableNumeric(), ExpectNames::julianDayNum, ExpectNames::l, ExpectNames::lambda, ExpectNames::maxDec, ExpectNames::maxRa, ExpectNames::minDec, ExpectNames::minRa, ExpectNames::numAxes, ExpectNames::numDetectors, ExpectNames::objectId, ExpectNames::posAngle, ExpectNames::programmeID, ExpectNames::project, ExpectNames::ra, ExpectNames::raBase, ExpectNames::raMoon, ExpectNames::raMoonTopo, TableInfo::readTag(), ExpectNames::saturatCorr, ExpectNames::skySubScale, StringOps::ToLower(), ExpectNames::totalExpTime, ExpectNames::ukirtRunNo, ExpectNames::utDate, ExpectNames::versionNum, ExpectNames::vistaRunNo, ExpectNames::xPixSize, and ExpectNames::yPixSize.

bool isAperMag ( const std::string &  name  ) 

Does the given std::string match an attribute name that corresponds to a corrected aperture magnitude?

References StringOps::hasSubstr(), and isMagnitudeError().

Referenced by makeTargetList().

bool isFrameID ( const std::string &  name  ) 
bool isMagnitude ( const std::string &  name  ) 

Does the given std::string match an attribute name that corresponds to a magnitude?

References StringOps::hasSubstr(), and isMagnitudeError().

Referenced by getMethod(), and makeTargetList().

bool isMagnitudeError ( const std::string &  name  ) 

Returns true if the given name corresponds to an magnitude error attribute name

References StringOps::hasSubstr().

Referenced by getMethod(), isAperMag(), and isMagnitude().

bool isWcsQuantity ( const std::string &  name  ) 

Does the given name correspond to an attribute calculated from WCS info?

References ExpectNames::centralDec, ExpectNames::centralRa, ExpectNames::imageExtent, ExpectNames::maxDec, ExpectNames::maxRa, ExpectNames::minDec, and ExpectNames::minRa.

std::map<int, StringMap> makeTargetList ( TableInfo info  ) 
Generated on Mon Oct 4 10:38:44 2010 for WfcamSrc by  doxygen 1.6.3