From 2acaac5903a62235f30409e244bfebf10581ca36 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 9 Jan 2019 22:21:39 +0100 Subject: [PATCH] [DEV] start analiser --- .../lutin_recoAnalyser.cpython-37.pyc | Bin 0 -> 1403 bytes recoAnalyser/appl/debug.cpp | 13 +++ recoAnalyser/appl/debug.hpp | 39 +++++++ recoAnalyser/appl/main.cpp | 110 ++++++++++++++++++ recoAnalyser/lutin_recoAnalyser.py | 44 +++++++ 5 files changed, 206 insertions(+) create mode 100644 recoAnalyser/__pycache__/lutin_recoAnalyser.cpython-37.pyc create mode 100644 recoAnalyser/appl/debug.cpp create mode 100644 recoAnalyser/appl/debug.hpp create mode 100644 recoAnalyser/appl/main.cpp create mode 100644 recoAnalyser/lutin_recoAnalyser.py diff --git a/recoAnalyser/__pycache__/lutin_recoAnalyser.cpython-37.pyc b/recoAnalyser/__pycache__/lutin_recoAnalyser.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4e4c3261fe60a83934176c20c2b3662b54356018 GIT binary patch literal 1403 zcma)5&1%~~5Y|eTE&nEMp-||-^w8o%WN5D;B(Xy)XzbuPhnRp-HETt+q!lYUiA|3^ z^f8)apQy0cp85(sbw+kTl!j!Noj;cSW@hI*Y&L5eu5UlzUA!?g?H4(BOGjfLPkMm@ zG+?0?u?b^qTaS#1v9U{&66j!j)g~sCz(ie!GE`7kz=A4j3u;hDU4;fTQP-daTd3>6 zPPNYVZ$!`r9?84K(CFbwODOVN`aqQrox#EA{D&qn*@F19Ka+06uZ5g9UDGWRwd%RhA zohp2=DrI;gy8rDb^ful|Tt8msecLV|R3C$|s=1jA+?`a+vd03&_{+}NHe6=f9nIOqpx7iDg2BsWR6}7irFaN#7}nGm^$y(#T2r^Zda=QU=A=oZek$yhqcJ NK1I=B4Q3g|{TIjQFhl?V literal 0 HcmV?d00001 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