xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdMon
XrdMonDecTraceInfo.hh
Go to the documentation of this file.
1
/*****************************************************************************/
2
/* */
3
/* XrdMonDecTraceInfo.hh */
4
/* */
5
/* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */
6
/* All Rights Reserved */
7
/* Produced by Jacek Becla for Stanford University under contract */
8
/* DE-AC02-76SF00515 with the Department of Energy */
9
/*****************************************************************************/
10
11
// $Id$
12
13
#ifndef XRDMONDECTRACEINFO_HH
14
#define XRDMONDECTRACEINFO_HH
15
16
#include "
XrdMon/XrdMonCommon.hh
"
17
18
#include "
XrdSys/XrdSysHeaders.hh
"
19
20
using
std::ostream;
21
22
class
XrdMonDecTraceInfo
{
23
public
:
24
XrdMonDecTraceInfo
() :
_offset
(0),
_length
(0),
_timestamp
(0),
_uniqueId
(0) {}
25
XrdMonDecTraceInfo
(
kXR_int64
o,
length_t
l,
char
rw,
kXR_int32
t)
26
:
_offset
(o),
_length
(l),
_rwReq
(rw),
_timestamp
(t),
_uniqueId
(o) {}
27
28
kXR_int32
timestamp
()
const
{
return
_timestamp
;}
// for verification
29
bool
isRead
()
const
{
return
_rwReq
==
'r'
; }
30
length_t
length
()
const
{
return
_length
; }
31
void
setUniqueId
(
dictid_t
id
) {
_uniqueId
= id; }
32
33
void
convertToString
(
char
s[256]);
34
35
private
:
36
kXR_int64
_offset
;
37
length_t
_length
;
38
char
_rwReq
;
39
kXR_int32
_timestamp
;
40
dictid_t
_uniqueId
;
41
42
static
kXR_int32
_lastT
;
// cache last, likely to be the same for many
43
static
string
_lastS
;
// traces, conversion to string not cheap
44
45
friend
ostream&
operator<<
(ostream& o,
const
XrdMonDecTraceInfo
& t);
46
};
47
48
// size: 8 + 4 + 1 + 4 --> aligned to 32
49
50
#endif
/* XRDMONDECTRACEINFO_HH */
Generated by
1.8.3.1