diff --git a/README.rst b/README.rst index b57201382..e1c1f8720 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ Bayeux C++ Library for Experimental Particle and Nuclear Physics :width: 200pt :Authors: The BxCppDev_ group -:Date: 2022-05-03 +:Date: 2022-06-07 :Contact: bayeux@lpccaen.in2p3.fr .. contents:: @@ -169,9 +169,9 @@ Spack_ package manager to satisfy Bayeux's software dependencies. Releases -------- -* Latest release: `Bayeux-3.5.1`_ +* Latest release: `Bayeux-3.5.3`_ -.. _`Bayeux-3.5.1`: https://github.com/BxCppDev/Bayeux/releases/tag/Bayeux-3.5.1 +.. _`Bayeux-3.5.3`: https://github.com/BxCppDev/Bayeux/releases/tag/Bayeux-3.5.3 .. raw:: pdf @@ -193,7 +193,7 @@ Getting Bayeux You can obtain the Bayeux source code from the main BxCppDev GitHub repository. -For example, to download Bayeux version 3.5.1, you may use, assuming a +For example, to download Bayeux version 3.5.3, you may use, assuming a Linux system: .. code:: sh @@ -201,17 +201,17 @@ Linux system: $ cd ${HOME} $ mkdir -p ${HOME}/BxCppDev $ cd ${HOME}/BxCppDev - $ wget https://github.com/BxCppDev/Bayeux/archive/Bayeux-3.5.1.tar.gz - $ mkdir Bayeux-3.5.1 && \ - tar xvzf Bayeux-3.5.1.tar.gz -C Bayeux-3.5.1 --strip-components=1 - $ cd Bayeux-3.5.1/ + $ wget https://github.com/BxCppDev/Bayeux/archive/Bayeux-3.5.3.tar.gz + $ mkdir Bayeux-3.5.3 && \ + tar xvzf Bayeux-3.5.3.tar.gz -C Bayeux-3.5.3 --strip-components=1 + $ cd Bayeux-3.5.3/ .. -The ``${HOME}/BxCppDev/Bayeux-3.5.1/`` source directory is thus +The ``${HOME}/BxCppDev/Bayeux-3.5.3/`` source directory is thus created. -You can now create a dedicated directory to build Bayeux 3.5.1 +You can now create a dedicated directory to build Bayeux 3.5.3 following the guidelines in the *Installing Bayeux* section below. Note that different versions of Bayeux may have slightly different build/installation procedures, so you should read carefully the @@ -309,7 +309,7 @@ managers (Linuxbrew, Spack) may help too. .. https://github.com/BxCppDev/BxInstallers -.. _`Bayeux-3.5.1`: https://github.com/BxCppDev/Bayeux/releases/tag/Bayeux-3.5.1 +.. _`Bayeux-3.5.3`: https://github.com/BxCppDev/Bayeux/releases/tag/Bayeux-3.5.3 We list below the third party softwares required by Bayeux. If some of them are not available from the system package manager, you will have diff --git a/archived_notes/index.rst b/archived_notes/index.rst index 3165b17b3..d5ff831ce 100644 --- a/archived_notes/index.rst +++ b/archived_notes/index.rst @@ -17,6 +17,9 @@ Version Release Date 3.4.3_ 2020-07-23 3.4.4_ 2021-01-10 3.5.0_ 2021-05-17 +3.5.1_ 2021-04-05 +3.5.2_ 2022-05-03 +3.5.3_ 2022-06-07 ======================= ============ .. _3.1.2: release_notes-3.1.2.rst @@ -28,3 +31,6 @@ Version Release Date .. _3.4.3: release_notes-3.4.3.rst .. _3.4.4: release_notes-3.4.4.rst .. _3.5.0: release_notes-3.5.0.rst +.. _3.5.1: release_notes-3.5.1.rst +.. _3.5.2: release_notes-3.5.2.rst +.. _3.5.3: release_notes-3.5.3.rst diff --git a/archived_notes/release_notes-3.5.2.rst b/archived_notes/release_notes-3.5.2.rst new file mode 100644 index 000000000..b8375bcbe --- /dev/null +++ b/archived_notes/release_notes-3.5.2.rst @@ -0,0 +1,43 @@ +============================= +Bayeux 3.5.2 Release Notes +============================= + +Bayeux 3.5.2 adds some new features as well as fixes for reported issues. + +For information on changes made in previous versions, please see +the `release notes archive`_. + +.. _`release notes archive` : archived_notes/index.rst + +.. contents: + +Requirements +============ + +* Bayeux 3.5.2 requires Linux (recommended Ubuntu >=18.04, preferred + 20.04, CentOS >=7.5), or macOS 10. +* Bayeux 3.5.2 depends on BxDecay >=1.1.0. + +Additions +========= + + +Removals +========= + + +Changes +======= + + +Fixes +===== + +* Refactor the ``geomtools::shape_factory`` class. + + +Bugs +==== + + +.. end diff --git a/archived_notes/release_notes-3.5.3.rst b/archived_notes/release_notes-3.5.3.rst new file mode 100644 index 000000000..740078d82 --- /dev/null +++ b/archived_notes/release_notes-3.5.3.rst @@ -0,0 +1,43 @@ +============================= +Bayeux 3.5.3 Release Notes +============================= + +Bayeux 3.5.3 adds some new features as well as fixes for reported issues. + +For information on changes made in previous versions, please see +the `release notes archive`_. + +.. _`release notes archive` : archived_notes/index.rst + +.. contents: + +Requirements +============ + +* Bayeux 3.5.3 requires Linux (Ubuntu >=18.04, preferred + 20.04, CentOS >=7.5), or macOS 10. +* Bayeux 3.5.3 depends on BxDecay >=1.1.0. + +Additions +========= + + +Removals +========= + + +Changes +======= + + +Fixes +===== + +* Fix bug in ``dpp::input_module`` class. + + +Bugs +==== + + +.. end diff --git a/cmake/BxPackageVersions.db b/cmake/BxPackageVersions.db index 74838aa04..bbb81b44c 100644 --- a/cmake/BxPackageVersions.db +++ b/cmake/BxPackageVersions.db @@ -5,7 +5,7 @@ 3.2.0 3.3.0 3.4.4 -3.5.2 +3.5.3 # Version 4 is reserved for future Bayeux4 # We will limit this Bayeux to versions 3.X.Y # end \ No newline at end of file diff --git a/release_notes.rst b/release_notes.rst index b8375bcbe..b06e5261a 100644 --- a/release_notes.rst +++ b/release_notes.rst @@ -1,8 +1,8 @@ ============================= -Bayeux 3.5.2 Release Notes +Bayeux 3.5.4 Release Notes ============================= -Bayeux 3.5.2 adds some new features as well as fixes for reported issues. +Bayeux 3.5.4 adds some new features as well as fixes for reported issues. For information on changes made in previous versions, please see the `release notes archive`_. @@ -14,9 +14,9 @@ the `release notes archive`_. Requirements ============ -* Bayeux 3.5.2 requires Linux (recommended Ubuntu >=18.04, preferred +* Bayeux 3.5.4 requires Linux (Ubuntu >=18.04, preferred 20.04, CentOS >=7.5), or macOS 10. -* Bayeux 3.5.2 depends on BxDecay >=1.1.0. +* Bayeux 3.5.4 depends on BxDecay >=1.1.0. Additions ========= @@ -32,9 +32,6 @@ Changes Fixes ===== - -* Refactor the ``geomtools::shape_factory`` class. - Bugs ==== diff --git a/source/bxdpp/include/dpp/base_module.h b/source/bxdpp/include/dpp/base_module.h index 430f08704..493c404db 100644 --- a/source/bxdpp/include/dpp/base_module.h +++ b/source/bxdpp/include/dpp/base_module.h @@ -202,9 +202,9 @@ namespace dpp { std::string _name; //!< The name of the module std::string _description; //!< The description of the module - datatools::logger::priority _logging; //!< The logging priority threshold + datatools::logger::priority _logging = datatools::logger::PRIO_FATAL; //!< The logging priority threshold - bool _initialized; //!< The initialization flag + bool _initialized = false; //!< The initialization flag std::string _last_error_message; //!< Last error message (questionable) // Factory stuff : diff --git a/source/bxdpp/include/dpp/input_module.h b/source/bxdpp/include/dpp/input_module.h index 31d7aad0a..36e783d22 100644 --- a/source/bxdpp/include/dpp/input_module.h +++ b/source/bxdpp/include/dpp/input_module.h @@ -1,9 +1,9 @@ /// \file dpp/input_module.h /* Author(s) : Francois Mauger * Creation date : 2013-08-16 - * Last modified : 2013-12-13 + * Last modified : 2022-06-06 * - * Copyright (C) 2013 Francois Mauger + * Copyright (C) 2013-2022 Francois Mauger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -161,10 +161,10 @@ namespace dpp { private: - bool _clear_record_; //!< A flag to automatically clear the data record before processing - boost::scoped_ptr _common_; //!< Common data structure - i_data_source * _source_ = nullptr; //!< Abstract data reader - bool _metadata_updated_ = false; //!< Flag for possible metadata update + bool _clear_record_ = false; //!< A flag to automatically clear the data record before processing + std::unique_ptr _common_; //!< Common data structure + i_data_source * _source_ = nullptr; //!< Abstract data reader + bool _metadata_updated_ = false; //!< Flag for possible metadata update // Macro to automate the registration of the module : DPP_MODULE_REGISTRATION_INTERFACE(input_module) diff --git a/source/bxdpp/include/dpp/io_common.h b/source/bxdpp/include/dpp/io_common.h index 1c8364ec3..efd982c44 100644 --- a/source/bxdpp/include/dpp/io_common.h +++ b/source/bxdpp/include/dpp/io_common.h @@ -192,28 +192,28 @@ namespace dpp { // Configuration attributes: std::string _module_name_; //!< Name of the associated module - io_type _io_; //!< I/O flag - format_type _format_; //!< Format flag - datatools::logger::priority * _logging_; //!< Handle to the logging priority of the associated module - int _max_record_per_file_; //!< Maximum number of event records per file - int _max_record_total_; //!< Maximum number of event records to be processed - int _max_files_; //!< Maximum number of data files to be processed + io_type _io_ = IO_INVALID; //!< I/O flag + format_type _format_ = FORMAT_INVALID; //!< Format flag + datatools::logger::priority * _logging_ = nullptr; //!< Handle to the logging priority of the associated module + int _max_record_per_file_ = 0; //!< Maximum number of event records per file + int _max_record_total_ = 0; //!< Maximum number of event records to be processed + int _max_files_ = -1; //!< Maximum number of data files to be processed datatools::smart_filename _filenames_; //!< Smart list of data filenames // Running/dynamic attributes: - bool _terminated_; //!< Termination flag - int _file_record_counter_; //!< Event record counter in the current file - int _record_counter_; //!< Total event record counter - int _file_index_; //!< Index of the current datafile index + bool _terminated_ = false; //!< Termination flag + int _file_record_counter_ = 0; //!< Event record counter in the current file + int _record_counter_ = 0; //!< Total event record counter + int _file_index_ = -1; //!< Index of the current datafile index // Metadata support: datatools::multi_properties _metadata_store_; //!< Embedded metadata container // Context service (external metadata container): std::string _Ctx_label_; //!< The label/name of the context service - dpp::context_service * _Ctx_service_; //!< The handle to the context service + dpp::context_service * _Ctx_service_ = nullptr; //!< The handle to the context service std::vector _Ctx_metadata_; //!< The list of labels of the metadata to be taken into account - bool _Ctx_metadata_all_; //!< Flag to accept all metadata + bool _Ctx_metadata_all_ = false; //!< Flag to accept all metadata }; diff --git a/source/bxdpp/include/dpp/output_module.h b/source/bxdpp/include/dpp/output_module.h index db19a2bc8..8fff90380 100644 --- a/source/bxdpp/include/dpp/output_module.h +++ b/source/bxdpp/include/dpp/output_module.h @@ -1,9 +1,9 @@ /// \file dpp/output_module.h /* Author(s) : Francois Mauger * Creation date : 2013-08-16 - * Last modified : 2014-01-15 + * Last modified : 2022-06-06 * - * Copyright (C) 2013-2014 Francois Mauger + * Copyright (C) 2013-2022 Francois Mauger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,9 +30,10 @@ #ifndef DPP_OUTPUT_MODULE_H #define DPP_OUTPUT_MODULE_H 1 +// Standard library: +#include + // Third party: -// - Boost: -#include // - Bayeux/datatools: #include @@ -145,9 +146,9 @@ namespace dpp { private: - bool _preserve_existing_output_; //!< Flag to preserve existing output files - boost::scoped_ptr _common_; //!< Common data structure - i_data_sink * _sink_ = nullptr; //!< Abstract data writer + bool _preserve_existing_output_ = false; //!< Flag to preserve existing output files + std::unique_ptr _common_; //!< Common data structure + i_data_sink * _sink_ = nullptr; //!< Abstract data writer // Macro to automate the registration of the module : DPP_MODULE_REGISTRATION_INTERFACE(output_module) diff --git a/source/bxdpp/src/input_module.cc b/source/bxdpp/src/input_module.cc index 3f8c0dd0e..3760156f7 100644 --- a/source/bxdpp/src/input_module.cc +++ b/source/bxdpp/src/input_module.cc @@ -1,6 +1,6 @@ /* input_module.cc * - * Copyright (C) 2013 Francois Mauger + * Copyright (C) 2013-2022 Francois Mauger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -188,7 +188,6 @@ namespace dpp { return _clear_record_; } - void input_module::_set_defaults() { _clear_record_ = false; @@ -209,6 +208,7 @@ namespace dpp { { if (! _common_) { _common_.reset(new io_common(_logging, get_name())); + _common_->set_io(io_common::IO_INPUT); } return *_common_.get(); } @@ -217,7 +217,7 @@ namespace dpp { input_module::input_module(datatools::logger::priority logging_priority_) : base_module(logging_priority_) { - _set_defaults (); + _set_defaults(); return; } @@ -232,7 +232,7 @@ namespace dpp { datatools::service_manager & a_service_manager, dpp::module_handle_dict_type & /*a_module_dict*/) { - DT_THROW_IF(is_initialized (), + DT_THROW_IF(is_initialized(), std::logic_error, "Input module '" << get_name () << "' is already initialized ! "); @@ -240,15 +240,21 @@ namespace dpp { set_clear_record(a_config.fetch_boolean("clear_record")); } + // DT_LOG_DEBUG(datatools::logger::PRIO_DEBUG, "common initialize..."); _common_initialize(a_config); - + // DT_LOG_DEBUG(datatools::logger::PRIO_DEBUG, "common initialize done."); /************************************************************** * fetch setup parameters from the configuration container * **************************************************************/ if (! _common_) { + // DT_LOG_DEBUG(datatools::logger::PRIO_DEBUG, "I/O common does not exist. Create it!"); _grab_common(); + } else { + // DT_LOG_DEBUG(datatools::logger::PRIO_DEBUG, "I/O common exists"); } + + // DT_LOG_DEBUG(datatools::logger::PRIO_DEBUG, "Initializing I/O common..."); _common_.get()->initialize(a_config, a_service_manager); /* @@ -262,14 +268,16 @@ namespace dpp { base_module::process_status status = _open_source(); } */ + // DT_LOG_DEBUG(datatools::logger::PRIO_DEBUG, "About to open the source"); this->_open_source(); + // DT_LOG_DEBUG(datatools::logger::PRIO_DEBUG, "Source open"); /************************************* * end of the initialization step * *************************************/ // Tag the module as initialized : - _set_initialized (true); + _set_initialized(true); return; } @@ -281,23 +289,23 @@ namespace dpp { "Input module '" << get_name () << "' is not initialized !"); // Tag the module as un-initialized : - _set_initialized (false); + _set_initialized(false); /**************************** * revert to some defaults * ****************************/ - if (_source_ != 0) { - if (_source_->is_open ()) { - _source_->close (); + if (_source_ != nullptr) { + if (_source_->is_open()) { + _source_->close(); } delete _source_; - _source_ = 0; + _source_ = nullptr; } _grab_common().clear_metadata_store(); _common_.get()->reset(); - _common_.reset(0); - _set_defaults (); + _common_.reset(); + _set_defaults(); /**************************** * end of the reset step * @@ -352,7 +360,9 @@ namespace dpp { _source_->open(); } DT_LOG_TRACE(_logging, "Source is open."); + DT_LOG_DEBUG(_logging, "Load metadata"); _load_metadata_(); + DT_LOG_DEBUG(_logging, "Done"); // Check if we have some records in it : if (! _source_->has_next_record()) { DT_LOG_TRACE(_logging, "NO NEXT RECORD."); @@ -482,7 +492,7 @@ namespace dpp { bool input_module::has_metadata_store() const { - return (_common_.get() != 0); + return (_common_.get() != nullptr); } const datatools::multi_properties & input_module::get_metadata_store() const diff --git a/source/bxdpp/src/io_common.cc b/source/bxdpp/src/io_common.cc index 4f54f4e98..146beda84 100644 --- a/source/bxdpp/src/io_common.cc +++ b/source/bxdpp/src/io_common.cc @@ -386,8 +386,10 @@ namespace dpp { void io_common::_set_defaults() { - _logging_ = 0; + _logging_ = nullptr; _module_name_.clear(); + _io_ = IO_INVALID; //!< I/O flag + _format_ = FORMAT_INVALID; //!< Format flag _max_record_per_file_ = 0; _max_record_total_ = 0; _max_files_ = -1; @@ -424,6 +426,7 @@ namespace dpp { void io_common::initialize(const datatools::properties & a_config, datatools::service_manager & a_service_manager) { + // DT_LOG_DEBUG(datatools::logger::PRIO_DEBUG, "Entering..."); // a_config.tree_dump(std::cerr, "I/O common initialize: ", "[DEVEL] "); /************************************************************** @@ -432,6 +435,7 @@ namespace dpp { if (! _filenames_.is_valid()) { init_filenames(a_config); } + // DT_LOG_DEBUG(datatools::logger::PRIO_DEBUG, "Filenames init..."); if (_max_files_ < 0) { if (a_config.has_key("max_files")) { @@ -460,12 +464,11 @@ namespace dpp { } } - if (_Ctx_service_ == 0) { + if (_Ctx_service_ == nullptr) { if (a_config.has_key("Ctx_label")) { _Ctx_label_ = a_config.fetch_string("Ctx_label"); } if (! _Ctx_label_.empty()) { - if (a_service_manager.has(_Ctx_label_) && a_service_manager.is_a(_Ctx_label_)) { dpp::context_service & Ctx @@ -486,6 +489,7 @@ namespace dpp { /************************************* * end of the initialization step * *************************************/ + // DT_LOG_DEBUG(datatools::logger::PRIO_DEBUG, "Exiting."); return; } @@ -514,9 +518,10 @@ namespace dpp { datatools::multi_properties & io_common::grab_metadata_store() { - DT_THROW_IF(_io_ == IO_INPUT, - std::logic_error, - "Cannot obtain write access on the metadata store in 'input' mode !"); + // 2022-06-06 FM: remove this test + // DT_THROW_IF(_io_ == IO_INPUT, + // std::logic_error, + // "Cannot obtain write access on the metadata store in 'input' mode !"); return _metadata_store_; } diff --git a/source/bxdpp/src/output_module.cc b/source/bxdpp/src/output_module.cc index 69402cc9c..598d16232 100644 --- a/source/bxdpp/src/output_module.cc +++ b/source/bxdpp/src/output_module.cc @@ -1,6 +1,6 @@ /* output_module.cc * - * Copyright (C) 2013-2017 Francois Mauger + * Copyright (C) 2013-2022 Francois Mauger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -141,13 +141,14 @@ namespace dpp { { if (! _common_) { _common_.reset(new io_common(_logging, get_name())); + _common_->set_io(io_common::IO_OUTPUT); } return *_common_.get(); } bool output_module::has_metadata_store() const { - return (_common_.get() != 0); + return (_common_.get() != nullptr); } const datatools::multi_properties & output_module::get_metadata_store() const @@ -395,7 +396,7 @@ namespace dpp { base_module::process_status output_module::_store(const datatools::things & a_event_record) { process_status store_status = PROCESS_OK; - if (_sink_ == 0) { + if (_sink_ == nullptr) { // attempt to open a sink of event records : store_status = _open_sink_(); if (store_status != PROCESS_OK) { @@ -403,7 +404,7 @@ namespace dpp { } } /* - if (_sink_ == 0) { + if (_sink_ == nullptr) { _grab_common().set_file_index(get_common().get_file_index()+1); if (get_common().get_file_index() >= (int)get_common().get_filenames().size()) { store_status = PROCESS_FATAL; @@ -431,7 +432,7 @@ namespace dpp { bool store_it = true; // store action : if (store_it) { - if (_sink_ != 0) { + if (_sink_ != nullptr) { bool ok = _sink_->store_next_record(a_event_record); if (! ok) { DT_LOG_ERROR(_logging, "Cannot store the data record ! This is a bug !"); @@ -465,10 +466,10 @@ namespace dpp { } } if (stop_file) { - if (_sink_ != 0) { + if (_sink_ != nullptr) { _sink_->reset(); delete _sink_; - _sink_ = 0; + _sink_ = nullptr; } _grab_common().set_file_record_counter(0); if (get_common().get_max_files() > 0) { diff --git a/source/bxdpp/testing/test_input_output_modules.cxx b/source/bxdpp/testing/test_input_output_modules.cxx index 6ceff81c3..fa7c88e1c 100644 --- a/source/bxdpp/testing/test_input_output_modules.cxx +++ b/source/bxdpp/testing/test_input_output_modules.cxx @@ -39,7 +39,7 @@ void test_io_1(bool debug, int max_events) int error_code = 0; // Example of usage of the 'input_module' class (reader): std::clog << datatools::io::notice - << "test_input_output_modules: 'input_module/output_module' class example: " << std::endl; + << "test_io_1: 'input_module/output_module' class example: " << std::endl; // Instantiate a reader module : dpp::input_module input; @@ -67,10 +67,12 @@ void test_io_1(bool debug, int max_events) input_config.store ("files.incremental.start", 0); input_config.store ("files.incremental.increment", 1); input_config.store ("files.incremental.stop", 3); + std::clog << datatools::io::notice << "test_io_1: TEST 1" << std::endl; // Initialize the 'input' module (without the help of a 'service manager'): - input.initialize_standalone (input_config); - input.tree_dump (std::clog, "Input module"); + input.initialize_standalone(input_config); + std::clog << datatools::io::notice << "test_io_1: TEST 2" << std::endl; + input.tree_dump(std::clog, "Input module"); // Instantiate an I/O writer module : dpp::output_module output; @@ -109,15 +111,15 @@ void test_io_1(bool debug, int max_events) dpp::base_module::process_status status = input.process (ER); if (debug) { std::clog << datatools::io::debug - << "test_input_output_modules: Input module processing status = " << status << std::endl; + << "test_io_1: Input module processing status = " << status << std::endl; } if (status == dpp::base_module::PROCESS_FATAL) { std::clog << datatools::io::error - << "test_input_output_modules: Reader had a fatal error !" << std::endl; + << "test_io_1: Reader had a fatal error !" << std::endl; break; } else if (status == dpp::base_module::PROCESS_ERROR) { std::clog << datatools::io::error - << "test_input_output_modules: Reader had an error !" << std::endl; + << "test_io_1: Reader had an error !" << std::endl; break; } @@ -144,11 +146,11 @@ void test_io_1(bool debug, int max_events) status = output.process (ER); if (status == dpp::base_module::PROCESS_FATAL) { std::clog << datatools::io::error - << "test_input_output_modules: Writer had a fatal error !" << std::endl; + << "test_io_1: Writer had a fatal error !" << std::endl; break; } else if (status == dpp::base_module::PROCESS_ERROR) { std::clog << datatools::io::error - << "test_input_output_modules: Writer had an error !" << std::endl; + << "test_io_1: Writer had an error !" << std::endl; break; } output_count++; @@ -164,14 +166,14 @@ void test_io_1(bool debug, int max_events) output.reset (); input.reset (); std::clog << datatools::io::notice - << "test_input_output_modules: I/O modules terminated." << std::endl; + << "test_io_1: I/O modules terminated." << std::endl; std::clog << datatools::io::notice - << "test_input_output_modules: Input event records : " << input_count << std::endl; + << "test_io_1: Input event records : " << input_count << std::endl; std::clog << datatools::io::notice - << "test_input_output_modules: Output event records : " << output_count << std::endl; + << "test_io_1: Output event records : " << output_count << std::endl; std::clog << datatools::io::notice - << "test_input_output_modules: Error status : " << error_code << std::endl; + << "test_io_1: Error status : " << error_code << std::endl; return; } @@ -182,7 +184,7 @@ void test_io_2(bool debug, int max_events) int error_code = 0; // Example of usage of the 'input_module' class (reader): std::clog << datatools::io::notice - << "test_input_output_modules: 'input_module/output_module' class example: " << std::endl; + << "test_io_2: 'input_module/output_module' class example: " << std::endl; // Instantiate a reader module : dpp::input_module input; @@ -221,15 +223,15 @@ void test_io_2(bool debug, int max_events) int status = input.process (ER); if (debug) { std::clog << datatools::io::debug - << "test_input_output_modules: Input module processing status = " << status << std::endl; + << "test_io_2: Input module processing status = " << status << std::endl; } if (status == dpp::base_module::PROCESS_FATAL) { std::clog << datatools::io::error - << "test_input_output_modules: Reader had a fatal error !" << std::endl; + << "test_io_2: Reader had a fatal error !" << std::endl; break; } else if (status == dpp::base_module::PROCESS_ERROR) { std::clog << datatools::io::error - << "test_input_output_modules: Reader had an error !" << std::endl; + << "test_io_2: Reader had an error !" << std::endl; break; } @@ -256,11 +258,11 @@ void test_io_2(bool debug, int max_events) status = output.process (ER); if (status == dpp::base_module::PROCESS_FATAL) { std::clog << datatools::io::error - << "test_input_output_modules: Writer had a fatal error !" << std::endl; + << "test_io_2: Writer had a fatal error !" << std::endl; break; } else if (status == dpp::base_module::PROCESS_ERROR) { std::clog << datatools::io::error - << "test_input_output_modules: Writer had an error !" << std::endl; + << "test_io_2: Writer had an error !" << std::endl; break; } output_count++; @@ -276,14 +278,14 @@ void test_io_2(bool debug, int max_events) output.reset (); input.reset (); std::clog << datatools::io::notice - << "test_input_output_modules: I/O modules terminated." << std::endl; + << "test_io_2: I/O modules terminated." << std::endl; std::clog << datatools::io::notice - << "test_input_output_modules: Input event records : " << input_count << std::endl; + << "test_io_2: Input event records : " << input_count << std::endl; std::clog << datatools::io::notice - << "test_input_output_modules: Output event records : " << output_count << std::endl; + << "test_io_2: Output event records : " << output_count << std::endl; std::clog << datatools::io::notice - << "test_input_output_modules: Error status : " << error_code << std::endl; + << "test_io_2: Error status : " << error_code << std::endl; return; } @@ -293,7 +295,7 @@ void test_brio_1(bool /*debug*/) int error_code = 0; // Example of usage of the 'simple_brio_data_source' class (reader): std::clog << datatools::io::notice - << "test_input_output_modules: 'simple_brio_data_source' class example: " << std::endl; + << "test_brio_1: 'simple_brio_data_source' class example: " << std::endl; #if DPP_DATATOOLS_LEGACY == 1 dpp::simple_brio_data_source sbds ("${DPP_TESTING_DIR}/data/data_0.brio"); #else @@ -328,7 +330,7 @@ void test_brio_1(bool /*debug*/) ++count; } else { std::cerr << datatools::io::error - << "test_input_output_modules: " + << "test_brio_1: " << "Couldn't load another entry." << std::endl; error_code = EXIT_FAILURE; @@ -337,14 +339,14 @@ void test_brio_1(bool /*debug*/) } if (source.is_random ()) { std::clog << datatools::io::notice - << "test_input_output_modules: " + << "test_brio_1: " << "This source supports random access." << std::endl; } int64_t entry = 8; if (source.can_load_record (entry)) { std::clog << datatools::io::notice - << "test_input_output_modules: " + << "test_brio_1: " << "This source can load entry #" << entry << "." << std::endl; datatools::things ER; @@ -352,7 +354,7 @@ void test_brio_1(bool /*debug*/) std::ostringstream title; title << "Entry #" << entry; std::ostringstream indent; - indent << datatools::io::notice << "test_input_output_modules: " ; + indent << datatools::io::notice << "test_brio_1: " ; ER.tree_dump (std::clog, title.str (), indent.str ()); } std::clog << datatools::io::notice