|
DP3
|
Abstract base class for a table holding source parameters. More...
#include <SourceDB.h>
Public Member Functions | |
| SourceDBRep (const ParmDBMeta &ptm, bool forceNew) | |
| This creates the underlying ParmDB object. More... | |
| virtual | ~SourceDBRep () |
| virtual unsigned int | addPatch (const std::string &patchName, int catType, double apparentBrightness, double ra, double dec, bool check)=0 |
| virtual void | addSource (const SourceInfo &sourceInfo, const std::string &patchName, int catType, double apparentBrightness, const ParmMap &defaultParameters, double ra, double dec, bool check)=0 |
| virtual bool | atEnd ()=0 |
| Tell if we are the end of the file. More... | |
| virtual void | checkDuplicates ()=0 |
| virtual void | clearTables ()=0 |
| Clear database or table. More... | |
| virtual void | deleteSources (const std::string &sourceNamePattern)=0 |
| Delete the sources records matching the given (filename like) pattern. More... | |
| virtual std::vector< std::string > | findDuplicatePatches ()=0 |
| Find non-unique patch names. More... | |
| virtual std::vector< std::string > | findDuplicateSources ()=0 |
| Find non-unique source names. More... | |
| virtual void | getNextSource (SourceData &src)=0 |
| ParmDB & | getParmDB () |
| Get the associated ParmDB. More... | |
| const ParmDBMeta & | getParmDBMeta () const |
| Get the name and type of the SourceDB. More... | |
| virtual std::vector< std::string > | getPatches (int category, const std::string &pattern, double minBrightness, double maxBrightness)=0 |
| virtual std::vector< PatchInfo > | getPatchInfo (int category, const std::string &pattern, double minBrightness, double maxBrightness)=0 |
| Get the info of selected patches (default all patches). More... | |
| virtual std::vector< SourceData > | getPatchSourceData (const std::string &patchName)=0 |
| Get all data of the sources belonging to the given patch. More... | |
| virtual std::vector< SourceInfo > | getPatchSources (const std::string &patchName)=0 |
| Get the sources belonging to the given patch. More... | |
| virtual SourceInfo | getSource (const std::string &sourceName)=0 |
| Get the source type of the given source. More... | |
| virtual std::vector< SourceInfo > | getSources (const std::string &pattern)=0 |
| Get the info of all sources matching the given (filename like) pattern. More... | |
| void | link () |
| Link to the DBRep by incrementing the count. More... | |
| virtual bool | patchExists (const std::string &patchName)=0 |
| Test if the patch already exists. More... | |
| virtual void | rewind ()=0 |
| Reset to the beginning of the file. More... | |
| virtual bool | sourceExists (const std::string &sourceName)=0 |
| Test if the source already exists. More... | |
| int | unlink () |
| Unlink by decrementing the count. More... | |
| virtual void | updatePatch (unsigned int patchId, double apparentBrightness, double ra, double dec)=0 |
| Update the ra/dec and apparent brightness of a patch. More... | |
| virtual void | lock (bool lockForWrite) |
| virtual void | unlock () |
| virtual void | addSource (const SourceInfo &sourceInfo, const std::string &patchName, const ParmMap &defaultParameters, double ra, double dec, bool check)=0 |
| virtual void | addSource (const SourceData &source, bool check)=0 |
Abstract base class for a table holding source parameters.
| dp3::parmdb::SourceDBRep::SourceDBRep | ( | const ParmDBMeta & | ptm, |
| bool | forceNew | ||
| ) |
This creates the underlying ParmDB object.
|
virtual |
|
pure virtual |
Add a patch and return its patchId. Nomally ra and dec should be filled in, but for moving patches (e.g. sun) this is not needed.
Optionally it is checked if the patch already exists.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Add a source to a patch. Its ra and dec and default parameters will be stored as default values in the associated ParmDB tables. The names of the parameters will be succeeded by a colon and the source name. The map should contain the parameters belonging to the source type. Missing parameters will default to 0.
Optionally it is checked if the source already exists.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Add a source which forms a patch in itself (with the same name).
Optionally it is checked if the patch or source already exists.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Tell if we are the end of the file.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Check for duplicate patches or sources. An exception is thrown if that is the case.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Clear database or table.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Delete the sources records matching the given (filename like) pattern.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Find non-unique patch names.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Find non-unique source names.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Get the next source from the table. An exception is thrown if there are no more sources.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
inline |
Get the name and type of the SourceDB.
|
pure virtual |
Get patch names in order of category and decreasing apparent flux. category < 0 means all categories. A brightness < 0 means no test on brightness.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Get the info of selected patches (default all patches).
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Get all data of the sources belonging to the given patch.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Get the sources belonging to the given patch.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Get the source type of the given source.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Get the info of all sources matching the given (filename like) pattern.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
inline |
Link to the DBRep by incrementing the count.
|
virtual |
Writelock and unlock the database tables. The user does not need to lock/unlock, but it can increase performance if many small accesses have to be done. The default implementation does nothing.
Reimplemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Test if the patch already exists.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Reset to the beginning of the file.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Test if the source already exists.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
inline |
Unlink by decrementing the count.
|
virtual |
Reimplemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.
|
pure virtual |
Update the ra/dec and apparent brightness of a patch.
Implemented in dp3::parmdb::SourceDBCasa, and dp3::parmdb::SourceDBBlob.