7 #ifndef OUTPUT_MANAGER_HPP_ 8 #define OUTPUT_MANAGER_HPP_ 11 #include "boost/filesystem/path.hpp" 21 typedef boost::filesystem::path
path_t;
22 static path_t make_dir(std::string
const& dir);
30 std::string
const& base_out,
31 std::string
const& plot_list_path =
"",
32 const char delim =
'\t' 34 : root_(make_dir(base_out)),
35 plot_list_(path(plot_list_path)),
41 std::string
path(std::string
const& fn)
const {
42 if( root_.empty() )
return fn;
44 if( p.is_absolute() )
return p.string();
45 return (root_ / p).string();
49 if( ! ptm_.insert(plot_pair(path, pt)).second ) BOOST_THROW_EXCEPTION(
58 const std::string p = path(fn);
char csv_delim_
Definition: output_manager.hpp:69
boost::filesystem::path path_t
Definition: output_manager.hpp:21
std::string path(std::string const &fn) const
Definition: output_manager.hpp:41
path_t root_
Definition: output_manager.hpp:66
plot_type_map ptm_
Definition: output_manager.hpp:67
std::map< std::string, plot::Plot > plot_type_map
Definition: output_manager.hpp:23
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
std::string path(std::string const &fn, const plot::Plot pt)
Definition: output_manager.hpp:57
#define VDJ_PIPE_DECL
Definition: config.hpp:23
Definition: output_manager.hpp:27
boost::error_info< struct errinfo_str1_, std::string > str1_t
Definition: exception.hpp:25
Output_manager(std::string const &base_out, std::string const &plot_list_path="", const char delim= '\t')
Definition: output_manager.hpp:29
void register_plot(std::string const &path, const plot::Plot pt)
Definition: output_manager.hpp:48
Definition: exception.hpp:23
boost::error_info< struct errinfo_message_, std::string > msg_t
Definition: exception.hpp:24
plot_type_map::value_type plot_pair
Definition: output_manager.hpp:24
std::string sanitize(const char c)
Definition: sanitize_string.cpp:53
Definition: output_manager.hpp:20
char delimiter() const
Definition: output_manager.hpp:39
std::string plot_list_
Definition: output_manager.hpp:68
Plot
File format types.
Definition: file_properties.hpp:58