SourceXtractorPlusPlus
0.19
SourceXtractor++, the next generation SExtractor
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
SEImplementation
Output
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
13
#include "
SEImplementation/Output/FlushableOutput.h
"
14
15
namespace
SourceXtractor {
16
17
class
FitsOutput
:
public
FlushableOutput
{
18
19
public
:
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) {
22
m_fits_writer
= std::make_shared<Euclid::Table::FitsWriter>(
m_filename
,
true
);
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
31
m_fits_writer
= std::make_shared<Euclid::Table::FitsWriter>(
m_filename
);
32
m_fits_writer
->setHduName(hdu_name.
str
());
33
}
34
35
protected
:
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
41
private
:
42
std::string
m_filename
;
43
int
m_part_nb
;
44
45
std::shared_ptr<Euclid::Table::FitsWriter>
m_fits_writer
;
46
};
47
48
}
49
50
#endif
/* _SEIMPLEMENTATION_OUTPUT_FITSOUTPUT_H_ */
SourceXtractor::FitsOutput::m_part_nb
int m_part_nb
Definition:
FitsOutput.h:43
std::shared_ptr
SourceXtractor::FitsOutput::m_filename
std::string m_filename
Definition:
FitsOutput.h:42
SourceXtractor::FlushableOutput
Definition:
FlushableOutput.h:17
std::function< Euclid::Table::Row(const SourceInterface &)>
FlushableOutput.h
std::stringstream
STL class.
std::string
STL class.
SourceXtractor::FitsOutput::nextPart
void nextPart() override
Definition:
FitsOutput.h:26
SourceXtractor::FitsOutput::writeRows
void writeRows(const std::vector< Euclid::Table::Row > &rows) override
Definition:
FitsOutput.h:36
conf.filename
string filename
Definition:
conf.py:65
std::stringstream::str
T str(T...args)
Euclid::Table::Table
std::vector< Euclid::Table::Row >
SourceXtractor::FitsOutput::m_fits_writer
std::shared_ptr< Euclid::Table::FitsWriter > m_fits_writer
Definition:
FitsOutput.h:45
SourceXtractor::FitsOutput
Definition:
FitsOutput.h:17
SourceXtractor::FitsOutput::FitsOutput
FitsOutput(const std::string &filename, SourceToRowConverter source_to_row, size_t flush_size)
Definition:
FitsOutput.h:20
FitsWriter.h
Generated by
1.8.5