|
DP3
|
Class for a Blob file holding source parameters. More...
#include <SourceDBBlob.h>
Public Member Functions | |
| SourceDBBlob (const ParmDBMeta &pdm, bool forceNew) | |
| ~SourceDBBlob () override | |
| unsigned int | addPatch (const std::string &patchName, int catType, double apparentBrightness, double ra, double dec, bool check) override |
| void | addSource (const SourceInfo &sourceInfo, const std::string &patchName, int catType, double apparentBrightness, const ParmMap &defaultParameters, double ra, double dec, bool check) override |
| bool | atEnd () override |
| Tell if we are the end of the file. More... | |
| void | checkDuplicates () override |
| void | clearTables () override |
| Clear file (i.e. remove everything). More... | |
| void | deleteSources (const std::string &sourceNamePattern) override |
| std::vector< std::string > | findDuplicatePatches () override |
| Find non-unique patch names. More... | |
| std::vector< std::string > | findDuplicateSources () override |
| Find non-unique source names. More... | |
| void | getNextSource (SourceData &src) override |
| std::vector< std::string > | getPatches (int category, const std::string &pattern, double minBrightness, double maxBrightness) override |
| std::vector< PatchInfo > | getPatchInfo (int category, const std::string &pattern, double minBrightness, double maxBrightness) override |
| Get the info of all patches (name, ra, dec). More... | |
| std::vector< SourceData > | getPatchSourceData (const std::string &patchName) override |
| Get all data of the sources belonging to the given patch. More... | |
| std::vector< SourceInfo > | getPatchSources (const std::string &patchName) override |
| Get the sources belonging to the given patch. More... | |
| SourceInfo | getSource (const std::string &sourceName) override |
| Get the source info of the given source. More... | |
| std::vector< SourceInfo > | getSources (const std::string &pattern) override |
| Get the info of all sources matching the given (filename like) pattern. More... | |
| bool | patchExists (const std::string &patchName) override |
| Test if the patch already exists. More... | |
| void | rewind () override |
| Reset to the beginning of the file. More... | |
| bool | sourceExists (const std::string &sourceName) override |
| Test if the source already exists. More... | |
| void | updatePatch (unsigned int patchId, double apparentBrightness, double ra, double dec) override |
| Update the ra/dec and apparent brightness of a patch. More... | |
| void | lock (bool lockForWrite) override |
| void | unlock () override |
| void | addSource (const SourceInfo &sourceInfo, const std::string &patchName, const ParmMap &defaultParameters, double ra, double dec, bool check) override |
| void | addSource (const SourceData &source, bool check) override |
Public Member Functions inherited from dp3::parmdb::SourceDBRep | |
| SourceDBRep (const ParmDBMeta &ptm, bool forceNew) | |
| This creates the underlying ParmDB object. More... | |
| virtual | ~SourceDBRep () |
| ParmDB & | getParmDB () |
| Get the associated ParmDB. More... | |
| const ParmDBMeta & | getParmDBMeta () const |
| Get the name and type of the SourceDB. More... | |
| void | link () |
| Link to the DBRep by incrementing the count. More... | |
| int | unlink () |
| Unlink by decrementing the count. More... | |
Class for a Blob file holding source parameters.
| dp3::parmdb::SourceDBBlob::SourceDBBlob | ( | const ParmDBMeta & | pdm, |
| bool | forceNew | ||
| ) |
|
override |
|
overridevirtual |
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.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
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 preceeded by the source name and a colon. 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.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Add a source which forms a patch in itself (with the same name).
Optionally it is checked if the patch or source already exists.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Tell if we are the end of the file.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Check for duplicate patches or sources. An exception is thrown if that is the case.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Clear file (i.e. remove everything).
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Delete the sources records matching the given (filename like) pattern. This is not possible yet.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Find non-unique patch names.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Find non-unique source names.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Get the next source from the table. An exception is thrown if there are no more sources.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Get patch names in order of category and decreasing apparent flux. category < 0 means all categories. A brightness < 0 means no test on brightness.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Get the info of all patches (name, ra, dec).
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Get all data of the sources belonging to the given patch.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Get the sources belonging to the given patch.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Get the source info of the given source.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Get the info of all sources matching the given (filename like) pattern.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Writelock and unlock the file. It does not do anything.
Reimplemented from dp3::parmdb::SourceDBRep.
|
overridevirtual |
Test if the patch already exists.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Reset to the beginning of the file.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Test if the source already exists.
Implements dp3::parmdb::SourceDBRep.
|
overridevirtual |
Reimplemented from dp3::parmdb::SourceDBRep.
|
overridevirtual |
Update the ra/dec and apparent brightness of a patch.
Implements dp3::parmdb::SourceDBRep.