diff --git a/recoAnalyser/__pycache__/lutin_recoAnalyser.cpython-37.pyc b/recoAnalyser/__pycache__/lutin_recoAnalyser.cpython-37.pyc new file mode 100644 index 0000000..4e4c326 Binary files /dev/null and b/recoAnalyser/__pycache__/lutin_recoAnalyser.cpython-37.pyc differ diff --git a/recoAnalyser/appl/debug.cpp b/recoAnalyser/appl/debug.cpp new file mode 100644 index 0000000..93b4d60 --- /dev/null +++ b/recoAnalyser/appl/debug.cpp @@ -0,0 +1,13 @@ +/** @file + * @author Edouard DUPIN + * @copyright 2019, Edouard DUPIN, all right reserved + * @license MPL v2.0 (see license file) + */ + +#include + + +int32_t appl::getLogId() { + static int32_t g_val = elog::registerInstance("RecoWord"); + return g_val; +} diff --git a/recoAnalyser/appl/debug.hpp b/recoAnalyser/appl/debug.hpp new file mode 100644 index 0000000..8b24de3 --- /dev/null +++ b/recoAnalyser/appl/debug.hpp @@ -0,0 +1,39 @@ +/** @file + * @author Edouard DUPIN + * @copyright 2019, Edouard DUPIN, all right reserved + * @license MPL v2.0 (see license file) + */ +#pragma once + +#include + +namespace appl { + int32_t getLogId(); +} + +#define APPL_BASE(info,data) ELOG_BASE(appl::getLogId(),info,data) + +#define APPL_PRINT(data) APPL_BASE(-1, data) +#define APPL_CRITICAL(data) APPL_BASE(1, data) +#define APPL_ERROR(data) APPL_BASE(2, data) +#define APPL_WARNING(data) APPL_BASE(3, data) +#ifdef DEBUG + #define APPL_INFO(data) APPL_BASE(4, data) + #define APPL_DEBUG(data) APPL_BASE(5, data) + #define APPL_VERBOSE(data) APPL_BASE(6, data) + #define APPL_TODO(data) APPL_BASE(4, "TODO : " << data) +#else + #define APPL_INFO(data) do { } while(false) + #define APPL_DEBUG(data) do { } while(false) + #define APPL_VERBOSE(data) do { } while(false) + #define APPL_TODO(data) do { } while(false) +#endif + +#define APPL_ASSERT(cond,data) \ + do { \ + if (!(cond)) { \ + APPL_CRITICAL(data); \ + assert(!#cond); \ + } \ + } while (0) + diff --git a/recoAnalyser/appl/main.cpp b/recoAnalyser/appl/main.cpp new file mode 100644 index 0000000..b1ae657 --- /dev/null +++ b/recoAnalyser/appl/main.cpp @@ -0,0 +1,110 @@ +/** @file + * @author Edouard DUPIN + * @copyright 2019, Edouard DUPIN, all right reserved + * @license MPL v2.0 (see license file) + */ + + +#include +#include +#include + +#include +#include +#include +#include