Changeset 7941


Ignore:
Timestamp:
08/25/06 19:30:47 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7940 r7941  
    7676   * msql/Makefile, msql/SqlLinkDef.h:
    7777     - added MSQLMagic
     78
     79   * mbase/MLog.[h,cc]:
     80     - added new member function Intro()
    7881
    7982
  • trunk/MagicSoft/Mars/mbase/MLog.cc

    r7853 r7941  
    101101
    102102#include <TROOT.h>      // gROOT->GetListOfCleanups()
     103#include <TSystem.h>
    103104
    104105#ifdef _REENTRANT
     
    108109
    109110#include "MArgs.h"
     111#include "MTime.h"
    110112#include "MParContainer.h"
    111113
     
    718720    plug->SetBit(kMustCleanup);
    719721}
     722
     723// --------------------------------------------------------------------------
     724//
     725// Returns "yyyy-mm-dd user@host gROOT->GetName()[pid]"
     726//
     727TString MLog::Intro()
     728{
     729    UserGroup_t *user = gSystem->GetUserInfo();
     730
     731    TString rc;
     732    rc += MTime(-1).GetSqlDateTime();
     733    rc += " ";
     734    rc += user->fUser;
     735    rc += "@";
     736    rc += gSystem->HostName();
     737    rc += " ";
     738    rc += gROOT->GetName();
     739    rc += "[";
     740    rc += gSystem->GetPid();
     741    rc += "] ";
     742
     743    delete user;
     744
     745    return rc;
     746}
Note: See TracChangeset for help on using the changeset viewer.