LSST Applications  21.0.0+3c14b91618,21.0.0+9f51b1e3f7,21.0.0-1-ga51b5d4+6691386486,21.0.0-10-g2408eff+093cbc5a4d,21.0.0-10-g560fb7b+b5197f4bfa,21.0.0-10-gcf60f90+88fef039d6,21.0.0-15-g490e301a+1aca7ce27a,21.0.0-2-g103fe59+a65a629d54,21.0.0-2-g1367e85+7f080822af,21.0.0-2-g45278ab+9f51b1e3f7,21.0.0-2-g5242d73+7f080822af,21.0.0-2-g7f82c8f+20b0e168c7,21.0.0-2-g8f08a60+e6fd6d9ff9,21.0.0-2-ga326454+20b0e168c7,21.0.0-2-gde069b7+66c51b65da,21.0.0-2-gecfae73+1385e31ff3,21.0.0-2-gfc62afb+7f080822af,21.0.0-20-g09baf175d+b753e4a737,21.0.0-3-g357aad2+34cf5c551a,21.0.0-3-g4be5c26+7f080822af,21.0.0-3-g65f322c+013fced60c,21.0.0-3-g7d9da8d+3c14b91618,21.0.0-3-gaa929c8+b5197f4bfa,21.0.0-3-ge02ed75+1caa01c806,21.0.0-4-g3af6bfd+3791265f16,21.0.0-4-g591bb35+1caa01c806,21.0.0-4-g88306b8+fb98652b4f,21.0.0-4-gccdca77+86bf7a300d,21.0.0-4-ge8a399c+b26ce82291,21.0.0-43-g9a3faf29+c9d24e8573,21.0.0-5-g073e055+09d740ccc5,21.0.0-6-g2d4f3f3+9f51b1e3f7,21.0.0-6-g4e60332+1caa01c806,21.0.0-6-g8356267+caf0b8986d,21.0.0-7-g6531d7b+5c053f0a73,21.0.0-7-g98eecf7+3609eddee2,21.0.0-8-ga5967ee+609c2f0a1c,master-gac4afde19b+1caa01c806,w.2021.09
LSST Data Management Base Package
InputArchive.h
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 #ifndef AFW_TABLE_IO_InputArchive_h_INCLUDED
3 #define AFW_TABLE_IO_InputArchive_h_INCLUDED
4 
5 #include <map>
6 
7 #include "lsst/base.h"
9 
10 namespace lsst {
11 namespace afw {
12 namespace table {
13 
14 class BaseRecord;
15 template <typename RecordT>
16 class CatalogT;
17 typedef CatalogT<BaseRecord> BaseCatalog;
18 
19 namespace io {
20 
21 class CatalogVector;
22 
32 public:
34 
36  InputArchive();
37 
39  InputArchive(BaseCatalog const& index, CatalogVector const& dataCatalogs);
40 
44 
48 
50 
56  std::shared_ptr<Persistable> get(int id) const;
57 
59  template <typename T>
60  std::shared_ptr<T> get(int id) const {
61  std::shared_ptr<T> p = std::dynamic_pointer_cast<T>(get(id));
62  LSST_ARCHIVE_ASSERT(p || id == 0);
63  return p;
64  }
65 
67  Map const& getAll() const;
68 
74  static InputArchive readFits(fits::Fits& fitsfile);
75 
76 private:
77  class Impl;
78 
80 
82 };
83 } // namespace io
84 } // namespace table
85 } // namespace afw
86 } // namespace lsst
87 
88 #endif // !AFW_TABLE_IO_InputArchive_h_INCLUDED
ItemVariant const * other
Definition: Schema.cc:56
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
Definition: Persistable.h:48
Basic LSST definitions.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Definition: fits.h:297
A vector of catalogs used by Persistable.
Definition: CatalogVector.h:29
A multi-catalog archive object used to load table::io::Persistable objects.
Definition: InputArchive.h:31
static InputArchive readFits(fits::Fits &fitsfile)
Read an object from an already open FITS object.
InputArchive & operator=(InputArchive const &other)
Assignment. Does not deep-copy loaded Persistables.
Map const & getAll() const
Load and return all objects in the archive.
std::shared_ptr< Persistable > get(int id) const
Load the Persistable with the given ID and return it.
std::map< int, std::shared_ptr< Persistable > > Map
Definition: InputArchive.h:33
std::shared_ptr< T > get(int id) const
Load an object of the given type and ID with error checking.
Definition: InputArchive.h:60
InputArchive()
Construct an empty InputArchive that contains no objects.
class[[deprecated("Removed with no replacement (but see lsst::afw::image::TransmissionCurve). Will be " "removed after v22.")]] FilterProperty final
Describe the properties of a Filter (e.g.
Definition: Filter.h:53
CatalogT< BaseRecord > BaseCatalog
Definition: fwd.h:71
A base class for image defects.