SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
FitsOutput.h
Go to the documentation of this file.
1/*
2 * FitsOutput.h
3 *
4 * Created on: Feb 8, 2022
5 * Author: mschefer
6 */
7
8#ifndef _SEIMPLEMENTATION_OUTPUT_FITSOUTPUT_H_
9#define _SEIMPLEMENTATION_OUTPUT_FITSOUTPUT_H_
10
11#include "Table/FitsWriter.h"
12
14
15namespace SourceXtractor {
16
18
19public:
20 FitsOutput (const std::string& filename, SourceToRowConverter source_to_row, size_t flush_size)
21 : FlushableOutput(source_to_row, flush_size), m_filename(filename), m_part_nb(0) {
23 m_fits_writer->setHduName("CATALOG");
24 }
25
26 void nextPart() override {
27 m_part_nb++;
28 std::stringstream hdu_name;
29 hdu_name << "CATALOG_" << m_part_nb;
30
32 m_fits_writer->setHduName(hdu_name.str());
33 }
34
35protected:
36 void writeRows(const std::vector<Euclid::Table::Row>& rows) override {
37 Euclid::Table::Table table {rows};
38 m_fits_writer->addData(table);
39 }
40
41private:
44
46};
47
48}
49
50#endif /* _SEIMPLEMENTATION_OUTPUT_FITSOUTPUT_H_ */
std::shared_ptr< Euclid::Table::FitsWriter > m_fits_writer
Definition FitsOutput.h:45
void nextPart() override
Definition FitsOutput.h:26
void writeRows(const std::vector< Euclid::Table::Row > &rows) override
Definition FitsOutput.h:36
FitsOutput(const std::string &filename, SourceToRowConverter source_to_row, size_t flush_size)
Definition FitsOutput.h:20
FlushableOutput(SourceToRowConverter source_to_row, size_t flush_size)
std::function< Euclid::Table::Row(const SourceInterface &)> SourceToRowConverter
T make_shared(T... args)
T str(T... args)