30 #ifndef DPP_OUTPUT_MODULE_H 31 #define DPP_OUTPUT_MODULE_H 1 35 #include <boost/scoped_ptr.hpp> 61 virtual void initialize(const ::datatools::properties & ,
73 int max_record_per_file_ = 0,
81 bool allow_duplicate_ =
false);
85 const std::string & prefix_,
86 const std::string & extension_,
88 unsigned int start_ = 0,
107 virtual void tree_dump(std::ostream & out_ = std::clog,
108 const std::string & title_ =
"",
109 const std::string & indent_ =
"",
110 bool inherit_ =
false)
const;
144 void _store_metadata_();
148 bool _preserve_existing_output_;
149 boost::scoped_ptr<io_common> _common_;
159 #endif // DPP_OUTPUT_MODULE_H
void set_single_output_file(const std::string &filepath_)
Set the filename of a single output file.
output_module(datatools::logger::priority=datatools::logger::PRIO_FATAL)
Constructor.
virtual ~output_module()
Destructor.
virtual void reset()
Reset.
Top-level namespace of the Bayeux/dpp module library.
Definition: base_module.h:56
void _set_defaults()
Set default values before explicit settings and initialization.
process_status
Processing status flags used as the returned value of data processing methods through the pipeline.
Definition: base_module.h:65
datatools::multi_properties & grab_metadata_store()
Return a mutable reference to the embedded metadata store, create it if it does not exist.
void set_context_label(const std::string &)
Set the label/name of the context service to be used.
void set_preserve_existing_output(bool preserve_existing_output)
Set the flag for preserving existing output file (prevent from file overwriting)
io_common & _grab_common()
Return a reference to the mutable internal I/O data structure.
const io_common & get_common() const
Return a reference to the non mutable internal I/O data structure.
bool is_terminated() const
Check output termination.
void set_limits(int max_record_total_, int max_record_per_file_=0, int max_files_=-1)
Set limits.
Some common data structure for I/O modules.
Definition: io_common.h:50
virtual void initialize(const ::datatools::properties &, datatools::service_manager &, dpp::module_handle_dict_type &)
Initialization.
void export_context_metadata(const std::string &)
Export a metadata section with a given name from the context service to the output stream.
void set_list_of_output_files(const std::vector< std::string > &filepaths_, bool allow_duplicate_=false)
Set the filenames of a list of output files.
std::map< std::string, module_entry_type > module_handle_dict_type
Definition: module_tools.h:141
Base processing module (abstract interface)
Definition: base_module.h:59
process_status _store(const datatools::things &data_record_)
Store a data record.
#define DPP_MODULE_REGISTRATION_INTERFACE(T)
Definition: base_module.h:231
bool has_metadata_store() const
Check if an embedded metadata store exists.
A output data processing module for automated I/O operations.
Definition: output_module.h:49
Data sink/writer abstract interface.
Definition: i_data_sink.h:49
void set_incremental_output_files(const std::string &path_, const std::string &prefix_, const std::string &extension_, unsigned int stop_, unsigned int start_=0, int increment_=1)
Set the incremented filenames of output files.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
const datatools::multi_properties & get_metadata_store() const
Return a const reference to the existing embedded metadata store.
void clear_metadata_store()
Clear the embedded metadata store.
void set_export_context_all(bool)
Export all metadata sections from the context service to the output stream.
virtual process_status process(::datatools::things &)
Data record processing.