sfof
cat_split.hpp
Go to the documentation of this file.
1 
7 #ifndef CAT_SPLIT_H
8 #define CAT_SPLIT_H
9 
19 #include <fstream>
20 #include <iomanip>
21 #include <iostream>
22 #include <math.h>
23 #include <sstream>
24 #include <string>
25 #include <vector>
26 #include "comp.hpp"
27 #include "fileio_class.hpp"
28 #include "option_class.hpp"
29 
30 class Cat_Split { // Class for Cat_Split functions
31 
32 public:
33 
36 
43  void read_options (int, char *[]);
44 
48  void set_up ();
49 
53  void open_files ();
54 
58  void close_files ();
59 
65  void check_pos (double, double);
66 
74  void find_bin (double, double, std::vector<int> &);
75 
80  void read_ascii ();
81 
82 private:
83 
86 
89 
92 
94  double ra_bin_size;
95 
97  double dec_bin_size;
98 
100  std::vector<std::ofstream*> file_list;
101 
102 };
103 
104 #endif // CAT_SPLIT_H
Option
Class for reading code options.
Definition: option_class.hpp:24
Fileio
Class for file input and output.
Definition: fileio_class.hpp:33
Cat_Split
Class for splitting galaxy catalogues.
Definition: cat_split.hpp:30
Cat_Split::fileio
Fileio fileio
Include Fileio class.
Definition: cat_split.hpp:85
Cat_Split::open_files
void open_files()
This method opens all of the split files.
Definition: cat_split.cpp:56
Comp
Class containing basic functions used in generic codes.
Definition: comp.hpp:18
Cat_Split::read_options
void read_options(int, char *[])
This method calls Option to read the code options from the provided arguments.
Definition: cat_split.cpp:7
comp.hpp
Cat_Split::ra_bin_size
double ra_bin_size
Range in right ascension covered by each split file.
Definition: cat_split.hpp:94
option_class.hpp
Cat_Split::dec_bin_size
double dec_bin_size
Range in declination covered by each split file.
Definition: cat_split.hpp:97
Cat_Split::set_up
void set_up()
This method sets up the of split files.
Definition: cat_split.cpp:13
Cat_Split::comp
Comp comp
Include Comp class.
Definition: cat_split.hpp:35
Cat_Split::file_list
std::vector< std::ofstream * > file_list
Vector of output file pointers.
Definition: cat_split.hpp:100
Cat_Split::check_pos
void check_pos(double, double)
This method checks the ra and dec of a given object.
Definition: cat_split.cpp:70
Cat_Split::number_of_files
int number_of_files
Number of files to which split data will be written.
Definition: cat_split.hpp:91
Cat_Split::close_files
void close_files()
This method closes all of the split files.
Definition: cat_split.cpp:65
Cat_Split::opt
Option opt
Include Option class.
Definition: cat_split.hpp:88
Cat_Split::find_bin
void find_bin(double, double, std::vector< int > &)
This method determines to which split file a given galaxy should be written.
Definition: cat_split.cpp:82
Cat_Split::read_ascii
void read_ascii()
This method reads the galaxies from the input catalogues and writes them to the corresponding split f...
Definition: cat_split.cpp:100
fileio_class.hpp