R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BLogger.h
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3
* Copyright (C) 2019-2025 Members of R3B Collaboration *
4
* *
5
* This software is distributed under the terms of the *
6
* GNU General Public Licence (GPL) version 3, *
7
* copied verbatim in the file "LICENSE". *
8
* *
9
* In applying this license GSI does not waive the privileges and immunities *
10
* granted to it by virtue of its status as an Intergovernmental Organization *
11
* or submit itself to any jurisdiction. *
12
******************************************************************************/
13
14
// ----------------------------------------------------------------------
15
// ----- R3BLogger -----
16
// ----- Created 15/12/21 by J.L. Rodriguez-Sanchez -----
17
// ----------------------------------------------------------------------
18
19
#pragma once
20
21
#include <FairLogger.h>
22
#include <Rtypes.h>
23
#include <cstdlib>
24
#include <fairlogger/Logger.h>
25
26
// NOLINTBEGIN
27
class
R3BLogger
;
28
29
class
R3BLogger
:
public
FairLogger
30
{
31
public
:
32
#define R3BLOG(severity, x) \
33
if (true) \
34
{ \
35
std::string fN(__FILE__); \
36
std::stringstream ss; \
37
ss << fN.substr(fN.find_last_of("/") + 1) << ":" << __LINE__ << ":" << __FUNCTION__ << "(): "; \
38
LOG(severity) << ss.str() << x; \
39
} \
40
else \
41
(void)0
42
43
#define R3BLOG_IF(severity, condition, x) \
44
if (true) \
45
{ \
46
std::string fNif(__FILE__); \
47
std::stringstream ssif; \
48
ssif << fNif.substr(fNif.find_last_of("/") + 1) << ":" << __LINE__ << ":" << __FUNCTION__ << "(): "; \
49
LOG_IF(severity, condition) << ssif.str() << x; \
50
} \
51
else \
52
(void)0
53
54
private
:
55
R3BLogger
();
56
~R3BLogger
();
57
58
public
:
59
ClassDefOverride(
R3BLogger
, 0)
60
};
61
// NOLINTEND
R3BLogger
Definition
R3BLogger.h:30
R3BLogger::~R3BLogger
~R3BLogger()
R3BLogger::R3BLogger
R3BLogger()
r3bbase
R3BLogger.h
Generated by
1.13.2