00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef XRDMONDECTRACEINFO_HH
00014 #define XRDMONDECTRACEINFO_HH
00015
00016 #include "XrdMon/XrdMonCommon.hh"
00017
00018 #include "XrdSys/XrdSysHeaders.hh"
00019
00020 using std::ostream;
00021
00022 class XrdMonDecTraceInfo {
00023 public:
00024 XrdMonDecTraceInfo() : _offset(0), _length(0), _timestamp(0), _uniqueId(0) {}
00025 XrdMonDecTraceInfo(kXR_int64 o, length_t l, char rw, kXR_int32 t)
00026 : _offset(o), _length(l), _rwReq(rw), _timestamp(t), _uniqueId(o) {}
00027
00028 kXR_int32 timestamp() const {return _timestamp;}
00029 bool isRead() const { return _rwReq == 'r'; }
00030 length_t length() const { return _length; }
00031 void setUniqueId(dictid_t id) { _uniqueId = id; }
00032
00033 void convertToString(char s[256]);
00034
00035 private:
00036 kXR_int64 _offset;
00037 length_t _length;
00038 char _rwReq;
00039 kXR_int32 _timestamp;
00040 dictid_t _uniqueId;
00041
00042 static kXR_int32 _lastT;
00043 static string _lastS;
00044
00045 friend ostream& operator<<(ostream& o, const XrdMonDecTraceInfo& t);
00046 };
00047
00048
00049
00050 #endif