00001 #ifndef _OOUC_TRACE_H 00002 #define _OOUC_TRACE_H 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d O u c T r a c e . h h */ 00006 /* */ 00007 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */ 00008 /* All Rights Reserved. See XrdInfo.cc for complete License Terms */ 00009 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00010 /* DE-AC03-76-SFO0515 with the Deprtment of Energy */ 00011 /******************************************************************************/ 00012 00013 // $Id: XrdOucTrace.hh 24468 2008-06-22 16:47:03Z ganis $ 00014 00015 #include "XrdSys/XrdSysHeaders.hh" 00016 #include "XrdSys/XrdSysError.hh" 00017 00018 class XrdOucTrace 00019 { 00020 public: 00021 00022 inline void Beg(const char *tid=0, const char *usr=0, const char *sid=0) 00023 {eDest->TBeg(usr, tid, sid);} 00024 00025 inline void End() {eDest->TEnd();} 00026 00027 inline int Tracing(int mask) {return mask & What;} 00028 00029 int What; 00030 00031 XrdOucTrace(XrdSysError *erp) {eDest = erp; What = 0;} 00032 ~XrdOucTrace() {} 00033 00034 static char *bin2hex(char *data, int dlen, char *buff=0); 00035 00036 private: 00037 XrdSysError *eDest; 00038 }; 00039 #endif