sfof
Public Types | Public Member Functions | Private Attributes | List of all members
Merge_Fileio Class Reference

Class for reading files for Cat_Merge. More...

#include <cat_merge_fileio.hpp>

Public Types

typedef std::map< unsigned long, Galaxygal_container
 Map of Galaxy instances. More...
 

Public Member Functions

bool existing_clt (int, const std::vector< int > &)
 This method checks to see if a Cluster instance ID already exists. More...
 
void read_file_list (const std::string &, std::vector< Cluster > &, gal_container &, const std::string &)
 This method reads in the list containing the input file names. More...
 
void read_ascii (const std::string &, std::vector< Cluster > &, gal_container &)
 This method reads in an ASCII file and store the contents in a vector of Cluster instances. More...
 
void read_fits (const std::string &, std::vector< Cluster > &, gal_container &)
 This method reads in an FITS file and store the contents in a vector of Cluster instances. More...
 
void output_file_names (const std::string &, const std::string &, std::string &, std::string &)
 This method sets the output file names. More...
 
void read_bg_data (const std::string &, std::vector< double > &, std::vector< double > &)
 This reads backround data. More...
 

Private Attributes

Fileio fileio
 Include Fileio class. More...
 
int gal_count
 Current number of Galaxy instances. More...
 
int clt_count
 Current number of Cluster instances. More...
 
std::vector< std::string > file_list
 Vector of file names. More...
 

Detailed Description

Class for reading files for Cat_Merge.

This class handles the file input for Cat_Merge.

Member Typedef Documentation

◆ gal_container

typedef std::map<unsigned long, Galaxy> Merge_Fileio::gal_container

Map of Galaxy instances.

Member Function Documentation

◆ existing_clt()

bool Merge_Fileio::existing_clt ( int  id,
const std::vector< int > &  list 
)

This method checks to see if a Cluster instance ID already exists.

Parameters
[in]idID of Cluster instance.
[in]listVector of Cluster instance IDs.

◆ output_file_names()

void Merge_Fileio::output_file_names ( const std::string &  output,
const std::string &  output_mode,
std::string &  cluster_file_name,
std::string &  member_file_name 
)

This method sets the output file names.

Parameters
[in]outputOutput file name.
[in]output_modeOuput mode ["ascii"/"fits"].
[out]cluster_file_nameOutput Cluster list file name.
[out]member_file_nameOutput member Galaxy list file name.

◆ read_ascii()

void Merge_Fileio::read_ascii ( const std::string &  fname,
std::vector< Cluster > &  cluster_list,
gal_container gals 
)

This method reads in an ASCII file and store the contents in a vector of Cluster instances.

Parameters
[in]fnameInput file name.
[out]cluster_listVector of Cluster instances.
[in]galsMap to Galaxy instances.

◆ read_bg_data()

void Merge_Fileio::read_bg_data ( const std::string &  file_name,
std::vector< double > &  z_vals,
std::vector< double > &  count_vals 
)

This reads backround data.

Parameters
[in]file_nameBackground data file name.
[out]z_valsRedshift values from background data file.
[out]count_valsCount values from background data file.

◆ read_file_list()

void Merge_Fileio::read_file_list ( const std::string &  list,
std::vector< Cluster > &  cluster_list,
gal_container gals,
const std::string &  input_mode 
)

This method reads in the list containing the input file names.

Parameters
[in]listFile name containing the list of input file names.
[out]cluster_listVector of Cluster instances.
[in]input_modeInput mode ["ascii"/"fits"].
[in]galsMap to Galaxy instances.

◆ read_fits()

void Merge_Fileio::read_fits ( const std::string &  fname,
std::vector< Cluster > &  cluster_list,
gal_container gals 
)

This method reads in an FITS file and store the contents in a vector of Cluster instances.

Parameters
[in]fnameInput file name.
[out]cluster_listVector of Cluster instances.
[in]galsMap to Galaxy instances.

Member Data Documentation

◆ clt_count

int Merge_Fileio::clt_count
private

Current number of Cluster instances.

◆ file_list

std::vector<std::string> Merge_Fileio::file_list
private

Vector of file names.

◆ fileio

Fileio Merge_Fileio::fileio
private

Include Fileio class.

◆ gal_count

int Merge_Fileio::gal_count
private

Current number of Galaxy instances.


The documentation for this class was generated from the following files: