explicit_mapmaking
 All Classes Files Pages
io_manager.hpp
Go to the documentation of this file.
1 
8 #ifndef EXPLICIT_MAPMAKING_IO_MANAGER_HPP_
9 #define EXPLICIT_MAPMAKING_IO_MANAGER_HPP_
10 
11 #include "data_manager.hpp"
12 #include "matrix.hpp"
13 #include <boost/filesystem.hpp>
14 #include <mpi.h>
15 
16 namespace fs = boost::filesystem;
17 
18 namespace mapmaking {
19 class IOManager {
20  public:
21  IOManager(const MPI_Comm comm);
22  DataManager LoadData(fs::path data_folder, char stokes, int proc_per_file);
23  void SaveMap(fs::path filename, Matrix& matrix, const DataManager& data_manager);
24  void SaveMap(fs::path filename, Matrix& matrix, const std::vector<int>& obspix);
25  void SaveMap(fs::path filename, const std::vector<double>& vec, const DataManager& data_manager);
26  void SaveMap(fs::path filename, const std::vector<double>& vec, const std::vector<int>& obspix);
27  Matrix LoadMap(fs::path filename, std::string stokes, Grid* grid);
28  std::vector<double> LoadMap(fs::path filename, std::string stokes);
29 
30  private:
31  const MPI_Comm comm_;
32  int my_rank_;
33  int n_proc_;
34 
35 };
36 }
37 #endif // EXPLICIT_MAPMAKING_IO_MANAGER_HPP_
Definition: data_manager.hpp:21
Distributed matrix (see scalapack)
Definition: grid.hpp:16
Definition: atfa.hpp:18
Definition: io_manager.hpp:19
Definition: matrix.hpp:22
Data Handler.