LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
afw
11.0-2-g04d2804
include
lsst
afw
table
io
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
"
8
#include "
lsst/afw/table/io/Persistable.h
"
9
10
namespace
lsst {
namespace
afw {
namespace
table {
11
12
class
BaseRecord;
13
template
<
typename
RecordT>
class
CatalogT;
14
typedef
CatalogT<BaseRecord>
BaseCatalog
;
15
16
namespace
io {
17
18
class
CatalogVector;
19
28
class
InputArchive
{
29
public
:
30
31
typedef
std::map<int,PTR(Persistable)>
Map
;
32
34
InputArchive
();
35
37
InputArchive
(
BaseCatalog
const
& index,
CatalogVector
const
& dataCatalogs);
38
40
InputArchive
(
InputArchive
const
& other);
41
43
InputArchive
&
operator=
(
InputArchive
const
& other);
44
45
~InputArchive
();
46
52
PTR
(
Persistable
)
get
(
int
id
) const;
53
55
template <typename T>
56
PTR
(T)
get
(
int
id
)
const
{
57
PTR
(T) p = boost::dynamic_pointer_cast<T>(
get
(
id
));
58
LSST_ARCHIVE_ASSERT
(p ||
id
== 0);
59
return
p;
60
}
61
63
Map
const
&
getAll
()
const
;
64
70
static
InputArchive
readFits
(
fits::Fits
& fitsfile);
71
72
private
:
73
74
class
Impl;
75
76
InputArchive
(
PTR
(Impl) impl);
77
78
PTR
(Impl)
_impl
;
79
};
80
81
}}}}
// namespace lsst::afw::table::io
82
83
#endif // !AFW_TABLE_IO_InputArchive_h_INCLUDED
lsst::afw::table::BaseCatalog
CatalogT< BaseRecord > BaseCatalog
Definition:
fwd.h:61
lsst::afw::table::CatalogT
A custom container class for records, based on std::vector.
Definition:
Catalog.h:94
lsst::afw::table::io::InputArchive::readFits
static InputArchive readFits(fits::Fits &fitsfile)
Read an object from an already open FITS object.
PTR
#define PTR(...)
Definition:
base.h:41
lsst::afw::fits::Fits
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Definition:
fits.h:194
lsst::afw::table::io::Persistable
A base class for objects that can be persisted via afw::table::io Archive classes.
Definition:
Persistable.h:74
lsst::afw::table::io::InputArchive::getAll
Map const & getAll() const
Load and return all objects in the archive.
lsst::afw::table::io::InputArchive::~InputArchive
~InputArchive()
lsst::afw::table::io::InputArchive::InputArchive
InputArchive()
Construct an empty InputArchive that contains no objects.
LSST_ARCHIVE_ASSERT
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
Definition:
Persistable.h:47
lsst::afw::table::io::InputArchive::_impl
boost::shared_ptr< Impl > _impl
Definition:
InputArchive.h:78
lsst::afw::table::io::InputArchive::operator=
InputArchive & operator=(InputArchive const &other)
Assignment. Does not deep-copy loaded Persistables.
lsst::afw::table::io::CatalogVector
A vector of catalogs used by Persistable.
Definition:
CatalogVector.h:26
id
int id
Definition:
CR.cc:151
lsst::afw::table::io::InputArchive::Map
std::map< int, boost::shared_ptr< Persistable > > Map
Definition:
InputArchive.h:31
lsst::afw::table::io::InputArchive::get
boost::shared_ptr< Persistable > get(int id) const
Load the Persistable with the given ID and return it.
lsst::afw::table::io::InputArchive
A multi-catalog archive object used to load table::io::Persistable objects.
Definition:
InputArchive.h:28
Persistable.h
base.h
Generated on Thu Sep 24 2015 02:29:16 for LSSTApplications by
1.8.5