Jpp
18.1.0
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
AcousticDataFilter
src
Tools
KM3NeT_Debug.h
Go to the documentation of this file.
1
#ifndef KM3NET_DEBUG_H_
2
#define KM3NET_DEBUG_H_
3
4
#include <stdlib.h>
5
#include <iostream>
6
#include <mutex>
7
#include <fstream>
8
9
10
#define DBG_MSG (*KM3NeT_Debug::get())
11
12
13
/**
14
* \author fsimeone
15
*/
16
17
class
KM3NeT_Debug
18
{
19
public
:
20
21
static
KM3NeT_Debug
*
get
()
22
{
23
if
(
singleton_
== NULL)
singleton_
=
new
KM3NeT_Debug
();
24
return
singleton_
;
25
}
26
27
static
void
kill
()
28
{
29
if
(
singleton_
!= NULL)
30
{
31
delete
singleton_
;
32
singleton_
= NULL;
33
}
34
}
35
36
template
<
class
T>
37
KM3NeT_Debug
&
operator<<
(
const
T
&s)
38
{
39
std::lock_guard<std::mutex> lock(
mtx_
);
40
std::cerr<<s;
41
return
*
this
;
42
}
43
44
private
:
45
46
KM3NeT_Debug
();
47
virtual
~KM3NeT_Debug
();
48
49
static
KM3NeT_Debug
*
singleton_
;
50
std::mutex
mtx_
;
51
};
52
53
#endif
/* KM3NET_DEBUG_H_ */
54
KM3NeT_Debug::KM3NeT_Debug
KM3NeT_Debug()
Definition:
KM3NeT_Debug.cc:9
KM3NeT_Debug::kill
static void kill()
Definition:
KM3NeT_Debug.h:27
T
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Definition:
JCalibrateHeight.sh:61
KM3NeT_Debug
Definition:
KM3NeT_Debug.h:17
KM3NeT_Debug::operator<<
KM3NeT_Debug & operator<<(const T &s)
Definition:
KM3NeT_Debug.h:37
KM3NeT_Debug::singleton_
static KM3NeT_Debug * singleton_
Definition:
KM3NeT_Debug.h:49
KM3NeT_Debug::mtx_
std::mutex mtx_
Definition:
KM3NeT_Debug.h:50
KM3NeT_Debug::~KM3NeT_Debug
virtual ~KM3NeT_Debug()
Definition:
KM3NeT_Debug.cc:13
Generated by
1.8.5