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);
23 typedef std::map<std::string,plot::Plot> plot_type_map;
24 typedef plot_type_map::value_type plot_pair;
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)),
39 char delimiter()
const {
return csv_delim_;}
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();
48 void register_plot(std::string
const& path,
const plot::Plot pt) {
49 if( ! ptm_.insert(plot_pair(path, pt)).second ) BOOST_THROW_EXCEPTION(
51 << Err::msg_t(
"output already registered")
52 << Err::str1_t(sanitize(path))
58 const std::string p = path(fn);
68 std::string plot_list_;
Plot
File format types.
Definition: file_properties.hpp:58
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
std::string path(std::string const &fn, const plot::Plot pt)
Definition: output_manager.hpp:57
Definition: output_manager.hpp:27
Definition: exception.hpp:23
Definition: output_manager.hpp:20