ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
date_filter_msg_buffer.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file date_filter_msg_buffer.cc
1
2
#include "
date_filter_msg_buffer.h
"
3
4
// in the constructor we allocate the specified amount of bytes for
5
// the output array.
6
7
date_filter_msg_buffer::date_filter_msg_buffer
(
const
int
msglen)
8
:
filter_msg_buffer
(msglen)
9
{
10
11
}
12
13
date_filter_msg_buffer::date_filter_msg_buffer
(
14
const
int
type_max,
15
const
int
source_max,
16
const
int
sev_max,
17
const
int
msglen)
18
:
filter_msg_buffer
(type_max, source_max,sev_max,msglen)
19
{}
20
21
22
23
// in the destructor, we restore the original streambuf for COUT.
24
date_filter_msg_buffer::~date_filter_msg_buffer
()
25
{}
26
27
// this is the function which is called as a result of the << std::endl
28
// and flush() operations
29
30
int
date_filter_msg_buffer::sync
()
31
{
32
33
msgProfile
mp;
34
int
length
, ix;
35
36
37
char
*
x
=
format
(&length, &mp);
38
int
ret = 0;
39
40
if
(
state
[mp.
type
][mp.
source
][mp.
severity
] )
41
{
42
if
(mp.
type
)
streambuf_add_date
(
original_streambuf
);
43
#if defined(LVL2_WINNT) || defined(STREAMBUF_NEW_IOSTREAM)
44
for
(ix =0; ix <
length
; ix++)
45
original_streambuf
->sputc( x[ix] );
46
ret =
original_streambuf
->pubsync();
47
#else
48
for
(ix =0; ix <
length
; ix++)
49
original_streambuf
->overflow( x[ix] );
50
ret =
original_streambuf
->sync();
51
#endif
52
}
53
delete
[]
x
;
54
55
pos
= 0;
56
57
return
ret;
58
}
59
60
61
62
63
64
65
online_distribution
blob
master
newbasic
date_filter_msg_buffer.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:59
using
1.8.2 with
ECCE GitHub integration